mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-25 00:07:36 +01:00
Call EntityPushedByEntityAttackEvent for Mace AoE (#12257)
This commit is contained in:
parent
102c8bbc54
commit
f0388e2f38
1 changed files with 9 additions and 0 deletions
|
@ -15,3 +15,12 @@
|
|||
ServerLevel serverLevel = (ServerLevel)attacker.level();
|
||||
attacker.setDeltaMovement(attacker.getDeltaMovement().with(Direction.Axis.Y, 0.01F));
|
||||
if (attacker instanceof ServerPlayer serverPlayer) {
|
||||
@@ -139,7 +_,7 @@
|
||||
double knockbackPower = getKnockbackPower(attacker, livingEntity, vec3);
|
||||
Vec3 vec31 = vec3.normalize().scale(knockbackPower);
|
||||
if (knockbackPower > 0.0) {
|
||||
- livingEntity.push(vec31.x, 0.7F, vec31.z);
|
||||
+ livingEntity.push(vec31.x, 0.7F, vec31.z, attacker); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
|
||||
if (livingEntity instanceof ServerPlayer serverPlayer) {
|
||||
serverPlayer.connection.send(new ClientboundSetEntityMotionPacket(serverPlayer));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue