3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 13:30:05 +01:00

#740: Fix EntityDamageEvent not being called for non EntityDamageSource for End Crystals

Dieser Commit ist enthalten in:
DiamondDagger590 2020-08-28 18:41:34 +10:00 committet von md_5
Ursprung 3c7143e7b4
Commit 3f572834a6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: E8E901AC7C617C11

Datei anzeigen

@ -986,10 +986,6 @@ public class CraftEventFactory {
} }
public static boolean handleNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage, boolean cancelOnZeroDamage, boolean cancelled) { public static boolean handleNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage, boolean cancelOnZeroDamage, boolean cancelled) {
if (entity instanceof EntityEnderCrystal && !(source instanceof EntityDamageSource)) {
return false;
}
final EnumMap<DamageModifier, Double> modifiers = new EnumMap<DamageModifier, Double>(DamageModifier.class); final EnumMap<DamageModifier, Double> modifiers = new EnumMap<DamageModifier, Double>(DamageModifier.class);
final EnumMap<DamageModifier, Function<? super Double, Double>> functions = new EnumMap(DamageModifier.class); final EnumMap<DamageModifier, Function<? super Double, Double>> functions = new EnumMap(DamageModifier.class);