11package github .kasuminova .mmce .common .world ;
22
33import com .github .bsideup .jabel .Desugar ;
4- import com .mojang .realmsclient .util .Pair ;
54import github .kasuminova .mmce .common .tile .MEPatternMirrorImage ;
65import github .kasuminova .mmce .common .tile .MEPatternProvider ;
76import github .kasuminova .mmce .common .util .concurrent .ExecuteGroup ;
1413import net .minecraft .world .World ;
1514import net .minecraftforge .fml .common .Loader ;
1615import net .minecraftforge .fml .common .Optional ;
16+ import org .apache .commons .lang3 .tuple .Pair ;
1717
1818import java .util .Collections ;
1919import 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