Skip to content

Commit

Permalink
Fix being unable to insert items into Transmutation Interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Jun 5, 2024
1 parent 61edf50 commit d99922d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/gripe/_90/appliede/me/misc/EMCInterfaceLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ public class EMCInterfaceLogic implements IActionHost, IGridTickable, IUpgradeab
private final MEStorage localInvHandler;
private final GenericStack[] plannedWork;
private final IActionSource source = IActionSource.ofMachine(this);
private final UUID ownerUUID;

private final LazyOptional<IItemHandler> storageHolder;

@Nullable
private WrappedEMCStorage emcStorage;

private boolean hasConfig;
private UUID ownerUUID;

public EMCInterfaceLogic(IManagedGridNode node, EMCInterfaceLogicHost host, Item is) {
this(node, host, is, 9);
Expand All @@ -86,9 +86,6 @@ public EMCInterfaceLogic(IManagedGridNode node, EMCInterfaceLogicHost host, Item
storage.useRegisteredCapacities();

storageHolder = LazyOptional.of(() -> storage).lazyMap(GenericStackItemStorage::new);

var gridNode = mainNode.getNode();
ownerUUID = gridNode != null ? gridNode.getOwningPlayerProfileId() : null;
}

public ConfigInventory getConfig() {
Expand Down Expand Up @@ -122,7 +119,13 @@ private boolean storageFilter(AEKey what) {
}

if (ownerUUID == null) {
return false;
var uuid = node.getOwningPlayerProfileId();

if (uuid == null) {
return false;
}

ownerUUID = uuid;
}

var knowledge = grid.getService(KnowledgeService.class);
Expand Down

0 comments on commit d99922d

Please sign in to comment.