diff --git a/nms-patches/EntityItemFrame.patch b/nms-patches/EntityItemFrame.patch index 13cff21e36..3c5c54278c 100644 --- a/nms-patches/EntityItemFrame.patch +++ b/nms-patches/EntityItemFrame.patch @@ -1,5 +1,14 @@ --- a/net/minecraft/server/EntityItemFrame.java +++ b/net/minecraft/server/EntityItemFrame.java +@@ -11,7 +11,7 @@ + private static final DataWatcherObject ITEM = DataWatcher.a(EntityItemFrame.class, DataWatcherRegistry.g); + private static final DataWatcherObject g = DataWatcher.a(EntityItemFrame.class, DataWatcherRegistry.b); + private float an = 1.0F; +- private boolean ao; ++ public boolean ao; // PAIL private -> public // PAIL rename isFixed + + public EntityItemFrame(EntityTypes entitytypes, World world) { + super(entitytypes, world); @@ -53,16 +53,27 @@ @Override protected void updateBoundingBox() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index 2873ff9d1f..79d443abb7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -128,6 +128,26 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { } } + @Override + public boolean isVisible() { + return !getHandle().isInvisible(); + } + + @Override + public void setVisible(boolean visible) { + getHandle().setInvisible(!visible); + } + + @Override + public boolean isFixed() { + return getHandle().ao; + } + + @Override + public void setFixed(boolean fixed) { + getHandle().ao = fixed; + } + @Override public EntityItemFrame getHandle() { return (EntityItemFrame) entity;