SPIGOT-973: Add marker API to ArmorStand

This commit is contained in:
Nathan Wolf 2015-06-09 09:34:37 +10:00 committed by md_5
parent f4ecc39ffc
commit 1880a9c0b6
2 changed files with 30 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);
}
}