diff options
Diffstat (limited to 'patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch')
-rw-r--r-- | patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch b/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch index a6a405b429..30c6ae6beb 100644 --- a/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch +++ b/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch @@ -85,20 +85,20 @@ index e3dfef027fb7f6aedd3e3411af6457671b5507a7..88af8a11dfc3b645c5a2b5fb629a73fc } } diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java -index 312398b7f1281144a0529a743d2a09376d575ff5..f832000cb023ce873f4437b6f6db19a65916af4a 100644 +index a93212d3cbf18a8cf392515fd466475264bba5ef..347986ef559ebcecdb67e2f5d31a31049acc48f5 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java @@ -83,7 +83,7 @@ public class RamTarget extends Behavior<Goat> { - float f = 0.25F * (float)(i - j); + float f = 0.25F * (i - j); float g = Mth.clamp(entity.getSpeed() * 1.65F, 0.2F, 3.0F) + f; float h = livingEntity.isDamageSourceBlocked(world.damageSources().mobAttack(entity)) ? 0.5F : 1.0F; -- livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z()); -+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z(), entity, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent +- livingEntity.knockback(h * g * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z()); ++ livingEntity.knockback(h * g * this.getKnockbackForce.applyAsDouble(entity), this.ramDirection.x(), this.ramDirection.z(), entity, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent this.finishRam(world, entity); world.playSound(null, entity, this.getImpactSound.apply(entity), SoundSource.NEUTRAL, 1.0F, 1.0F); } else if (this.hasRammedHornBreakingBlock(world, entity)) { diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java -index c7ce058dda0dcb58197faea4f1799ebc580829c0..4f4c09cd7b75de38c0a3580386494e7e05f0acee 100644 +index ce329b00fa25e9defabead0e594d734b8ed6724e..fe9c5afadd9041ab32d9e03fe6dab2a2d00262f2 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/warden/SonicBoom.java @@ -81,7 +81,7 @@ public class SonicBoom extends Behavior<Warden> { @@ -166,13 +166,13 @@ index 041f1650b853138e4286fe83a08d79d276054ce7..aba20a4352d8983b01ab5d329187588f @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java -index 38c27b4aa37e8b046e3eccdde3f527eb555da6f8..05dee42941a842bf4bba9480a2c04a142541ac29 100644 +index 889dca53d7a113f0b70791c75885de1c66fecdff..06cb2a4a941ccdd7371f05f7c3c6951dc6c66b04 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/HoglinBase.java @@ -40,7 +40,7 @@ public interface HoglinBase { - double j = f * (double)(attacker.level().random.nextFloat() * 0.5F + 0.2F); + double j = f * (attacker.level().random.nextFloat() * 0.5F + 0.2F); Vec3 vec3 = new Vec3(g, 0.0, h).normalize().scale(j).yRot(i); - double k = f * (double)attacker.level().random.nextFloat() * 0.5; + double k = f * attacker.level().random.nextFloat() * 0.5; - target.push(vec3.x, k, vec3.z); + target.push(vec3.x, k, vec3.z, attacker); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent target.hurtMarked = true; |