Posted April 15, 201411 yr I've coded an multi-textured-block in 1.7.2 , but it doesn't work . Here is the code: package DETheLegendOfGaming.RedPow0rReloaded; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.BlockRotatedPillar; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; public class blockRubberWood extends BlockRotatedPillar { @SideOnly(Side.CLIENT) protected IIcon[] blockRubberWood_top; @SideOnly(Side.CLIENT) protected IIcon[] blockRubberWood_side; private static final String __OBFID = "CL_00000266"; public blockRubberWood(Material p_i45394_1_) { super(p_i45394_1_); // TODO Auto-generated constructor stub this.setCreativeTab(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.tabProjectRedAddon); this.setHardness(2.0F); this.setStepSound(soundTypeWood); this.setBlockTextureName(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood_up"); } @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon bottomIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; public int getRenderType() { return 31; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister icon) { topIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up"); bottomIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up"); sideIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_side"); } public static void init() { } @Override public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z) { return true; } @Override public boolean isWood(IBlockAccess world, int x, int y, int z) { return true; } @Override public IIcon getSideIcon(int var1) { // TODO Auto-generated method stub return sideIcon; } public IIcon getTopIcon(int var1) { // TODO Auto-generated method stub return topIcon; } public IIcon getBottomIcon(int var1) { // TODO Auto-generated method stub return bottomIcon; } }
April 15, 201411 yr registerBlockIcons And if you put the Override annotation over all methods you ever override from Minecraft, you would've figured that out.
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.