Posted August 24, 201213 yr I'm still a noob coder, and currently I'm following this guide for adding infinite terrain and item indexes: http://www.minecraftforge.net/wiki/How_to_use_infinite_terrain_and_sprite_indexes but it uses the ITextureProvider, which in the current Forge version doesn't exist. So, after searching in the forum, nearly everything say use this to replace ITextureProvider: public String getTextureFile(){ return "[Terrain File]"; } but I don't know where to put the code. Here is my mod_tutorial: package net.minecraft.src; import net.minecraftforge.client.MinecraftForgeClient; public class mod_tutorial extends BaseMod { public static Item TutorialIngot; public static final Block TutorialBlock ; static { TutorialBlock = (new BlockTutorialBlock(255, ModLoader.addOverride("/terrain.png", "/mods/tes1.png"))).setHardness(3F).setResistance(5F).setStepSound(Block.soundWoodFootstep).setBlockName("First Block"); TutorialIngot = (new Item(1000)).setIconIndex(0).setItemName("TutorialIngot"). } public void load() { } public mod_tutorial() { MinecraftForgeClient.preloadTexture("/mods/items.png"); ModLoader.addName(TutorialIngot, "Tutorial Ingot"); ModLoader.registerBlock(TutorialBlock); ModLoader.addName(TutorialBlock, "Tutorial Block Ore"); ModLoader.addSmelting(Block.planks.blockID, new ItemStack(TutorialBlock ,1)); ModLoader.addSmelting(TutorialBlock.blockID, new ItemStack(TutorialIngot ,1)); } public String getVersion() { return "1.0.0"; } } And here is my TutorialIngot: package net.minecraft.src; public class TutorialIngot extends Item { public TutorialIngot(int i) { super(i); } public String getTextureFile(){ return "/mods/item.png"; } } But when I run Minecraft, what should the tutorial ingot look like an ingot, it instead look like a leather helmet. Here is the picture:
August 24, 201213 yr Just use getTextureFile if you're not doing anything extra -.- Also dont know what version of forge you're using but you should always update to the latest build. Also, make sure you're setting the index properly with your texture sheet, you didnt show what your sheet should look like. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 24, 201213 yr Author Here is my sprite sheet: And I'm using the current version of Forge, which is Forge 4.0.0 Minecraft 1.3.2 And how do you set up the index?
August 24, 201213 yr -.- 4.0.0 tells me NOTHING about the version you are using you can be using build 172 or build 224, build numbers are freaking important. So I say again UPDATE YOUR FORGE I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 24, 201213 yr build #400 now its included in Item.java or Block.java. the only problem, is your using 'return "/mods/item.png";' your returning only the ingot. you need a terrain like 'terrain.png' in minecraft.jar, and then add the item overthere. look up the iconIndex (start counting from zero to 256) untill you hit the item, and the number is your iconIndex. I hope I helped you
August 24, 201213 yr build #400 what is the last number in the forge zip you downloaded, I.E, 4.0.0.217 thats the version i'm using untill later
August 24, 201213 yr 1 word, update also in your mod_ file you preload the items.png but in your item file you use item.png you either missed the 's' in the item or you added an 's' when you preloaded it
August 24, 201213 yr Author build #400 now its included in Item.java or Block.java. the only problem, is your using 'return "/mods/item.png";' your returning only the ingot. you need a terrain like 'terrain.png' in minecraft.jar, and then add the item overthere. look up the iconIndex (start counting from zero to 256) untill you hit the item, and the number is your iconIndex. I hope I helped you terrain like terrain.png............. Do you mean this: or this: ? And I already try this too: but the ingot is invisible, and I'm using iconIndex 102, which is the place of the ingot
August 25, 201213 yr build #400 now its included in Item.java or Block.java. the only problem, is your using 'return "/mods/item.png";' your returning only the ingot. you need a terrain like 'terrain.png' in minecraft.jar, and then add the item overthere. look up the iconIndex (start counting from zero to 256) untill you hit the item, and the number is your iconIndex. I hope I helped you terrain like terrain.png............. Do you mean this: or this: ? And I already try this too: but the ingot is invisible, and I'm using iconIndex 102, which is the place of the ingot instaed of setIconIndex use setIconCoord(7, 6) for the above items.png
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.