尝试修复部分情况下DPS发电机被击杀的问题

This commit is contained in:
Light_Quanta 2025-05-10 01:37:29 +08:00
parent 7b2d159410
commit b9c98c106d
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -119,6 +119,7 @@ public class DPSGeneratorEntity extends LivingEntity implements GeoEntity {
if (entity instanceof DPSGeneratorEntity generatorEntity) {
event.setCanceled(true);
generatorEntity.setHealth(0.00001F);
if (sourceEntity instanceof Player player) {
SoundTool.playLocalSound(player, ModSounds.TARGET_DOWN.get(), 1, 1);