Posted March 11, 201411 yr I am running into a frustrating problem with block textures. I can use the setBlockTextureName method or the IconRegister method, but the block in-game gets the purple/black placeholder. The part that has me confused is that there is nothing in the console about "missing textures", which leads me to believe there's something sketchy in my code. Keep in mind that the mod is loading and being recognized by Forge without any problems. Here are the essentials: @Mod(modid = "example", version = "1") public class ExampleMod { // public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; @Instance(value = "example") public static ExampleMod instance; public static Block example; @SidedProxy(clientSide="com.example.examplemod.ClientProxy", serverSide="com.example.examplemod.CommonProxy") public static CommonProxy proxy; @EventHandler public void init(FMLInitializationEvent event) { example = new BlockExample().setBlockTextureName("example:Block1").setBlockName("example").setHardness(5F).setResistance(5F).setLightLevel(1F).setCreativeTab(CreativeTabs.tabBlock); GameRegistry.registerBlock(example, "example"); } } And BlockExample public class BlockExample extends Block { protected BlockExample() { super(Material.rock); } IIcon blockIcon; @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return blockIcon; } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister r) { this.blockIcon = r.registerIcon("example:Block1"); } }
March 12, 201411 yr Did you try a reload resourcepack? -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
March 12, 201411 yr Author Register your blocks in preInit. Thank you! I could have sworn that I tried that already, but it worked regardless.
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.