diff --git a/src/main/java/gripe/_90/appliede/me/misc/EMCInterfaceLogic.java b/src/main/java/gripe/_90/appliede/me/misc/EMCInterfaceLogic.java index 061bf93..0663457 100644 --- a/src/main/java/gripe/_90/appliede/me/misc/EMCInterfaceLogic.java +++ b/src/main/java/gripe/_90/appliede/me/misc/EMCInterfaceLogic.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.Objects; -import java.util.UUID; import org.jetbrains.annotations.Nullable; @@ -62,7 +61,6 @@ public class EMCInterfaceLogic implements IActionHost, IGridTickable, IUpgradeab private WrappedEMCStorage emcStorage; private boolean hasConfig; - private UUID ownerUUID; public EMCInterfaceLogic(IManagedGridNode node, EMCInterfaceLogicHost host, Item is) { this(node, host, is, 9); @@ -118,21 +116,11 @@ private boolean storageFilter(AEKey what) { return true; } - if (ownerUUID == null) { - var uuid = node.getOwningPlayerProfileId(); - - if (uuid == null) { - return false; - } - - ownerUUID = uuid; - } - var knowledge = grid.getService(KnowledgeService.class); return knowledge.getKnownItems().contains(item) || (isUpgradedWith(AppliedE.LEARNING_CARD.get()) && IEMCProxy.INSTANCE.hasValue(item.toStack()) - && knowledge.getProviderFor(ownerUUID) != null); + && knowledge.getProviderFor(node.getOwningPlayerProfileId()) != null); } public void readFromNBT(CompoundTag tag) { diff --git a/src/main/java/gripe/_90/appliede/me/service/TeamProjectEHandler.java b/src/main/java/gripe/_90/appliede/me/service/TeamProjectEHandler.java index 7af73b3..aacb753 100644 --- a/src/main/java/gripe/_90/appliede/me/service/TeamProjectEHandler.java +++ b/src/main/java/gripe/_90/appliede/me/service/TeamProjectEHandler.java @@ -45,6 +45,10 @@ private boolean isPlayerInTrackedTeam(UUID uuid) { } private Supplier getProviderFor(UUID uuid) { + if (uuid == null) { + return null; + } + for (var entry : providersPerTeam.entrySet()) { if (entry.getKey().getMembers().contains(uuid)) { return entry.getValue();