Posted April 25, 201411 yr Hi all! I'm new to Forge modding. I added a fluid in my mod, following the tutorial in the Tutorials section. I tried adding the fluid's icons with the registerIcons() method, which takes a IconRegister parameter, but it gives me an error because in the new version IconRegister doesn't exist, the new one is IIconRegister, but when I try to use it, it doesn't get called. I also tried using the setIcons() method in the Fluid class, doing myFluid.setIcons(new IIcon(), new IIcon()), but it gives me an error because it can't be instantiated. How can I solve this problem? P.S. : Sorry for my bad english.
April 25, 201411 yr To use the setIcons() you will have to give it an already made IIcon object, where can we find that? In your fluid block class. setIcons(myFluidBlock.getBlockTextureFromSide(side) A good way to do this is in the TextureStitchEvent. @SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Post event) { if (event.map.getTextureType() == 0) { myFluid.setIcons(myFluidBlock.getBlockTextureFromSide(1), myFluidBlock.getBlockTextureFromSide(2)); } } In your preInit: MinecraftForge.EVENT_BUS.register(this); //use the instance of your mod here! My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
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.