载具banHand时不能使用指示器
This commit is contained in:
parent
86246f2cd9
commit
f8b463848c
1 changed files with 7 additions and 8 deletions
|
@ -365,6 +365,13 @@ public class ClickHandler {
|
|||
isEditing = false;
|
||||
if (player.hasEffect(ModMobEffects.SHOCK)) return;
|
||||
|
||||
if (player.getVehicle() instanceof WeaponVehicleEntity iVehicle && iVehicle.banHand(player)) {
|
||||
if (player.getVehicle() instanceof VehicleEntity pVehicle && iVehicle.hasWeapon(pVehicle.getSeatIndex(player))) {
|
||||
ClientEventHandler.holdFireVehicle = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (stack.is(ModItems.ARTILLERY_INDICATOR.get())) {
|
||||
ClientEventHandler.holdFire = true;
|
||||
}
|
||||
|
@ -377,14 +384,6 @@ public class ClickHandler {
|
|||
PacketDistributor.sendToServer(new DroneFireMessage(0));
|
||||
}
|
||||
|
||||
|
||||
if (player.getVehicle() instanceof WeaponVehicleEntity iVehicle && iVehicle.banHand(player)) {
|
||||
if (player.getVehicle() instanceof VehicleEntity pVehicle && iVehicle.hasWeapon(pVehicle.getSeatIndex(player))) {
|
||||
ClientEventHandler.holdFireVehicle = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (stack.is(ModItems.LUNGE_MINE.get())) {
|
||||
ClientEventHandler.holdFire = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue