Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
[Bleeding] Repair missing diff in Explosion. Fixes BUKKIT-5662
The blast protection enchantment dampers explosions, however the functionality was only added to block explosions, and not entity explosions.
Dieser Commit ist enthalten in:
Ursprung
5b9950b5f7
Commit
bed3f7f8f5
@ -168,10 +168,11 @@ public class Explosion {
|
|||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
entity.getBukkitEntity().setLastDamageCause(event);
|
entity.getBukkitEntity().setLastDamageCause(event);
|
||||||
entity.damageEntity(DamageSource.explosion(this), (float) event.getDamage());
|
entity.damageEntity(DamageSource.explosion(this), (float) event.getDamage());
|
||||||
|
double d11 = EnchantmentProtection.a(entity, d10);
|
||||||
|
|
||||||
entity.motX += d0 * d10;
|
entity.motX += d0 * d11;
|
||||||
entity.motY += d1 * d10;
|
entity.motY += d1 * d11;
|
||||||
entity.motZ += d2 * d10;
|
entity.motZ += d2 * d11;
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
this.l.put((EntityHuman) entity, Vec3D.a(d0 * d10, d1 * d10, d2 * d10));
|
this.l.put((EntityHuman) entity, Vec3D.a(d0 * d10, d1 * d10, d2 * d10));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren