From 3274894625559cdff43ac2879233f03dd1a360df Mon Sep 17 00:00:00 2001 From: gigabit101 Date: Thu, 25 Feb 2016 14:16:08 +0000 Subject: [PATCH] Added hammer and some basic plate recipes --- src/main/java/techreborn/init/ModItems.java | 3 +++ src/main/java/techreborn/init/ModRecipes.java | 24 ++++++++++++++++++- .../techreborn/items/tools/ItemHammer.java | 5 ---- .../assets/techreborn/lang/en_US.lang | 1 + 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/main/java/techreborn/init/ModItems.java b/src/main/java/techreborn/init/ModItems.java index 13ccf194a..47923db4e 100644 --- a/src/main/java/techreborn/init/ModItems.java +++ b/src/main/java/techreborn/init/ModItems.java @@ -76,6 +76,7 @@ public class ModItems { public static Item ironDrill; public static Item diamondDrill; public static Item advancedDrill; + public static Item hammer; public static Item upgrades; @@ -136,6 +137,8 @@ public class ModItems { GameRegistry.registerItem(diamondDrill, "diamonddrill"); advancedDrill = PoweredItem.createItem(ItemAdvancedDrill.class); GameRegistry.registerItem(advancedDrill, "advanceddrill"); + hammer = new ItemHammer(100); + GameRegistry.registerItem(hammer, "hammer"); // upgrades = new ItemUpgrade(); // GameRegistry.registerItem(upgrades, "upgrades"); diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index 737b4fc69..8d685b23a 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -53,6 +53,7 @@ public class addReactorRecipes(); addIc2Recipes(); addGrinderRecipes(); + addHammerRecipes(); // DEBUG RecipeHandler.addRecipe(new ExtractorRecipe(new ItemStack(Items.diamond), new ItemStack(Blocks.dirt), 5, 20)); RecipeHandler.addRecipe(new CompressorRecipe(new ItemStack(Items.diamond), new ItemStack(Blocks.dirt), 5, 20)); @@ -73,6 +74,27 @@ public class RecipeHandler.addRecipe(new GrinderRecipe(BlockOre.getOreByName("Lead"), ItemDusts.getDustByName("lead", 2), 100, 20)); RecipeHandler.addRecipe(new GrinderRecipe(BlockOre.getOreByName("Silver"), ItemDusts.getDustByName("silver", 2), 100, 20)); + } + public static ItemStack hammerStack = new ItemStack(ModItems.hammer, 1, OreDictionary.WILDCARD_VALUE); + public static Item hammer = ModItems.hammer; + + static void addHammerRecipes(){ + CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.hammer), + "III", + " S ", + " S ", + 'S', Items.stick, + 'I', "ingotIron"); + + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("iron", 1), hammerStack, "ingotIron"); + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("copper", 1), hammerStack, "ingotCopper"); + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("tin", 1), hammerStack, "ingotTin"); + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("bronze", 1), hammerStack, "ingotBronze"); + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("brass", 1), hammerStack, "ingotBrass"); + CraftingHelper.addShapelessOreRecipe(ItemPlates.getPlateByName("steel", 1), hammerStack, "ingotSteel"); + + + hammer.setContainerItem(hammer); } static void addReactorRecipes(){ @@ -92,7 +114,7 @@ public class CraftingHelper.addShapedOreRecipe(BlockMachineFrame.getFrameByName("machine", 1), "AAA", "AXA", "AAA", - 'A', ItemPlates.getPlateByName("steel")); + 'A', ItemPlates.getPlateByName("iron")); CraftingHelper.addShapedOreRecipe(BlockStorage.getStorageBlockByName("sapphire"), "AAA", "AAA", "AAA", diff --git a/src/main/java/techreborn/items/tools/ItemHammer.java b/src/main/java/techreborn/items/tools/ItemHammer.java index c9102bd7a..4a882f87f 100644 --- a/src/main/java/techreborn/items/tools/ItemHammer.java +++ b/src/main/java/techreborn/items/tools/ItemHammer.java @@ -24,11 +24,6 @@ public class ItemHammer extends ItemTR implements ITexturedItem { return true; } -// @Override //TODO -// public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) { -// return false; -// } - @Override public ItemStack getContainerItem(ItemStack itemStack) { ItemStack copiedStack = itemStack.copy(); diff --git a/src/main/resources/assets/techreborn/lang/en_US.lang b/src/main/resources/assets/techreborn/lang/en_US.lang index c571a5892..b192534c2 100644 --- a/src/main/resources/assets/techreborn/lang/en_US.lang +++ b/src/main/resources/assets/techreborn/lang/en_US.lang @@ -596,6 +596,7 @@ item.techreborn.diamondDrill.name=Diamond Drill item.techreborn.advancedDrill.name=Advanced Drill item.techreborn.lapotronicorb.name=Lapotronic Energy Orb item.techreborn.cloakingdevice.name=Cloaking Device +item.techreborn.hammer.name=Iron Hammer #Buckets item.bucketberylium.name=Berylium Bucket