Entity Jump API
== AT == public net.minecraft.world.entity.LivingEntity jumping
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
public class Ravager extends Raider {
|
||||
|
||||
@@ -158,6 +161,11 @@
|
||||
@@ -158,12 +161,19 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -22,7 +22,15 @@
|
||||
flag = worldserver.destroyBlock(blockposition, true, this) || flag;
|
||||
}
|
||||
}
|
||||
@@ -281,7 +289,7 @@
|
||||
|
||||
if (!flag && this.onGround()) {
|
||||
+ if (new com.destroystokyo.paper.event.entity.EntityJumpEvent(getBukkitLivingEntity()).callEvent()) { // Paper - Entity Jump API
|
||||
this.jumpFromGround();
|
||||
+ } else { this.setJumping(false); } // Paper - Entity Jump API; setJumping(false) stops a potential loop
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +291,7 @@
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = Math.max(d0 * d0 + d1 * d1, 0.001D);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user