9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-25 09:59:20 +00:00

return if itemMeta is null

This commit is contained in:
XiaoMoMi
2024-07-10 16:42:30 +08:00
parent 64e49dbdeb
commit 366b221ba3

View File

@@ -827,7 +827,8 @@ public class ActionManagerImpl implements ActionManager {
return state -> {
if (Math.random() > chance) return;
ItemStack itemStack = state.getItemInHand();
if (itemStack.getItemMeta() == null)
return;
if (amount > 0) {
ItemUtils.increaseDurability(itemStack, amount);
} else {