Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Fix bowstring (and possibly other toolparts) not having a tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Aug 3, 2014
1 parent 0b3bb7c commit cbe3579
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -7,6 +7,7 @@
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.tools.ToolCore;
import tconstruct.library.util.IToolPart;
import tconstruct.tools.items.ToolPart;

public class PartToolTipHandler {
Expand All @@ -17,11 +18,11 @@ public void onItemToolTip(ItemTooltipEvent event) {
return;

// we're only interested if it's a tool part
if(!(event.itemStack.getItem() instanceof ToolPart))
if(!(event.itemStack.getItem() instanceof IToolPart))
return;

ItemStack stack = event.itemStack;
ToolPart part = (ToolPart)stack.getItem();
IToolPart part = (IToolPart)stack.getItem();

// stone part?
if(Config.disableStoneTools && TConstructRegistry.getMaterial(part.getMaterialID(stack)) == TConstructRegistry.getMaterial("Stone"))
Expand Down

0 comments on commit cbe3579

Please sign in to comment.