Entity Jump API

== AT ==
public net.minecraft.world.entity.LivingEntity jumping
This commit is contained in:
BillyGalbreath
2020-02-08 23:26:11 -06:00
parent 4e20691d59
commit 0dd8044178
4 changed files with 110 additions and 59 deletions

View File

@@ -993,4 +993,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand());
}
// Paper end - active item API
// Paper start - entity jump API
@Override
public boolean isJumping() {
return getHandle().jumping;
}
@Override
public void setJumping(boolean jumping) {
getHandle().setJumping(jumping);
if (jumping && getHandle() instanceof Mob) {
// this is needed to actually make a mob jump
((Mob) getHandle()).getJumpControl().jump();
}
}
// Paper end - entity jump API
}