--- a/net/minecraft/world/inventory/ContainerLevelAccess.java
+++ b/net/minecraft/world/inventory/ContainerLevelAccess.java
@@ -12,6 +_,12 @@
         public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> levelPosConsumer) {
             return Optional.empty();
         }
+        // Paper start - fix menus with empty level accesses
+        @Override
+        public org.bukkit.Location getLocation() {
+            return null;
+        }
+        // Paper end - fix menus with empty level accesses
     };
 
     static ContainerLevelAccess create(final Level level, final BlockPos pos) {
@@ -20,6 +_,23 @@
             public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> levelPosConsumer) {
                 return Optional.of(levelPosConsumer.apply(level, pos));
             }
+            // CraftBukkit start
+            @Override
+            public Level getWorld() {
+                return level;
+            }
+
+            @Override
+            public BlockPos getPosition() {
+                return pos;
+            }
+            // CraftBukkit end
+            // Paper start - Add missing InventoryHolders
+            @Override
+            public boolean isBlock() {
+                return true;
+            }
+            // Paper end - Add missing InventoryHolders
         };
     }
 
@@ -35,4 +_,29 @@
             return Optional.empty();
         });
     }
+    // CraftBukkit start
+    default Level getWorld() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    default BlockPos getPosition() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    default org.bukkit.Location getLocation() {
+        return org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.getPosition(), this.getWorld());
+    }
+    // CraftBukkit end
+    // Paper start - Add missing InventoryHolders
+    default boolean isBlock() {
+        return false;
+    }
+
+    default org.bukkit.inventory.@org.jetbrains.annotations.Nullable BlockInventoryHolder createBlockHolder(AbstractContainerMenu menu) {
+        if (!this.isBlock()) {
+            return null;
+        }
+        return new org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder(this, menu.getBukkitView().getTopInventory());
+    }
+    // Paper end - Add missing InventoryHolders
 }
