Skip to content

Commit 85028a5

Browse files
authored
Merge pull request #187 from DipNChips1/Fix-incorrect-Pair-import
Fixed incorrect import
2 parents ef60e73 + a91518a commit 85028a5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main/java/github/kasuminova/mmce/common/world/MachineComponentManager.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package github.kasuminova.mmce.common.world;
22

33
import com.github.bsideup.jabel.Desugar;
4-
import com.mojang.realmsclient.util.Pair;
54
import github.kasuminova.mmce.common.tile.MEPatternMirrorImage;
65
import github.kasuminova.mmce.common.tile.MEPatternProvider;
76
import github.kasuminova.mmce.common.util.concurrent.ExecuteGroup;
@@ -14,6 +13,7 @@
1413
import net.minecraft.world.World;
1514
import net.minecraftforge.fml.common.Loader;
1615
import net.minecraftforge.fml.common.Optional;
16+
import org.apache.commons.lang3.tuple.Pair;
1717

1818
import java.util.Collections;
1919
import java.util.Map;
@@ -66,8 +66,8 @@ public void checkComponentShared(TileEntity component, TileMultiblockMachineCont
6666

6767
if (Loader.isModLoaded("appliedenergistics2")) {
6868
Pair<BlockPos, TileEntity> result = getResult(component, world);
69-
pos = result.first();
70-
te = result.second();
69+
pos = result.getLeft();
70+
te = result.getRight();
7171
} else {
7272
te = component;
7373
pos = component.getPos();
@@ -77,7 +77,7 @@ public void checkComponentShared(TileEntity component, TileMultiblockMachineCont
7777

7878
synchronized (te) {
7979
ComponentInfo info = posComponentMap.computeIfAbsent(pos, v -> new ComponentInfo(
80-
te, pos, ReferenceSets.synchronize(new ReferenceOpenHashSet<>(Collections.singleton(ctrl)))));
80+
te, pos, ReferenceSets.synchronize(new ReferenceOpenHashSet<>(Collections.singleton(ctrl)))));
8181

8282
if (!info.areTileEntityEquals(te)) {
8383
ComponentInfo newInfo = new ComponentInfo(te, pos, ReferenceSets.synchronize(new ReferenceOpenHashSet<>(Collections.singleton(ctrl))));
@@ -95,10 +95,10 @@ public void checkComponentShared(TileEntity component, TileMultiblockMachineCont
9595
}
9696

9797
long groupId = owners.stream()
98-
.filter(owner -> owner.getExecuteGroupId() != -1)
99-
.findFirst()
100-
.map(TileMultiblockMachineController::getExecuteGroupId)
101-
.orElse(ExecuteGroup.newGroupId());
98+
.filter(owner -> owner.getExecuteGroupId() != -1)
99+
.findFirst()
100+
.map(TileMultiblockMachineController::getExecuteGroupId)
101+
.orElse(ExecuteGroup.newGroupId());
102102

103103
owners.forEach(owner -> owner.setExecuteGroupId(groupId));
104104
}
@@ -111,8 +111,8 @@ public void removeOwner(TileEntity component, TileMultiblockMachineController ct
111111

112112
if (Loader.isModLoaded("appliedenergistics2")) {
113113
Pair<BlockPos, TileEntity> result = getResult(component, world);
114-
pos = result.first();
115-
te = result.second();
114+
pos = result.getLeft();
115+
te = result.getRight();
116116
} else {
117117
te = component;
118118
pos = component.getPos();
@@ -156,4 +156,4 @@ public boolean equals(final Object obj) {
156156
return false;
157157
}
158158
}
159-
}
159+
}

0 commit comments

Comments
 (0)