diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index 52d95cfb3e9..6cbc7ed3fb2 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -952,3 +952,6 @@ manual.page.material6=Material Trait: Reinforced manual.page.material7=Reinforced level manual.page.material8=Stonebound level manual.page.material9=Splintering level + +tool.glassarrows=Glass Arrows +tool.glassarrows.lore=Crafted by a legendary Glassmaker \ No newline at end of file diff --git a/src/main/java/tconstruct/items/tools/FryingPan.java b/src/main/java/tconstruct/items/tools/FryingPan.java index dd2a2df40fe..ce71cabf912 100644 --- a/src/main/java/tconstruct/items/tools/FryingPan.java +++ b/src/main/java/tconstruct/items/tools/FryingPan.java @@ -56,6 +56,7 @@ public void getSubItems (Item id, CreativeTabs tab, List list) ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 2), new ItemStack(getHandleItem(), 1, 16), null, "Bane of Pigs"); NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + tags.setBoolean("Special", true); tags.setInteger("Modifiers", 0); tags.setInteger("Attack", Integer.MAX_VALUE / 100); tags.setInteger("TotalDurability", Integer.MAX_VALUE / 100); diff --git a/src/main/java/tconstruct/items/tools/Hammer.java b/src/main/java/tconstruct/items/tools/Hammer.java index 031aebfda1a..57a6e1412ef 100644 --- a/src/main/java/tconstruct/items/tools/Hammer.java +++ b/src/main/java/tconstruct/items/tools/Hammer.java @@ -158,6 +158,7 @@ public void getSubItems (Item id, CreativeTabs tab, List list) ItemStack tool = ToolBuilder.instance.buildTool(new ItemStack(getHeadItem(), 1, 10), new ItemStack(getHandleItem(), 1, 8), new ItemStack(getAccessoryItem(), 1, 11), new ItemStack(getExtraItem(), 1, 11), "InfiMiner"); NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + tags.setBoolean("Special", true); tags.setInteger("Modifiers", 0); tags.setInteger("Attack", Integer.MAX_VALUE / 100); tags.setInteger("TotalDurability", Integer.MAX_VALUE / 100); diff --git a/src/main/java/tconstruct/weaponry/items/GlassArrows.java b/src/main/java/tconstruct/weaponry/items/GlassArrows.java index 9f85f0844af..c5146792ca0 100644 --- a/src/main/java/tconstruct/weaponry/items/GlassArrows.java +++ b/src/main/java/tconstruct/weaponry/items/GlassArrows.java @@ -2,10 +2,14 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import tconstruct.library.client.TConstructClientRegistry; import tconstruct.library.crafting.ToolBuilder; import tconstruct.util.Reference; @@ -25,20 +29,13 @@ public float getAmmoModifier() { return 1.0f; } - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { - super.addInformation(stack, player, list, par4); - - list.add(EnumChatFormatting.DARK_PURPLE + "Crafted by a legendary Glassmaker"); - } - @Override public void getSubItems(Item id, CreativeTabs tab, List list) { ItemStack headStack = new ItemStack(getHeadItem(), 1, 0); ItemStack handleStack = new ItemStack(getHandleItem(), 1, 0); // wooden shaft ItemStack accessoryStack = new ItemStack(getAccessoryItem(), 1, 0); // feather fletchling - ItemStack tool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, null, ""); + ItemStack tool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, null, this.getLocalizedToolName()); if (tool != null) { tool.getTagCompound().getCompoundTag("InfiTool").setBoolean("Built", true); @@ -48,6 +45,7 @@ public void getSubItems(Item id, CreativeTabs tab, List list) { // now turn it into legendary glass arrows! NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); + tags.setBoolean("Special", true); tags.setInteger("TotalDurability", 100); // 100 arrows tags.setInteger("Ammo", 100); // full ammo tags.setFloat("Mass", 5.0f); // durp @@ -56,6 +54,7 @@ public void getSubItems(Item id, CreativeTabs tab, List list) { tags.setFloat("Shoddy", 0); // no stonebound/jagged tags.setInteger("Unbreaking", 0); // no reinforced tags.setInteger("Attack", 10); // insane damage! + tags.setInteger("Modifiers", 0); // now make them look like glass tags.setInteger("RenderHead", -1); @@ -65,6 +64,11 @@ public void getSubItems(Item id, CreativeTabs tab, List list) { tags.setInteger("HandleColor", 0xbcfff3); tags.setInteger("AccessoryColor", 0xccfff3); + NBTTagList lore = new NBTTagList(); + lore.appendTag(new NBTTagString(StatCollector.translateToLocal("tool.glassarrows.lore"))); + + tool.getTagCompound().getCompoundTag("display").setTag("Lore", lore); + list.add(tool); } }