From 151cf48284d966afc244a80ce6d12f187032a939 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 22 May 2015 19:42:09 -0700 Subject: [PATCH] Default to BlockFace.SELF for null directions in getFacing By: Nathan Wolf --- .../main/java/org/bukkit/craftbukkit/entity/CraftHanging.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java index f9ce5ad333..411c023de1 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java @@ -49,7 +49,9 @@ public class CraftHanging extends CraftEntity implements Hanging { } public BlockFace getFacing() { - switch (this.getHandle().direction) { + EnumDirection direction = this.getHandle().direction; + if (direction == null) return BlockFace.SELF; + switch (direction) { case SOUTH: default: return BlockFace.SOUTH;