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

Update BukkitServerPlayer.java

This commit is contained in:
XiaoMoMi
2025-04-14 22:43:42 +08:00
parent 297590b183
commit e33a63d19e

View File

@@ -139,7 +139,7 @@ public class BukkitServerPlayer extends Player {
@Override
public boolean canBreak(BlockPos pos) {
Item<ItemStack> stackItem = getItemInHand(InteractionHand.MAIN_HAND);
Object itemStack = stackItem == null ? Reflections.instance$ItemStack$EMPTY : stackItem.getItem();
Object itemStack = stackItem == null ? Reflections.instance$ItemStack$EMPTY : stackItem.getLiteralObject();
Object blockPos = LocationUtils.toBlockPos(pos);
try {
Object blockInWorld = Reflections.constructor$BlockInWorld.newInstance(level().serverWorld(), blockPos, false);