From 9ba0e69541c245b54072dd29d69cf5430b1dbbc8 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Tue, 10 Mar 2015 00:38:40 +0100 Subject: [PATCH] Rightclick on tools without function now also allows you to throw shuriken in addition to splash potions! --- src/main/java/tconstruct/library/tools/ToolCore.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java index 45ae2c9b..c7bb6f9e 100644 --- a/src/main/java/tconstruct/library/tools/ToolCore.java +++ b/src/main/java/tconstruct/library/tools/ToolCore.java @@ -23,6 +23,7 @@ import tconstruct.library.util.TextureHelper; import tconstruct.tools.TinkerTools; import tconstruct.tools.entity.FancyEntityItem; import tconstruct.util.config.PHConstruct; +import tconstruct.weaponry.TinkerWeaponry; /** * NBTTags Main tag - InfiTool @@ -714,6 +715,11 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IEq player.inventory.setInventorySlotContents(itemSlot, null); } } + + // throw shurikens! + if(item != null && item == TinkerWeaponry.shuriken) { + item.onItemRightClick(nearbyStack, world, player); + } } } return stack;