File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/gregtech/common/metatileentities/multi/multiblockpart Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ public void update() {
119119 }
120120 // Only attempt to auto collapse the inventory contents once the bus has been notified
121121 if (isAutoCollapse ()) {
122- IItemHandlerModifiable inventory = (isExportHatch ? this .getExportItems () : this .getImportItems ());
122+ // Exclude the ghost circuit inventory from the auto collapse, so it does not extract any ghost circuits from the slot
123+ IItemHandlerModifiable inventory = (isExportHatch ? this .getExportItems () : super .getImportItems ());
123124 if (isExportHatch ? this .getNotifiedItemOutputList ().contains (inventory ) : this .getNotifiedItemInputList ().contains (inventory )) {
124125 collapseInventorySlotContents (inventory );
125126 }
@@ -360,6 +361,13 @@ public boolean isAutoCollapse() {
360361 public void setAutoCollapse (boolean inverted ) {
361362 autoCollapse = inverted ;
362363 if (!getWorld ().isRemote ) {
364+ if (autoCollapse ) {
365+ if (isExportHatch ) {
366+ addNotifiedOutput (this .getExportItems ());
367+ } else {
368+ addNotifiedInput (super .getImportItems ());
369+ }
370+ }
363371 writeCustomData (GregtechDataCodes .TOGGLE_COLLAPSE_ITEMS , packetBuffer -> packetBuffer .writeBoolean (autoCollapse ));
364372 notifyBlockUpdate ();
365373 markDirty ();
You can’t perform that action at this time.
0 commit comments