From 67f15266dae4d2963d5351fb20f40de63acd721e Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Wed, 10 Jul 2013 20:25:34 -0400 Subject: [PATCH] Return inGround when checking Arrow's OnGround state. Fixes BUKKIT-4439 --- src/main/java/net/minecraft/server/EntityArrow.java | 6 ++++++ .../java/org/bukkit/craftbukkit/entity/CraftEntity.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index 65e7a88fa8..a4766c5ece 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -444,4 +444,10 @@ public class EntityArrow extends Entity implements IProjectile { return (b0 & 1) != 0; } + + // CraftBukkit start + public boolean isInGround() { + return inGround; + } + // CraftBukkit end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 4aec8e9e2b..8e2e5cda2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -184,6 +184,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } public boolean isOnGround() { + if (entity instanceof EntityArrow) { + return ((EntityArrow) entity).isInGround(); + } return entity.onGround; }