Posted August 21, 201213 yr Hello, I was trying to use infinite terrain and sprite indexes for an item. However, it would not work\. It just showed a white square with a black dot. In older versions, you impliment ItextureProvider. I was wondering what the equivlent was for 1.3.2. I have attached my code. capsuels.java package mrkirby153.capsuels; import java.io.File; import net.minecraft.client.Minecraft; import net.minecraft.src.Block; import net.minecraft.src.ItemStack; import net.minecraft.src.ModLoader; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.Configuration; import cpw.mods.fml.common.*; import cpw.mods.fml.common.Mod.Item; import cpw.mods.fml.common.Mod.*; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid= "Capsuels Mod", name = "Capsuels Mod", version = "Alpha 0.1") public class Capsuels { @Init public void load(FMLInitializationEvent event){ File file = new File(Minecraft.getMinecraftDir(), "/config/Capsuels.cfg"); Configuration cfg = new Configuration(file); cfg.load(); int EmptyID = cfg.getOrCreateBlockIdProperty("Empty Capsuels", 500).getInt(); int EXPID = cfg.getOrCreateBlockIdProperty("EXP Capsuels", 501).getInt(); final net.minecraft.src.Item emptyCap= (new ItemEmptyCap(EmptyID)).setFull3D().setIconCoord(0, 0).setItemName("ItemEmptyCap"); final net.minecraft.src.Item capEXP; MinecraftForgeClient.preloadTexture("/mrkirby153/Capsuels/Capsuels.png"); LanguageRegistry.addName(emptyCap, "Empty Cap"); GameRegistry.addShapelessRecipe(new ItemStack(emptyCap, 1), new Object[] {Block.dirt}); } } ItemEmptyCap.java package mrkirby153.capsuels; import net.minecraft.src.EntityPlayer; import net.minecraft.src.EnumAction; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.World; public class ItemEmptyCap extends Item { public ItemEmptyCap (int par1){ super(par1); this.setMaxStackSize(3); } public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){ --par1ItemStack.stackSize; if(!par2World.isRemote){ par3EntityPlayer.clearActivePotions(); } return par1ItemStack; } public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 32; } public EnumAction getItemUseAction(ItemStack par1ItemStack){ return EnumAction.drink; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EnttyPlayer){ par3EnttyPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; } public String getTextureFile(){ return "/mrkirby153/Capsuels/Capsuels.png"; } } http://i.imgur.com/gWwyMMO.jpg[/img]
August 21, 201213 yr From what you've said I'm assuming you're testing from eclipse, therefore I guess your problem is that you haven't added your images. go to your jars file in mcp, then bin and open minecraft.jar from there add your images to the directory defined in the main class.
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.