mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-26 14:33:50 +00:00
Fix: Prevent broken tools from being able to create EFR stripped logs or dirt paths (#226)
This commit is contained in:
1 parent
19118d7c26
commit
17a8936da7
1 file changed
+6
-1
@@ -98,7 +98,12 @@ public abstract class HarvestTool extends ToolCore {
|
||||
public Set<String> getToolClasses(ItemStack stack) {
|
||||
Set<String> set = new HashSet<>();
|
||||
|
||||
if (stack != null && stack.getItem() instanceof HarvestTool) {
|
||||
if (stack != null && stack.hasTagCompound() && stack.getItem() instanceof HarvestTool) {
|
||||
|
||||
// Broken tools are not considered as valid for tool classes
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
if (tags == null || tags.getBoolean("Broken")) return set;
|
||||
|
||||
set.add(((HarvestTool) stack.getItem()).getHarvestType());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user