From edcd4ced4b65a29b0ed9abfdba7fb230ddedff66 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 9 Jun 2015 09:34:37 +1000 Subject: [PATCH] SPIGOT-973: Add marker API to ArmorStand By: Nathan Wolf --- .../nms-patches/EntityArmorStand.patch | 18 ++++++++++++++++++ .../craftbukkit/entity/CraftArmorStand.java | 12 ++++++++++++ 2 files changed, 30 insertions(+) diff --git a/paper-server/nms-patches/EntityArmorStand.patch b/paper-server/nms-patches/EntityArmorStand.patch index 338421d899..d7b6f74cb3 100644 --- a/paper-server/nms-patches/EntityArmorStand.patch +++ b/paper-server/nms-patches/EntityArmorStand.patch @@ -51,3 +51,21 @@ if (this.world.isClientSide) { return false; } else if (DamageSource.OUT_OF_WORLD.equals(damagesource)) { +@@ -616,7 +646,8 @@ + return (this.datawatcher.getByte(10) & 8) != 0; + } + +- private void n(boolean flag) { ++ // PAIL ++ public void n(boolean flag) { // CraftBukkit - public + byte b0 = this.datawatcher.getByte(10); + + if (flag) { +@@ -628,6 +659,7 @@ + this.datawatcher.watch(10, Byte.valueOf(b0)); + } + ++ // PAIL + public boolean s() { + return (this.datawatcher.getByte(10) & 16) != 0; + } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index 741b765464..09443fe148 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -204,4 +204,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { (float) Math.toDegrees(old.getZ()) ); } + + @Override + public boolean isMarker() { + // PAIL + return getHandle().s(); + } + + @Override + public void setMarker(boolean marker) { + // PAIL + getHandle().n(marker); + } }