mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
Call EntityPushedByEntityAttackEvent for Mace AoE (#12257)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user