--- a/net/minecraft/world/level/block/entity/TileEntityContainer.java
+++ b/net/minecraft/world/level/block/entity/TileEntityContainer.java
@@ -89,4 +89,12 @@
     }
 
     protected abstract Container createMenu(int i, PlayerInventory playerinventory);
+
+    // CraftBukkit start
+    @Override
+    public org.bukkit.Location getLocation() {
+        if (level == null) return null;
+        return new org.bukkit.Location(level.getWorld(), worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
+    }
+    // CraftBukkit end
 }
