Jump to content

MrJPGames

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by MrJPGames

  1. Oke so I just updated to the newest minecraft forge version (4.2.5) and updated parts of my mod to work with it. Only problem there isn't any coded bug that eclipse can find and my minecraft keeps on craching. It has somthing to do with the mod's "instance" here is the bug report and the 2 mod files that have a instance MT_mod MF_mod Greets, MrJPGames
  2. I got it to work YEAH The thing i did wrong was to use new item and new itempickaxe etc. I now made my own item and itempickaxe etc so minecraft knows to use the textures and IT WORKS YEAH
  3. Sorry but I am very newby so I think I already got the getTextureFile code MoreToolsItem.java: public String getTextureFile() { return "/gui/MoreTools/items.png"; } So When I saw your post I thougt it may meant that I did need this line to the code of mod_MoreTools public static final Item DiamondNugget = (new Item(9000)).setItemName("Diamond Nugget").setIconIndex(44).getTextureFile("Gui/MoreTools/items.png"); But eclipe sayd this code was invaild so I removed it and tryed putting the code above This didn't make any errors in the code but still resulted in the same It poped up with ramdom textures from vannila minecraft. Sorry but I am used to modloader and don't directly get this forge stuff. This far I like it better but I realy hope you could give me the line I need to add to fix it. I looked in the wiki once more but that didn't work either The only time I saw getTextureFile was in the same place as in my code. Already thanks for the help so far I know it needs to be very annoying that I can't just understand this simple stuff!
  4. How do I add the function to tell minecraft to use the custum textures?
  5. Here is the code mod_MoreTools package net.minecraft.src; import java.util.Random; import net.minecraft.src.forge.*; public class mod_MoreTools extends BaseMod { public static final Item DiamondNugget = (new Item(9000)).setItemName("Diamond Nugget").setIconIndex(44); public static final Item DiamondStick = (new Item(9001)).setItemName("Diamond Stick").setIconIndex(10); public static final Item PickaxeWood = new ItemPickaxe (9002,EnumToolMaterial.DSTICKWOOD).setItemName("DiamondStickPickaxeWood").setIconIndex(86); public static final Item SpadeWood = new ItemSpade (9003,EnumToolMaterial.DSTICKWOOD).setItemName("DiamondStickSpadeWood").setIconIndex(3); public static final Item SwordWood = new ItemSword (9004,EnumToolMaterial.DSTICKWOOD).setItemName("DiamondStickSwordWood").setIconIndex(9); public static final Item AxeWood = new ItemAxe (9005,EnumToolMaterial.DSTICKWOOD).setItemName("DiamondStickAxeWood").setIconIndex(55); public static final Item HoeWood = new ItemHoe (9006,EnumToolMaterial.DSTICKWOOD).setItemName("DiamondStickHoeWood").setIconIndex(65); public static final Item PickaxeStone = new ItemPickaxe (9007,EnumToolMaterial.DSTICKSTONE).setItemName("DiamondStickPickaxeStone").setIconIndex(85); public static final Item SpadeStone = new ItemSpade (9008,EnumToolMaterial.DSTICKSTONE).setItemName("DiamondStickSpadeStone").setIconIndex(95); public static final Item SwordStone = new ItemSword (9009,EnumToolMaterial.DSTICKSTONE).setItemName("DiamondStickSwordStone").setIconIndex(; public static final Item AxeStone = new ItemAxe (9010,EnumToolMaterial.DSTICKSTONE).setItemName("DiamondStickAxeStone").setIconIndex(54); public static final Item HoeStone = new ItemHoe (9011,EnumToolMaterial.DSTICKSTONE).setItemName("DiamondStickHoeStone").setIconIndex(64); public static final Item PickaxeIron = new ItemPickaxe (9012,EnumToolMaterial.DSTICKIRON).setItemName("DiamondStickPickaxeIron").setIconIndex(80); public static final Item SpadeIron = new ItemSpade (9013,EnumToolMaterial.DSTICKIRON).setItemName("DiamondStickSpadeIron").setIconIndex(90); public static final Item SwordIron = new ItemSword (9014,EnumToolMaterial.DSTICKIRON).setItemName("DiamondStickSwordIron").setIconIndex(2); public static final Item AxeIron = new ItemAxe (9015,EnumToolMaterial.DSTICKIRON).setItemName("DiamondStickAxeIron").setIconIndex(49); public static final Item HoeIron = new ItemHoe (9016,EnumToolMaterial.DSTICKIRON).setItemName("DiamondStickHoeIron").setIconIndex(59); public static final Item PickaxeGold = new ItemPickaxe (9017,EnumToolMaterial.DSTICKGOLD).setItemName("DiamondStickPickaxeGold").setIconIndex(79); public static final Item SpadeGold = new ItemSpade (9018,EnumToolMaterial.DSTICKGOLD).setItemName("DiamondStickSpadeGold").setIconIndex(89); public static final Item SwordGold = new ItemSword (9019,EnumToolMaterial.DSTICKGOLD).setItemName("DiamondStickSwordGold").setIconIndex(1); public static final Item AxeGold = new ItemAxe (9020,EnumToolMaterial.DSTICKGOLD).setItemName("DiamondStickAxeGold").setIconIndex(48); public static final Item HoeGold = new ItemHoe (9021,EnumToolMaterial.DSTICKGOLD).setItemName("DiamondStickHoeGold").setIconIndex(58); public static final Item PickaxeDiamond = new ItemPickaxe (9022,EnumToolMaterial.DSTICKEMERALD).setItemName("DiamondStickPickaxeDiamond").setIconIndex(77); public static final Item SpadeDiamond = new ItemSpade (9023,EnumToolMaterial.DSTICKEMERALD).setItemName("DiamondStickSpadeDiamond").setIconIndex(87); public static final Item SwordDiamond = new ItemSword (9024,EnumToolMaterial.DSTICKEMERALD).setItemName("DiamondStickSwordDiamond").setIconIndex(99); public static final Item AxeDiamond = new ItemAxe (9025,EnumToolMaterial.DSTICKEMERALD).setItemName("DiamondStickAxeDiamond").setIconIndex(46); public static final Item HoeDiamond = new ItemHoe (9026,EnumToolMaterial.DSTICKEMERALD).setItemName("DiamondStickHoeDiamond").setIconIndex(56); public static final Item PickaxeObsidian = new ItemPickaxe (9027,EnumToolMaterial.OBSIDIAN).setItemName("PickaxeObsidian").setIconIndex(19); public static final Item AxeObsidian = new ItemAxe (9028,EnumToolMaterial.OBSIDIAN).setItemName("AxeObsidian").setIconIndex(17); public static final Item SpadeObsidian = new ItemSpade (9029,EnumToolMaterial.OBSIDIAN).setItemName("SpadeObsidian").setIconIndex(20); public static final Item HoeObsidian = new ItemHoe (9030,EnumToolMaterial.OBSIDIAN).setItemName("HoeObsidian").setIconIndex(18); public static final Item SwordObsidian = new ItemSword (9031,EnumToolMaterial.OBSIDIAN).setItemName("SwordObsidian").setIconIndex(21); public static final Item DSPickaxeObsidian = new ItemPickaxe (9032,EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DiamondStickPickaxeObsidian").setIconIndex(82); public static final Item DSAxeObsidian = new ItemAxe (9033,EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DiamondStickAxeObsidian").setIconIndex(51); public static final Item DSSpadeObsidian = new ItemSpade (9034,EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DiamondStickSpadeObsidian").setIconIndex(92); public static final Item DSHoeObsidian = new ItemHoe (9035,EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DiamondStickHoeObsidian").setIconIndex(61); public static final Item DSSwordObsidian = new ItemSword (9036,EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DiamondStickSwordObsidian").setIconIndex(4); public static final Item PickaxeLapis = new ItemPickaxe (9037,EnumToolMaterial.LAPIS).setItemName("PickaxeLapis").setIconIndex(14); public static final Item AxeLapis = new ItemAxe (9038,EnumToolMaterial.LAPIS).setItemName("AxeLapis").setIconIndex(12); public static final Item HoeLapis = new ItemHoe (9039,EnumToolMaterial.LAPIS).setItemName("HoeLapis").setIconIndex(13); public static final Item SpadeLapis = new ItemSpade (9040,EnumToolMaterial.LAPIS).setItemName("SpadeLapis").setIconIndex(15); public static final Item SwordLapis = new ItemSword (9041,EnumToolMaterial.LAPIS).setItemName("SwordLapis").setIconIndex(16); public static final Item DSPickaxeLapis = new ItemPickaxe (9042,EnumToolMaterial.DSTICKLAPIS).setItemName("DiamondStickPickaxeLapis").setIconIndex(81); public static final Item DSAxeLapis = new ItemAxe (9043,EnumToolMaterial.DSTICKLAPIS).setItemName("DiamondStickAxeLapis").setIconIndex(50); public static final Item DSSpadeLapis = new ItemSpade (9044,EnumToolMaterial.DSTICKLAPIS).setItemName("DiamondStickSpadeLapis").setIconIndex(91); public static final Item DSHoeLapis = new ItemHoe (9045,EnumToolMaterial.DSTICKLAPIS).setItemName("DiamondStickHoeLapis").setIconIndex(60); public static final Item DSSwordLapis = new ItemSword (9046,EnumToolMaterial.DSTICKLAPIS).setItemName("DiamondStickSwordLapis").setIconIndex(3); public static final Item PickaxeSandstone = new ItemPickaxe (9047,EnumToolMaterial.SANDSTONE).setItemName("PickaxeSandstone").setIconIndex(39); public static final Item AxeSandstone = new ItemAxe (9048,EnumToolMaterial.SANDSTONE).setItemName("AxeSandstone").setIconIndex(37); public static final Item SpadeSandstone = new ItemSpade (9049,EnumToolMaterial.SANDSTONE).setItemName("SpadeSandstone").setIconIndex(40); public static final Item HoeSandstone = new ItemHoe (9050,EnumToolMaterial.SANDSTONE).setItemName("HoeSandstone").setIconIndex(38); public static final Item SwordSandstone = new ItemSword (9051,EnumToolMaterial.SANDSTONE).setItemName("SwordSandstone").setIconIndex(41); public static final Item DSPickaxeSandstone = new ItemPickaxe (9052,EnumToolMaterial.DSTICKSANDSTONE).setItemName("DiamondStickPickaxeSandstone").setIconIndex(84); public static final Item DSAxeSandstone = new ItemAxe (9053,EnumToolMaterial.DSTICKSANDSTONE).setItemName("DiamondStickAxeSandstone").setIconIndex(53); public static final Item DSSpadeSandstone = new ItemSpade (9054,EnumToolMaterial.DSTICKSANDSTONE).setItemName("DiamondStickSpadeSandstone").setIconIndex(94); public static final Item DSHoeSandstone = new ItemHoe (9055,EnumToolMaterial.DSTICKSANDSTONE).setItemName("DiamondStickHoeSandstone").setIconIndex(63); public static final Item DSSwordSandstone = new ItemSword (9056,EnumToolMaterial.DSTICKSANDSTONE).setItemName("DiamondStickSwordSandstone").setIconIndex(7); public static final Item PickaxeDirt = new ItemPickaxe (9057,EnumToolMaterial.DIRT).setItemName("PickaxeDirt").setIconIndex(45); public static final Item AxeDirt = new ItemAxe (9058,EnumToolMaterial.DIRT).setItemName("AxeDirt").setIconIndex(42); public static final Item SpadeDirt = new ItemSpade (9059,EnumToolMaterial.DIRT).setItemName("SpadeDirt").setIconIndex(66); public static final Item HoeDirt = new ItemHoe (9060,EnumToolMaterial.DIRT).setItemName("HoeDirt").setIconIndex(43); public static final Item SwordDirt = new ItemSword (9061,EnumToolMaterial.DIRT).setItemName("Sworddirt").setIconIndex(11); public static final Item DSPickaxeDirt = new ItemPickaxe (9062,EnumToolMaterial.DSTICKDIRT).setItemName("DiamondStickPickaxeDirt").setIconIndex(78); public static final Item DSAxeDirt = new ItemAxe (9063,EnumToolMaterial.DSTICKDIRT).setItemName("DiamondStickAxeDirt").setIconIndex(47); public static final Item DSSpadeDirt = new ItemSpade (9064,EnumToolMaterial.DSTICKDIRT).setItemName("DiamondStickSpadeDirt").setIconIndex(88); public static final Item DSHoeDirt = new ItemHoe (9065,EnumToolMaterial.DSTICKDIRT).setItemName("DiamondStickHoeDirt").setIconIndex(57); public static final Item DSSwordDirt = new ItemSword (9066,EnumToolMaterial.DSTICKDIRT).setItemName("DiamondStickSwordDirt").setIconIndex(0); public static final Item PickaxeRedstone = new ItemPickaxe (9067,EnumToolMaterial.REDSTONE).setItemName("PickaxeRedstone").setIconIndex(34); public static final Item AxeRedstone = new ItemAxe (9068,EnumToolMaterial.REDSTONE).setItemName("AxeRedstone").setIconIndex(32); public static final Item SpadeRedstone = new ItemSpade (9069,EnumToolMaterial.REDSTONE).setItemName("SpadeRedstone").setIconIndex(35); public static final Item HoeRedstone = new ItemHoe (9070,EnumToolMaterial.REDSTONE).setItemName("HoeRedstone").setIconIndex(33); public static final Item SwordRedstone = new ItemSword (9071,EnumToolMaterial.REDSTONE).setItemName("SwordRedstone").setIconIndex(36); public static final Item DSPickaxeRedstone = new ItemPickaxe (9072,EnumToolMaterial.DSTICKREDSTONE).setItemName("DiamondStickPickaxeRedstone").setIconIndex(83); public static final Item DSAxeRedstone = new ItemAxe (9073,EnumToolMaterial.DSTICKREDSTONE).setItemName("DiamondStickAxeRedstone").setIconIndex(52); public static final Item DSSpadeRedstone = new ItemSpade (9074,EnumToolMaterial.DSTICKREDSTONE).setItemName("DiamondStickSpadeRedstone").setIconIndex(93); public static final Item DSHoeRedstone = new ItemHoe (9075,EnumToolMaterial.DSTICKREDSTONE).setItemName("DiamondStickHoeRedstone").setIconIndex(62); public static final Item DSSwordRedstone = new ItemSword (9076,EnumToolMaterial.DSTICKREDSTONE).setItemName("DiamondStickSwordRedstone").setIconIndex(6); public static final Item PaxelObsidian = new ItemPaxel(9078, EnumToolMaterial.OBSIDIAN).setItemName("PaxleObsidian").setIconIndex(27); public static final Item PaxelDiamond = new ItemPaxel(9079, EnumToolMaterial.EMERALD).setItemName("PaxleDiamond").setIconIndex(22); public static final Item PaxelGold = new ItemPaxel(9080, EnumToolMaterial.GOLD).setItemName("PaxleGold").setIconIndex(24); public static final Item PaxelIron = new ItemPaxel(9081, EnumToolMaterial.IRON).setItemName("PaxleIron").setIconIndex(25); public static final Item PaxelSandstone = new ItemPaxel(9082, EnumToolMaterial.SANDSTONE).setItemName("PaxleSandstone").setIconIndex(29); public static final Item PaxelRedstone = new ItemPaxel(9083, EnumToolMaterial.REDSTONE).setItemName("PaxleRedstone").setIconIndex(28); public static final Item PaxelLapis = new ItemPaxel(9084, EnumToolMaterial.LAPIS).setItemName("PaxleLapis").setIconIndex(26); public static final Item PaxelStone = new ItemPaxel(9085, EnumToolMaterial.STONE).setItemName("PaxleStone").setIconIndex(30); public static final Item PaxelWood = new ItemPaxel(9086, EnumToolMaterial.WOOD).setItemName("PaxleWood").setIconIndex(31); public static final Item PaxelDirt = new ItemPaxel(9087, EnumToolMaterial.DIRT).setItemName("PaxleDirt").setIconIndex(23); public static final Item DSPaxelObsidian = new ItemPaxel(9088, EnumToolMaterial.DSTICKOBSIDIAN).setItemName("DSPaxleObsidian").setIconIndex(72); public static final Item DSPaxelDiamond = new ItemPaxel(9089, EnumToolMaterial.DSTICKEMERALD).setItemName("DSPaxleDiamond").setIconIndex(67); public static final Item DSPaxelGold = new ItemPaxel(9090, EnumToolMaterial.DSTICKGOLD).setItemName("DSPaxleGold").setIconIndex(69); public static final Item DSPaxelIron = new ItemPaxel(9091, EnumToolMaterial.DSTICKIRON).setItemName("DSPaxleIron").setIconIndex(70); public static final Item DSPaxelSandstone = new ItemPaxel(9092, EnumToolMaterial.DSTICKSANDSTONE).setItemName("DSPaxleSandstone").setIconIndex(74); public static final Item DSPaxelRedstone = new ItemPaxel(9093, EnumToolMaterial.DSTICKREDSTONE).setItemName("DSPaxleRedstone").setIconIndex(73); public static final Item DSPaxelLapis = new ItemPaxel(9094, EnumToolMaterial.DSTICKLAPIS).setItemName("DSPaxleLapis").setIconIndex(71); public static final Item DSPaxelStone = new ItemPaxel(9095, EnumToolMaterial.DSTICKSTONE).setItemName("DSPaxleStone").setIconIndex(75); public static final Item DSPaxelWood = new ItemPaxel(9096, EnumToolMaterial.DSTICKWOOD).setItemName("DSPaxleWood").setIconIndex(76); public static final Item DSPaxelDirt = new ItemPaxel(9097, EnumToolMaterial.DSTICKDIRT).setItemName("DSPaxleDirt").setIconIndex(68); public static final Achievement ObsidianPickaxeAC = new Achievement(3030, "ObsidianPickaxe", 0, 6, mod_MoreTools.PickaxeObsidian, AchievementList.diamonds).setSpecial().registerAchievement(); public static final Achievement DiamondNuggetAC = new Achievement(3031, "DiamondNugget", -1, 3, DiamondNugget, AchievementList.diamonds).registerAchievement(); public static final Achievement DiamondStickAC = new Achievement(3032, "DiamondStick", -3, 3, DiamondStick, DiamondNuggetAC).registerAchievement(); public mod_MoreTools() { ModLoader.addName(DiamondStick, "Diamond Stick"); ModLoader.addName(DiamondNugget, "Diamond Nugget"); ModLoader.addName(PickaxeWood, "Diamond Stick Wooden Pickaxe"); ModLoader.addName(PickaxeStone, "Diamond Stick Stone Pickaxe"); ModLoader.addName(PickaxeIron, "Diamond Stick Iron Pickaxe"); ModLoader.addName(PickaxeGold, "Diamond Stick Gold Pickaxe"); ModLoader.addName(PickaxeDiamond, "Diamond Stick Diamond Pickaxe"); ModLoader.addName(SpadeWood, "Diamond Stick Wooden Shovel"); ModLoader.addName(SpadeStone, "Diamond Stick Stone Shovel"); ModLoader.addName(SpadeIron, "Diamond Stick Iron Shovel"); ModLoader.addName(SpadeGold, "Diamond Stick Gold Shovel"); ModLoader.addName(SpadeDiamond, "Diamond Stick Diamond Shovel"); ModLoader.addName(SwordWood, "Diamond Stick Wooden Sword"); ModLoader.addName(SwordStone, "Diamond Stick Stone Sword"); ModLoader.addName(SwordIron, "Diamond Stick Iron Sword"); ModLoader.addName(SwordGold, "Diamond Stick Gold Sword"); ModLoader.addName(SwordDiamond, "Diamond Stick Diamond Sword"); ModLoader.addName(AxeWood, "Diamond Stick Wooden Axe"); ModLoader.addName(AxeStone, "Diamond Stick Stone Axe"); ModLoader.addName(AxeIron, "Diamond Stick Iron Axe"); ModLoader.addName(AxeGold, "Diamond Stick Gold Axe"); ModLoader.addName(AxeDiamond, "Diamond Stick Diamond Axe"); ModLoader.addName(HoeWood, "Diamond Stick Wooden Hoe"); ModLoader.addName(HoeStone, "Diamond Stick Stone Hoe"); ModLoader.addName(HoeIron, "Diamond Stick Iron Hoe"); ModLoader.addName(HoeGold, "Diamond Stick Gold Hoe"); ModLoader.addName(HoeDiamond, "Diamond Stick Diamond Hoe"); ModLoader.addName(PickaxeObsidian, "Obsidian Pickaxe"); ModLoader.addName(AxeObsidian, "Obsidian Axe"); ModLoader.addName(HoeObsidian, "Obsidian Hoe"); ModLoader.addName(SpadeObsidian, "Obsidian Shovel"); ModLoader.addName(SwordObsidian, "Obsidian Sword"); ModLoader.addName(DSPickaxeObsidian, "Diamond Stick Obsidian Pickaxe"); ModLoader.addName(DSAxeObsidian, "Diamond StickObsidian Axe"); ModLoader.addName(DSHoeObsidian, "Diamond StickObsidian Hoe"); ModLoader.addName(DSSpadeObsidian, "Diamond Stick Obsidian Shovel"); ModLoader.addName(DSSwordObsidian, "Diamond Stick Obsidian Sword"); ModLoader.addName(PickaxeLapis, "Lapis Pickaxe"); ModLoader.addName(AxeLapis, "Lapis Axe"); ModLoader.addName(HoeLapis, "Lapis Hoe"); ModLoader.addName(SpadeLapis, "Lapis Shovel"); ModLoader.addName(SwordLapis, "Lapis Sword"); ModLoader.addName(PickaxeSandstone, "Sandstone Pickaxe"); ModLoader.addName(AxeSandstone, "Sandstone Axe"); ModLoader.addName(HoeSandstone, "Sandstone Hoe"); ModLoader.addName(SpadeSandstone, "Sandstone Shovel"); ModLoader.addName(SwordSandstone, "Sandstone Sword"); ModLoader.addName(DSPickaxeSandstone, "Diamond Stick Sandstone Pickaxe"); ModLoader.addName(DSAxeSandstone, "Diamond Stick Sandstone Axe"); ModLoader.addName(DSHoeSandstone, "Diamond Stick Sandstone Hoe"); ModLoader.addName(DSSpadeSandstone, "Diamond Stick Sandstone Shovel"); ModLoader.addName(DSSwordSandstone, "Diamond Stick Sandstone Sword"); ModLoader.addName(PickaxeDirt, "Dirt Pickaxe"); ModLoader.addName(AxeDirt, "Dirt Axe"); ModLoader.addName(HoeDirt, "Dirt Hoe"); ModLoader.addName(SpadeDirt, "Dirt Shovel"); ModLoader.addName(SwordDirt, "Dirt Sword"); ModLoader.addName(DSPickaxeDirt, "Diamond Stick Dirt Pickaxe"); ModLoader.addName(DSAxeDirt, "Diamond Stick Dirt Axe"); ModLoader.addName(DSHoeDirt, "Diamond Stick Dirt Hoe"); ModLoader.addName(DSSpadeDirt, "Diamond Stick Dirt Shovel"); ModLoader.addName(DSSwordDirt, "Diamond Stick Dirt Sword"); ModLoader.addName(DSPickaxeLapis, "Diamond Stick Lapis Pickaxe"); ModLoader.addName(DSAxeLapis, "Diamond Stick Lapis Axe"); ModLoader.addName(DSHoeLapis, "Diamond Stick Lapis Hoe"); ModLoader.addName(DSSpadeLapis, "Diamond Stick Lapis Shovel"); ModLoader.addName(DSSwordLapis, "Diamond Stick Lapis Sword"); ModLoader.addName(PickaxeRedstone, "Redstone Pickaxe"); ModLoader.addName(AxeRedstone, "Redstone Axe"); ModLoader.addName(HoeRedstone, "Redstone Hoe"); ModLoader.addName(SpadeRedstone, "Redstone Shovel"); ModLoader.addName(SwordRedstone, "Redstone Sword"); ModLoader.addName(DSPickaxeRedstone, "Diamond Stick Redstone Pickaxe"); ModLoader.addName(DSAxeRedstone, "Diamond Stick Redstone Axe"); ModLoader.addName(DSHoeRedstone, "Diamond Stick Redstone Hoe"); ModLoader.addName(DSSpadeRedstone, "Diamond Stick Redstone Shovel"); ModLoader.addName(DSSwordRedstone, "Diamond Stick Redstone Sword"); ModLoader.addRecipe(new ItemStack(PickaxeWood, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.planks, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeStone, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.cobblestone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeIron, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Item.ingotIron, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeGold, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Item.ingotGold, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeDiamond, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DiamondStick, 1), new Object[]{ "? ", "? ", Character.valueOf('?'), DiamondNugget, }); ModLoader.addRecipe(new ItemStack(SpadeWood, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.planks, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SpadeStone, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.cobblestone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SpadeIron, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Item.ingotIron, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SpadeGold, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Item.ingotGold, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SpadeDiamond, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SwordWood, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.planks, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SwordStone, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.cobblestone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SwordIron, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Item.ingotIron, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SwordGold, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Item.ingotGold, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(SwordDiamond, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DiamondNugget, 9), new Object[]{ "?", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(AxeWood, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.planks, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(AxeStone, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.cobblestone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(AxeIron, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Item.ingotIron, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(AxeGold, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Item.ingotGold, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(AxeDiamond, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(HoeWood, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.planks, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(HoeStone, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.cobblestone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(HoeIron, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Item.ingotIron, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(HoeGold, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Item.ingotGold, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(HoeDiamond, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Item.diamond, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(Item.diamond, 1), new Object[]{ "", "", "", Character.valueOf('?'), DiamondNugget, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeObsidian, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(AxeObsidian, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(HoeObsidian, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SpadeObsidian, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SwordObsidian, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(DSPickaxeObsidian, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSAxeObsidian, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSHoeObsidian, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSpadeObsidian, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSwordObsidian, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.obsidian, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeSandstone, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(AxeSandstone, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(HoeSandstone, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SpadeSandstone, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SwordSandstone, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(DSPickaxeSandstone, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSAxeSandstone, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSHoeSandstone, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSpadeSandstone, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSwordSandstone, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.sandStone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeDirt, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(AxeDirt, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(HoeDirt, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SpadeDirt, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SwordDirt, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(DSPickaxeDirt, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSAxeDirt, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSHoeDirt, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSpadeDirt, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSwordDirt, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Block.dirt, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(PickaxeRedstone, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(AxeRedstone, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(HoeRedstone, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SpadeRedstone, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(SwordRedstone, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), Item.stick, }); ModLoader.addRecipe(new ItemStack(DSPickaxeRedstone, 1), new Object[]{ "", " / ", " / ", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSAxeRedstone, 1), new Object[]{ "??", "?/", " /", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSHoeRedstone, 1), new Object[]{ "??", " /", " /", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSpadeRedstone, 1), new Object[]{ "?", "/", "/", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), DiamondStick, }); ModLoader.addRecipe(new ItemStack(DSSwordRedstone, 1), new Object[]{ "?", "?", "/", Character.valueOf('?'), Item.redstone, Character.valueOf('/'), DiamondStick, }); } public void takenFromCrafting(EntityPlayer entityplayer,ItemStack itemstack, IInventory iiventory) { if(itemstack.itemID == mod_MoreTools.PickaxeObsidian.shiftedIndex) { entityplayer.addStat(ObsidianPickaxeAC, 1); ModLoader.getMinecraftInstance().thePlayer.addStat(ObsidianPickaxeAC, 1); } { if(itemstack.itemID == mod_MoreTools.DiamondStick.shiftedIndex) { entityplayer.addStat(DiamondStickAC, 1); ModLoader.getMinecraftInstance().thePlayer.addStat(DiamondStickAC, 1); } } { if(itemstack.itemID == mod_MoreTools.DiamondNugget.shiftedIndex) { entityplayer.addStat(DiamondNuggetAC, 1); ModLoader.getMinecraftInstance().thePlayer.addStat(DiamondNuggetAC, 1); } } } public String Version() { return "1.2.5"; } @Override public String getVersion() { // TODO Auto-generated method stub return null; } @Override public void load() { MinecraftForgeClient.preloadTexture("/gui/MoreTools/items.png"); ModLoader.addAchievementDesc(ObsidianPickaxeAC, "Obsidian Upgrade!", "make an Obsidian Pickaxe"); ModLoader.addAchievementDesc(DiamondNuggetAC, "Diamond Nugget!", "Make a nugget out of a diamond"); ModLoader.addAchievementDesc(DiamondStickAC, "Diamond Stick!", "Make a Diamond Stick with Diamond nuggets"); } } ItemPaxel: package net.minecraft.src; public class ItemPaxel extends ItemTool { private static Block blocksEffectiveAgainst[]; public ItemPaxel(int par1, EnumToolMaterial par2EnumToolMaterial) { super(par1, 1, par2EnumToolMaterial, blocksEffectiveAgainst); } public boolean canHarvestBlock(Block par1Block) { if (par1Block == Block.obsidian) { return toolMaterial.getHarvestLevel() == 3; } if (par1Block == Block.blockDiamond || par1Block == Block.oreDiamond) { return toolMaterial.getHarvestLevel() >= 2; } if (par1Block == Block.blockGold || par1Block == Block.oreGold) { return toolMaterial.getHarvestLevel() >= 2; } if (par1Block == Block.blockSteel || par1Block == Block.oreIron) { return toolMaterial.getHarvestLevel() >= 1; } if (par1Block == Block.blockLapis || par1Block == Block.oreLapis) { return toolMaterial.getHarvestLevel() >= 1; } if (par1Block == Block.oreRedstone || par1Block == Block.oreRedstoneGlowing) { return toolMaterial.getHarvestLevel() >= 2; } if (par1Block.blockMaterial == Material.rock) { return true; } if (par1Block.blockMaterial == Material.iron) { return true; } if (par1Block == Block.snow) { return true; } return par1Block == Block.blockSnow; } public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { if (par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock)) { return efficiencyOnProperMaterial; } if (par2Block != null && par2Block.blockMaterial == Material.wood) { return efficiencyOnProperMaterial; } else { return super.getStrVsBlock(par1ItemStack, par2Block); } } static { blocksEffectiveAgainst = (new Block[] { Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium, Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stairDouble, Block.stairSingle, Block.pumpkin, Block.pumpkinLantern }); } } EnumToolMatirial package net.minecraft.src; public enum EnumToolMaterial { WOOD(0, 59, 2.0F, 0, 15), STONE(1, 131, 4F, 1, 5), IRON(2, 250, 6F, 2, 14), EMERALD(3, 1561, 8F, 3, 10), GOLD(0, 32, 12F, 0, 22), OBSIDIAN(3, 6244, 18F, 3, 30), SANDSTONE(1, 212, 5F, 1, 5), LAPIS(0, 132, 5F, 0, 15), DIRT(0, 1, 1F, 0, 1), REDSTONE(1, 160, 5F, 1, , DSTICKWOOD(0, 118, 2.0F, 1, 15), DSTICKSTONE(1, 262, 4F, 2, 5), DSTICKIRON(2, 500, 6F, 3, 14), DSTICKEMERALD(3, 3122, 8F, 4, 10), DSTICKGOLD(0, 64, 12F, 1, 22), DSTICKOBSIDIAN(3, 12488, 18F, 3, 15), DSTICKLAPIS(0, 264, 5F, 0, 15), DSTICKSANDSTONE(1, 424, 5F, 1, 5), DSTICKREDSTONE(1, 320, 5F, 1, , DSTICKDIRT(0, 3, 1F, 0, 1); /** * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD) */ private final int harvestLevel; /** * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32) */ private final int maxUses; /** * The strength of this tool material against blocks which it is effective against. */ private final float efficiencyOnProperMaterial; /** Damage versus entities. */ private final int damageVsEntity; /** Defines the natural enchantability factor of the material. */ private final int enchantability; private EnumToolMaterial(int par3, int par4, float par5, int par6, int par7) { harvestLevel = par3; maxUses = par4; efficiencyOnProperMaterial = par5; damageVsEntity = par6; enchantability = par7; } /** * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32) */ public int getMaxUses() { return maxUses; } /** * The strength of this tool material against blocks which it is effective against. */ public float getEfficiencyOnProperMaterial() { return efficiencyOnProperMaterial; } /** * Damage versus entities. */ public int getDamageVsEntity() { return damageVsEntity; } /** * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD) */ public int getHarvestLevel() { return harvestLevel; } /** * Return the natural enchantability factor of the material. */ public int getEnchantability() { return enchantability; } } MoreToolsItem: package net.minecraft.src; import net.minecraft.src.forge.*; public class MoreToolsItem extends Item implements ITextureProvider { public MoreToolsItem(int i) { super(i); } public String getTextureFile() { return "/gui/MoreTools/items.png"; } }
  6. He, I came to this API because of the function of infinite sprite indexes. I used modloader first but that woudn't accept a ton of sprites. So I steped over to Minecraft Forge. I looked up the wiki (http://minecraftforge.net/wiki/How_to_use_infinite_terrain_and_sprite_indexes) did all the steps but I couldn't get it to work. So i copyed all the finnished code into a fresh source made the terain.png and items.png in the correct DIR and tested it again but it still didn't. The only thing it did evry time was show the default icons of minecraft (in the firts I tried more than 1 Item so it showed the icon from /gui/items.png instead of the custom items) Does anyone know what I am doining wrong. In the code it says version 1.0.0 but that doesn't mean it for minecraft 1.0.0 and it says on top of the page 1.2.5 so it shoud work my code is down below and my latest quistion as well! [sorry for my bad english I am from the netherland]
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.