Posted October 25, 201410 yr I am going to be adding a custom flower to my mod, but I am not sure how to get the texture to work. I thought I had everything set up correctly but when I went into my game I had no texture. I looked inside the flower classes and the tall grass class and I think I have everything virtually the same. Is there anything wrong with my class so far? package com.qwertyuiop.blocks; import net.minecraft.block.BlockBush; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.IBlockAccess; import com.qwertyuiop.main.Qwertyuiop; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockEnrichedGrass extends BlockBush { public BlockEnrichedGrass() { super(Material.grass); this.setBlockName("asdsa"); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister i) { this.blockIcon = i.registerIcon(Qwertyuiop.MODID + ":texture.png"); } @SideOnly(Side.CLIENT) public IIcon getIcon(int par1, int par2) { return this.blockIcon; } }
October 25, 201410 yr Author I figured out why it wasn't working before, I needed to change the name of the registerIcons method to registerBlockIcons...
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.