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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user