mirror of
https://github.com/songoda/UltimateTimber.git
synced 2025-02-03 05:11:20 +01:00
Fixes Console-Spam when using axes
This commit is contained in:
parent
fc5e102e0c
commit
7479ed36b7
@ -324,7 +324,7 @@ public class TreeDefinitionManager extends Manager {
|
|||||||
|
|
||||||
for (TreeDefinition treeDefinition : this.treeDefinitions) {
|
for (TreeDefinition treeDefinition : this.treeDefinitions) {
|
||||||
if (treeDefinition.isRequiredAxe() || isGlobalAxeRequired()) {
|
if (treeDefinition.isRequiredAxe() || isGlobalAxeRequired()) {
|
||||||
if (new NBTItem(tool).hasKey(requiredAxeKey))
|
if (tool != null && !tool.getType().isAir() && new NBTItem(tool).hasKey(requiredAxeKey))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ public class TreeDefinitionManager extends Manager {
|
|||||||
|
|
||||||
// If the tree definition requires the custom axe, don't allow any other checks to pass.
|
// If the tree definition requires the custom axe, don't allow any other checks to pass.
|
||||||
if (treeDefinition.isRequiredAxe() || isGlobalAxeRequired()) {
|
if (treeDefinition.isRequiredAxe() || isGlobalAxeRequired()) {
|
||||||
return new NBTItem(tool).hasKey(requiredAxeKey);
|
return tool != null && !tool.getType().isAir() && new NBTItem(tool).hasKey(requiredAxeKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ItemStack requiredTool : treeDefinition.getRequiredTools())
|
for (ItemStack requiredTool : treeDefinition.getRequiredTools())
|
||||||
|
Loading…
Reference in New Issue
Block a user