9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 12:29:15 +00:00

fix(block): 修复细节

This commit is contained in:
jhqwqmc
2025-06-19 10:41:38 +08:00
parent 247bbda4eb
commit ef14147a0a

View File

@@ -192,10 +192,11 @@ public class DoorBlockBehavior extends BukkitBlockBehavior {
@Override
public InteractionResult useOnBlock(UseOnContext context, ImmutableBlockState state) {
if (!this.canOpenWithHand) {
if (!this.canOpenWithHand || context.getPlayer().isSecondaryUseActive()) {
return InteractionResult.PASS;
}
setOpen(context.getPlayer(), context.getLevel().serverWorld(), state, context.getClickedPos(), !state.get(this.openProperty));
return InteractionResult.SUCCESS;
return InteractionResult.SUCCESS_AND_CANCEL;
}
@Override