Hello there! Looking at the BlockFurnace.java should help.
There there's getBlockTexture() and getBlockTextureFromSide(). I don't know how exactly to use this, but it might be possible to put YourBlock.getBlockTextureFromSide(Modload.addOverride("/terrain.png","yourimage")) and make your image be in a similar format to that of the furnace in terrain.png. Sorry, I haven't tried yet.
But for the recipes, you are using the put() function of java.util.Map. However, you can't just add another parameter to the put function. Originally, the regular uses
Integer.valueOf(i), itemstack
but you added another Integer, making it
Integer.valueOf(i), Integer.valueOf(j), itemstack
which isn't support by put(). I suggest finding another way to input items.
Er hopefully this helps? Happy modding!
Rollback Post to RevisionRollBack
Has nice day!
Please no PMing, and no, I'm not a moderator.
Thanks for replying, but I've already tried your method for the textures and it doesn't quite work right. (All textures are correct except for the front, which is just purple. I assume because the front needs to change.) Thanks for your reply.
I've got a lot done, except the front face of the furnace. Here's what I've done with my texture:
Added this to mod_DoubleFurnace.java:
public static int furnaceSide = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceside.png");
public static int furnaceFrontActive = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceactive.png");
public static int furnaceFrontIdle = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceidle.png");
And put this in BlockDoubleFurnace.java:
public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if(l == 1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(l == 0)
{
return mod_DoubleFurnace.furnaceSide;
}
int i1 = iblockaccess.getBlockMetadata(i, j, k);
if(l != i1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(isActive)
{
return mod_DoubleFurnace.furnaceFrontIdle;
} else
{
return mod_DoubleFurnace.furnaceFrontActive;
}
}
public int getBlockTextureFromSide(int i)
{
if(i == 1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(i == 0)
{
return mod_DoubleFurnace.furnaceSide;
}
if(i == 3)
{
return mod_DoubleFurnace.furnaceFrontActive;
} else
{
return blockIndexInTexture;
}
}
I've got a lot done, except the front face of the furnace. Here's what I've done with my texture:
Added this to mod_DoubleFurnace.java:
public static int furnaceSide = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceside.png");
public static int furnaceFrontActive = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceactive.png");
public static int furnaceFrontIdle = ModLoader.addOverride("/terrain.png", "/doublefurnace/furnaceidle.png");
And put this in BlockDoubleFurnace.java:
public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if(l == 1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(l == 0)
{
return mod_DoubleFurnace.furnaceSide;
}
int i1 = iblockaccess.getBlockMetadata(i, j, k);
if(l != i1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(isActive)
{
return mod_DoubleFurnace.furnaceFrontIdle;
} else
{
return mod_DoubleFurnace.furnaceFrontActive;
}
}
public int getBlockTextureFromSide(int i)
{
if(i == 1)
{
return mod_DoubleFurnace.furnaceSide;
}
if(i == 0)
{
return mod_DoubleFurnace.furnaceSide;
}
if(i == 3)
{
return mod_DoubleFurnace.furnaceFrontActive;
} else
{
return blockIndexInTexture;
}
}
Why does the front part show up purple?
Thanks in advance,
Chewy
I'm having the same issue. Everything is running fine and the block is able to be placed, but in mine, only the top and bottom texture is correct, the sides and face are not being picked up by the override. My sides are a purple texture, and the face is half of a chest. I've tried a ton of different ways of setting up the different get metods, (getBlockTexture, getBlockTextureFromSide,getBlockTextureFromSideAndMetadata) and changed the variables multiple times to see which variables match up with which sides.
I don't think my getBlockTexture method is working at all. I tried putting it both my BlockBluePumpkin.java and my mod_bluePumpkin.java files and it does not work in either of those locations. I am really unsure of how to get it to run this method and switch out the textures for the sides and face =/
I'm trying to make a furnace that smelts items together. I have everything figured out except 2 things:
My furnace is the same on all sides. How do I fix this using ModLoader?
And I can't figure out how to add recipes for it. Here's what I've tried:
Under FurnaceRecipes() I've added this:
And I've added a new method addDoubleSmelting() that looks like this:
And when I recompile it says:
Why does it say it cannot be applied to...?
Thanks to all who try to help,
Chewy
There there's getBlockTexture() and getBlockTextureFromSide(). I don't know how exactly to use this, but it might be possible to put YourBlock.getBlockTextureFromSide(Modload.addOverride("/terrain.png","yourimage")) and make your image be in a similar format to that of the furnace in terrain.png. Sorry, I haven't tried yet.
But for the recipes, you are using the put() function of java.util.Map. However, you can't just add another parameter to the put function. Originally, the regular uses but you added another Integer, making it which isn't support by put(). I suggest finding another way to input items.
Er hopefully this helps? Happy modding!
Please no PMing, and no, I'm not a moderator.
Added this to mod_DoubleFurnace.java:
And put this in BlockDoubleFurnace.java:
Why does the front part show up purple?
Thanks in advance,
Chewy
I'm having the same issue. Everything is running fine and the block is able to be placed, but in mine, only the top and bottom texture is correct, the sides and face are not being picked up by the override. My sides are a purple texture, and the face is half of a chest. I've tried a ton of different ways of setting up the different get metods, (getBlockTexture, getBlockTextureFromSide,getBlockTextureFromSideAndMetadata) and changed the variables multiple times to see which variables match up with which sides.
I don't think my getBlockTexture method is working at all. I tried putting it both my BlockBluePumpkin.java and my mod_bluePumpkin.java files and it does not work in either of those locations. I am really unsure of how to get it to run this method and switch out the textures for the sides and face =/
Anyone have any suggestions?