File tree Expand file tree Collapse file tree
src/main/java/appeng/menu Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7878import appeng .menu .slot .DisabledSlot ;
7979import appeng .menu .slot .FakeSlot ;
8080import appeng .menu .slot .RestrictedInputSlot ;
81+ import appeng .parts .AEBasePart ;
8182import appeng .util .ConfigMenuInventory ;
8283
8384public abstract class AEBaseMenu extends AbstractContainerMenu {
@@ -324,6 +325,12 @@ public void broadcastChanges() {
324325 && this .blockEntity .getLevel ().getBlockEntity (this .blockEntity .getBlockPos ()) != this .blockEntity ) {
325326 this .setValidMenu (false );
326327 }
328+ if (this .part instanceof AEBasePart basePart ) {
329+ var host = basePart .getHost ();
330+ if (host == null || !host .isInWorld () || host .getPart (basePart .getSide ()) != basePart ) {
331+ setValidMenu (false );
332+ }
333+ }
327334
328335 if (dataSync .hasChanges ()) {
329336 sendPacketToClient (new GuiDataSyncPacket (containerId , dataSync ::writeUpdate , registryAccess ()));
You can’t perform that action at this time.
0 commit comments