Posted July 28, 201213 yr Hey, At the moment, I'm porting my mod from ModLoader to Forge. The only step i missed is porting the textures for crops. In ModLoader it looks like this: public int getBlockTextureFromSideAndMetadata(int i, int j) { if(j == 0) { return blockIndexInTexture; } if(j == 1) { return mod_Namehere.growNamehere1; } if(j == 2) { return mod_Namehere.growNamehere2; } if(j == 3) { return mod_Namehere.growNamehere3; } if(j == 4) { return mod_Namehere.growNamehere4; } if(j == 5) { return mod_Namehere.growNamehere5; } if(j == 6) { return mod_Namehere.growNamehere6; } if(j == 7) { return mod_Namehere.growNamehere7; } if(j == { return mod_Namehere.growNamehere8; } return j; } But how i have to do that in Forge?
July 28, 201213 yr If you've set up ITextureProvider properly (Implement it in your block's file, import it, then return the local path to the spritesheet you want to use), just return a number between 0 and 255, depending on where the image is on your spritesheet. To be more specific: The texture on the top leftmost square is 0. For every square you go rightwards, add 1. When you go down by 1, add 16.
July 28, 201213 yr Author I tried that already. I also used the Bonemeal Tutorial in the forge wiki. When I use the Bonemeal, there still is the same texture.
July 29, 201213 yr Debug in to it to make sure your metadata is set properly and that you 'notify' an update.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.