修复加特林右键开火bug
This commit is contained in:
parent
7d36f3b7ca
commit
75e6476056
1 changed files with 2 additions and 2 deletions
|
@ -264,14 +264,14 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
||||||
this.level().addFreshEntity(flareDecoyEntity);
|
this.level().addFreshEntity(flareDecoyEntity);
|
||||||
}
|
}
|
||||||
this.level().playSound(null, this, ModSounds.DECOY_FIRE.get(), this.getSoundSource(), 1, 1);
|
this.level().playSound(null, this, ModSounds.DECOY_FIRE.get(), this.getSoundSource(), 1, 1);
|
||||||
if (this.getEntityData().get(DECOY_COUNT) == 3) {
|
if (this.getEntityData().get(DECOY_COUNT) == 4) {
|
||||||
decoyReloadCoolDown = 300;
|
decoyReloadCoolDown = 300;
|
||||||
}
|
}
|
||||||
this.getEntityData().set(DECOY_COUNT, this.getEntityData().get(DECOY_COUNT) - 1);
|
this.getEntityData().set(DECOY_COUNT, this.getEntityData().get(DECOY_COUNT) - 1);
|
||||||
}
|
}
|
||||||
decoyInputDown = false;
|
decoyInputDown = false;
|
||||||
}
|
}
|
||||||
if (this.entityData.get(DECOY_COUNT) < 3 && decoyReloadCoolDown == 0 && this.level() instanceof ServerLevel) {
|
if (this.entityData.get(DECOY_COUNT) < 4 && decoyReloadCoolDown == 0 && this.level() instanceof ServerLevel) {
|
||||||
this.entityData.set(DECOY_COUNT, this.entityData.get(DECOY_COUNT) + 1);
|
this.entityData.set(DECOY_COUNT, this.entityData.get(DECOY_COUNT) + 1);
|
||||||
this.level().playSound(null, this, ModSounds.DECOY_RELOAD.get(), this.getSoundSource(), 1, 1);
|
this.level().playSound(null, this, ModSounds.DECOY_RELOAD.get(), this.getSoundSource(), 1, 1);
|
||||||
decoyReloadCoolDown = 300;
|
decoyReloadCoolDown = 300;
|
||||||
|
|
Loading…
Add table
Reference in a new issue