Posted September 19, 201213 yr I dont know What To do Any Help? (i have made my own texture and put it in the right place) package net.minecraft.src; import Hayhay.generic.CommonProxy; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; /* * Basic needed forge stuff */ @Mod(modid="Hayhaycrusher",name="Haymods",version="1.0.0") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class mod_haymods { //Telling forge that we are creating these public static Block GreenBrickBlock; public static Item RodItem; @SidedProxy(clientSide="Hayhay.generic.client.ClientProxy", serverSide="Hayhay.generic.CommonProxy") public static CommonProxy proxy; //Declaring Init @Init public void load(FMLInitializationEvent event){ //declaring these GreenBrickBlock = new BlockGreenBrick(3360,1).setBlockName("GreenBrickblock").setHardness(1F).setResistance(5F); RodItem = new ItemRod(3361).setItemName("RodItem").setIconIndex(1); //Registering Block GameRegistry.registerBlock(GreenBrickBlock); //Adding ItemName LanguageRegistry.addName(GreenBrickBlock, "GreenBrick"); LanguageRegistry.addName(RodItem, "Rod"); proxy.registerRenderers(); } } package net.minecraft.src; public class BlockGreenBrick extends Block{ public BlockGreenBrick(int par1, int par2){ super(par1, par2, Material.rock); this.setCreativeTab(CreativeTabs.tabBlock); } public String getTextureFile(){ return "/Blocks.png"; } } package Hayhay.generic; public class CommonProxy { public static String ITEMS_PNG = "/Hayhay/mod/items.png"; public static String BLOCK_PNG = "/Hayhay/mod/Blocks.png"; // Client stuff public void registerRenderers () { } } package Hayhay.generic.client; import net.minecraftforge.client.MinecraftForgeClient; import Hayhay.generic.CommonProxy; public class ClientProxy extends CommonProxy { public void registerRenderers () { MinecraftForgeClient.preloadTexture(ITEMS_PNG); MinecraftForgeClient.preloadTexture(BLOCK_PNG); } }
September 19, 201213 yr For whatever reason, your texture is not being registered. I would try moving the MinecraftForgeClient.preloadTexture() calls into your main mod class' init() method. And make absolutely sure that your textures are in the right place and named correctly.
September 20, 201213 yr hayhaycrusher: 1) Don't use the minecraft namespace. 2) Don't SCREAM IN BOLD AND LARGE FONT! 3) Try recompiling, reobfuscating and testing on a production minecraft? drinfernoo: Hell no, NEVER put client-only stuff in the mod's main class. Read the EAQ before posting! OR ELSE! This isn't building better software, its trying to grab a place in the commit list of a highly visible github project. www.forgeessentials.com Don't PM me, I don't check this account unless I have to.
September 20, 201213 yr drinfernoo: Hell no, NEVER put client-only stuff in the mod's main class. Oh? So should the client stuff go in the client proxy?
September 20, 201213 yr drinfernoo: Hell no, NEVER put client-only stuff in the mod's main class. Oh? So should the client stuff go in the client proxy? Yes. And you're not even telling the client that it even has a texture index... So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
September 22, 201213 yr If you're running it out of eclipse are you putting the .png's in the minecraft.jar in the "bin" folder located in the "jars" folder in your MCP area? And have you made sure you've got the directories exactly right? So you'd have a "Hayhay" folder inside the .jar and inside that a "mod" folder and finally the items.png in there? I know you said it, but are you 100% positive? Also, what scenario are you running it under? re-obfuscating it and putting it in the mods folder of your minecraft client? Just hitting the run button on eclipse?
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.