9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-23 08:59:27 +00:00

修复无物品

This commit is contained in:
XiaoMoMi
2025-05-31 18:20:22 +08:00
parent 67adb323ef
commit 11b4390e96

View File

@@ -297,6 +297,7 @@ public class InteractUtils {
}
public static boolean willConsume(Player player, BlockData state, BlockHitResult hit, Item<ItemStack> item) {
if (item == null) return false;
Key blockType = BlockStateUtils.getBlockOwnerIdFromData(state);
if (WILL_CONSUME.containsKey(blockType)) {
return WILL_CONSUME.get(blockType).apply(player, item, state, hit);