Add entity knockback events
- EntityKnockbackEvent - EntityPushedByEntityAttackEvent - EntityKnockbackByEntityEvent Co-authored-by: aerulion <aerulion@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
@@ -81,6 +81,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +441,7 @@
|
||||
double d3 = entity.getZ() - d1;
|
||||
double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D);
|
||||
|
||||
- entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D);
|
||||
+ entity.push(d2 / d4 * 4.0D, 0.20000000298023224D, d3 / d4 * 4.0D, this); // Paper - Add EntityKnockbackByEntityEvent and EntityPushedByEntityAttackEvent
|
||||
if (!this.phaseManager.getCurrentPhase().isSitting() && entityliving.getLastHurtByMobTimestamp() < entity.tickCount - 2) {
|
||||
DamageSource damagesource = this.damageSources().mobAttack(this);
|
||||
|
||||
@@ -458,6 +482,9 @@
|
||||
int j1 = Mth.floor(box.maxZ);
|
||||
boolean flag = false;
|
||||
|
||||
Reference in New Issue
Block a user