mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-23 08:59:27 +00:00
修复无物品
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user