From 9d04941b7f6c34f82c03fe307f43906b8767e84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Fri, 17 Jun 2016 09:45:18 +0200 Subject: [PATCH] Copper hoe --- src/java/mmm/tech/tools/TTHoe.java | 35 ++++++++++++++++++ src/java/mmm/tech/tools/TTToolSet.java | 3 ++ src/resources/assets/mmm/lang/en_US.lang | 1 + .../models/item/tech/tools/copper/hoe.json | 6 +++ .../textures/items/tech/tools/copper/hoe.png | Bin 0 -> 150 bytes 5 files changed, 45 insertions(+) create mode 100644 src/java/mmm/tech/tools/TTHoe.java create mode 100644 src/resources/assets/mmm/models/item/tech/tools/copper/hoe.json create mode 100644 src/resources/assets/mmm/textures/items/tech/tools/copper/hoe.png diff --git a/src/java/mmm/tech/tools/TTHoe.java b/src/java/mmm/tech/tools/TTHoe.java new file mode 100644 index 0000000..7a4f66c --- /dev/null +++ b/src/java/mmm/tech/tools/TTHoe.java @@ -0,0 +1,35 @@ +package mmm.tech.tools; + + +import mmm.utils.I_URecipeRegistrar; +import mmm.utils.URegistry; +import net.minecraft.init.Items; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; + + + +public class TTHoe + extends ItemHoe + implements I_URecipeRegistrar +{ + public TTHoe( final ToolMaterial material ) + { + super( material ); + URegistry.setIdentifiers( this , "tech" , "tools" , material.toString( ).toLowerCase( ) , "hoe" ); + } + + + @Override + public void registerRecipes( ) + { + GameRegistry.addShapedRecipe( new ItemStack( this ) , // + "II" , // + " S" , // + " S" , // + 'I' , this.theToolMaterial.getRepairItemStack( ) , // + 'S' , new ItemStack( Items.STICK ) ); + } + +} diff --git a/src/java/mmm/tech/tools/TTToolSet.java b/src/java/mmm/tech/tools/TTToolSet.java index 8f1835f..1d8f20c 100644 --- a/src/java/mmm/tech/tools/TTToolSet.java +++ b/src/java/mmm/tech/tools/TTToolSet.java @@ -5,6 +5,7 @@ import mmm.utils.URegistry; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemAxe; +import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; @@ -21,6 +22,7 @@ public class TTToolSet public final ItemSpade SHOVEL; public final ItemAxe AXE; public final ItemPickaxe PICKAXE; + public final ItemHoe HOE; public final ItemSword SWORD; @@ -36,6 +38,7 @@ public class TTToolSet URegistry.addItem( this.SHOVEL = new TTShovel( this.TOOL_MATERIAL ) ); URegistry.addItem( this.AXE = new TTAxe( this.TOOL_MATERIAL , axeDamage , axeSpeed ) ); URegistry.addItem( this.PICKAXE = new TTPickaxe( this.TOOL_MATERIAL ) ); + URegistry.addItem( this.HOE = new TTHoe( this.TOOL_MATERIAL ) ); URegistry.addItem( this.SWORD = new TTSword( this.TOOL_MATERIAL ) ); } diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index 319a280..a3d19ce 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -35,6 +35,7 @@ tile.mmm.materials.ore.cuprite.name=Cuprite Ore item.mmm.tech.tools.copper.shovel.name=Copper Shovel item.mmm.tech.tools.copper.axe.name=Copper Axe item.mmm.tech.tools.copper.pickaxe.name=Copper Pickaxe +item.mmm.tech.tools.copper.hoe.name=Copper Hoe item.mmm.tech.tools.copper.sword.name=Copper Sword item.mmm.tech.tools.copper.armor.feet.name=Copper Boots item.mmm.tech.tools.copper.armor.legs.name=Copper Leggings diff --git a/src/resources/assets/mmm/models/item/tech/tools/copper/hoe.json b/src/resources/assets/mmm/models/item/tech/tools/copper/hoe.json new file mode 100644 index 0000000..21b7f4d --- /dev/null +++ b/src/resources/assets/mmm/models/item/tech/tools/copper/hoe.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/tech/tools/copper/hoe" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/items/tech/tools/copper/hoe.png b/src/resources/assets/mmm/textures/items/tech/tools/copper/hoe.png new file mode 100644 index 0000000000000000000000000000000000000000..b1ed4d1a49444a6e78372cd8f52b2913449e6964 GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`v7RoDAr`&K2@6y|1PTA=Kb(?T zx1sRefA76N6MVKQD%9*U;>qh+KJ&$Y9(&76Jk63!hvvR~_22Z#4$pGl6KNB)9oi