修复yx100炮弹转化bug

This commit is contained in:
Atsuihsio 2025-03-14 14:19:11 +08:00
parent cc719ea384
commit 2013ead664

View file

@ -713,7 +713,6 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
@Override @Override
public void changeWeapon(int index, int value, boolean isScroll) { public void changeWeapon(int index, int value, boolean isScroll) {
WeaponVehicleEntity.super.changeWeapon(index, value, isScroll);
if (index != 0) return; if (index != 0) return;
if (entityData.get(LOADED_AMMO) > 0) { if (entityData.get(LOADED_AMMO) > 0) {
@ -729,6 +728,8 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
var clientboundstopsoundpacket = new ClientboundStopSoundPacket(ModSounds.YX_100_RELOAD.get().getLocation(), SoundSource.PLAYERS); var clientboundstopsoundpacket = new ClientboundStopSoundPacket(ModSounds.YX_100_RELOAD.get().getLocation(), SoundSource.PLAYERS);
player.connection.send(clientboundstopsoundpacket); player.connection.send(clientboundstopsoundpacket);
} }
WeaponVehicleEntity.super.changeWeapon(index, value, isScroll);
} }
@Override @Override