Skip to content

Commit a16a08f

Browse files
committed
Fix ModelEngine ground-state lookup
Use the Bukkit entity API for on-ground detection because ModelEngine BaseEntity does not expose that method.
1 parent 550e8fb commit a16a08f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/ysm/modelengine/molang/MolangEvaluationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ float evaluate(IAnimationProperty property, MolangExpression expression) {
4949
float health = base == null ? 0.0F : base.getHealth();
5050
float maxHealth = base == null ? 0.0F : base.getMaxHealth();
5151
boolean alive = base == null || base.isAlive();
52-
boolean onGround = base != null && base.isOnGround();
52+
boolean onGround = entity != null && entity.isOnGround();
5353
boolean moving = base != null && base.isWalking();
5454
boolean flying = base != null && base.isFlying();
5555
boolean sneaking = entity instanceof LivingEntity living && living.isSneaking();

0 commit comments

Comments
 (0)