mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +00:00
Prevent broken tools from exposing tool classes
This commit is contained in:
1 parent
c81d4cb1cc
commit
670fad7621
1 file changed
+5
@@ -99,6 +99,11 @@ public abstract class HarvestTool extends ToolCore {
|
||||
Set<String> set = new HashSet<>();
|
||||
|
||||
if (stack != null && stack.getItem() instanceof HarvestTool) {
|
||||
|
||||
// Broken tools are not considered as valid for tool classes
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
if (tags.getBoolean("Broken")) return set;
|
||||
|
||||
set.add(((HarvestTool) stack.getItem()).getHarvestType());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user