Posted June 17, 201411 yr Does anyone know why my textures aren't showing? I'm running Forge 1.7.2 Screenshot of Package Explorer: Code: package net.drlc.iridiumforest; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid= BaseMod.MODID, version = BaseMod.VERSION) public class BaseMod { public static final String MODID = "iridiumforest"; public static final String VERSION = "Oatmeal"; public static Block iridiumBlock; public static Item iridiumIngot; public static CreativeTabs iridiumTab = new CreativeTabs("iridiumTab"){ public Item getTabIconItem() { return Items.baked_potato; } }; @EventHandler public void preInit(FMLInitializationEvent event) { iridiumIngot = new Item().setCreativeTab(iridiumTab).setUnlocalizedName("iridiumIngot").setTextureName(MODID + ":iridiumBar"); GameRegistry.registerItem(iridiumIngot, "iridiumIngot"); iridiumBlock = new IridiumBlock().func_149647_a(iridiumTab).func_149663_c("iridiumBlock").func_149658_d(MODID + ":iridiumBlock"); GameRegistry.registerBlock(iridiumBlock, "iridiumBlock"); } @EventHandler public void init(FMLInitializationEvent event) { } }
June 17, 201411 yr in my opinion it's easier to have the setTexture etc in the specific Item or Block class Item Example: public ApprenticeMystStone(){ super(); this.setUnlocalizedName("apprenticemystStone"); this.setTextureName(text); } private String text = mystcrops.MODID + ":apprenticemystStone"; Block Example: private String texture = "CrystalRevolution:crystal_ore"; public OreCrystal(Material mat) { super(mat); this.setBlockName("OreCrystal"); this.setBlockTextureName(texture); } i'm using it like this because it's easier. Hope this helped u
June 17, 201411 yr Author in my opinion it's easier to have the setTexture etc in the specific Item or Block class Item Example: public ApprenticeMystStone(){ super(); this.setUnlocalizedName("apprenticemystStone"); this.setTextureName(text); } private String text = mystcrops.MODID + ":apprenticemystStone"; Block Example: private String texture = "CrystalRevolution:crystal_ore"; public OreCrystal(Material mat) { super(mat); this.setBlockName("OreCrystal"); this.setBlockTextureName(texture); } i'm using it like this because it's easier. Hope this helped u I don't think it changes anything, all that is being done is instead of passing in the String, you're passing in a variable that stores the same String...
June 18, 201411 yr Try something like mod.MODID + ":textures/blocks/PNG.png" Check spelling of folders.
June 18, 201411 yr Author Which tutorial are you following? This guy needs his face beaten up. Seriously. I have seen this so many times now. Code goes into src/main/java ONLY. Textures and assets go into src/main/resources ONLY. Do NOT make another source folder (e.g. src/whatever), do not pass go, do not collect $200. So the classes should go in the default package?
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.