diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index 4cb611fd..5823da3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -1,11 +1,14 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityItemFrame; +import net.minecraft.server.WorldServer; import org.apache.commons.lang.Validate; import org.bukkit.Rotation; +import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.EntityType; import org.bukkit.entity.ItemFrame; @@ -15,6 +18,17 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { super(server, entity); } + public boolean setFacingDirection(BlockFace face, boolean force) { + if (!super.setFacingDirection(face, force)) { + return false; + } + + WorldServer world = ((CraftWorld) this.getWorld()).getHandle(); + world.getTracker().untrackEntity(this.getHandle()); + world.getTracker().track(this.getHandle()); + return true; + } + public void setItem(org.bukkit.inventory.ItemStack item) { if (item == null || item.getTypeId() == 0) { getHandle().getDataWatcher().a(2, 5); |