@@ -192,7 +192,7 @@ public static List<Pair<Long, MekanismKey>> findAEChemicalsFromFilter(MEStorage
192192 @ NotNull
193193 public static Pair <Pair <EncodedPatternItem <?>, IPatternDetails >, String > findPatternFromFilters (IGrid grid , Level level , @ Nullable GenericFilter <?> inputFilter , @ Nullable GenericFilter <?> outputFilter ) {
194194 for (Pair <EncodedPatternItem <?>, IPatternDetails > pattern : getPatterns (grid , level )) {
195- IPatternDetails patternDetails = pattern .getRight ();
195+ IPatternDetails patternDetails = pattern .right ();
196196 if (patternDetails .getInputs ().length == 0 )
197197 continue ;
198198 if (patternDetails .getOutputs ().isEmpty ())
@@ -227,7 +227,7 @@ public static Pair<Pair<EncodedPatternItem<?>, IPatternDetails>, String> findPat
227227 }
228228
229229 if (inputMatch && outputMatch )
230- return Pair .of (Pair .of (pattern .getLeft (), patternDetails ), null );
230+ return Pair .of (Pair .of (pattern .left (), patternDetails ), null );
231231 }
232232
233233 return Pair .of (null , StatusConstants .NOT_FOUND .toString ());
@@ -351,16 +351,16 @@ private static Class<? extends PatternContainer> tryCastMachineToContainer(Class
351351 }
352352
353353 public static <T extends AEKey > Map <String , Object > parseAeStack (Pair <Long , T > stack , @ Nullable ICraftingService service ) {
354- if (stack .getRight () == null )
354+ if (stack .right () == null )
355355 return null ;
356- if (stack .getRight () instanceof AEItemKey itemKey )
357- return parseItemStack (Pair .of (stack .getLeft (), itemKey ), service );
358- if (stack .getRight () instanceof AEFluidKey fluidKey )
359- return parseFluidStack (Pair .of (stack .getLeft (), fluidKey ), service );
360- if (APAddon .APP_MEKANISTICS .isLoaded () && (stack .getRight () instanceof MekanismKey gasKey ))
361- return parseChemStack (Pair .of (stack .getLeft (), gasKey ), service );
362-
363- AdvancedPeripherals .debug ("Could not create table from unknown stack " + stack .getRight ().getClass () + " - Report this to the maintainer of ap" , org .apache .logging .log4j .Level .WARN );
356+ if (stack .right () instanceof AEItemKey itemKey )
357+ return parseItemStack (Pair .of (stack .left (), itemKey ), service );
358+ if (stack .right () instanceof AEFluidKey fluidKey )
359+ return parseFluidStack (Pair .of (stack .left (), fluidKey ), service );
360+ if (APAddon .APP_MEKANISTICS .isLoaded () && (stack .right () instanceof MekanismKey gasKey ))
361+ return parseChemStack (Pair .of (stack .left (), gasKey ), service );
362+
363+ AdvancedPeripherals .debug ("Could not create table from unknown stack " + stack .right ().getClass () + " - Report this to the maintainer of ap" , org .apache .logging .log4j .Level .WARN );
364364 return null ;
365365 }
366366
@@ -447,27 +447,27 @@ private static Map<String, Object> parseDISKDrive(DISKDrive drive, ItemStack sta
447447 }
448448
449449 private static Map <String , Object > parseItemStack (Pair <Long , AEItemKey > stack , @ Nullable ICraftingService craftingService ) {
450- Map <String , Object > properties = LuaConverter .itemStackToLua (stack .getRight ().getReadOnlyStack (), stack .getLeft ());
451- properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .getRight ()));
450+ Map <String , Object > properties = LuaConverter .itemStackToLua (stack .right ().getReadOnlyStack (), stack .left ());
451+ properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .right ()));
452452 return properties ;
453453 }
454454
455455 private static Map <String , Object > parseFluidStack (Pair <Long , AEFluidKey > stack , @ Nullable ICraftingService craftingService ) {
456- Map <String , Object > properties = LuaConverter .fluidStackToLua (stack .getRight ().toStack (1 ), stack .getLeft ());
457- properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .getRight ()));
456+ Map <String , Object > properties = LuaConverter .fluidStackToLua (stack .right ().toStack (1 ), stack .left ());
457+ properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .right ()));
458458 return properties ;
459459 }
460460
461461 private static Map <String , Object > parseChemStack (Pair <Long , MekanismKey > stack , @ Nullable ICraftingService craftingService ) {
462- Map <String , Object > properties = LuaConverter .chemicalStackToLua (stack .getRight ().withAmount (stack .getLeft ()));
463- properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .getRight ()));
462+ Map <String , Object > properties = LuaConverter .chemicalStackToLua (stack .right ().withAmount (stack .left ()));
463+ properties .put ("isCraftable" , craftingService != null && craftingService .isCraftable (stack .right ()));
464464 return properties ;
465465 }
466466
467467 public static Map <String , Object > parsePattern (Pair <EncodedPatternItem <?>, IPatternDetails > pattern ) {
468468 Map <String , Object > properties = new HashMap <>();
469- IPatternDetails patternDetails = pattern .getRight ();
470- String patternType = getPatternType (pattern .getLeft ());
469+ IPatternDetails patternDetails = pattern .right ();
470+ String patternType = getPatternType (pattern .left ());
471471
472472 properties .put ("inputs" , Arrays .stream (patternDetails .getInputs ()).map (AEApi ::parsePatternInput ).collect (Collectors .toList ()));
473473 properties .put ("outputs" , patternDetails .getOutputs ().stream ().map (AEApi ::parseGenericStack ).collect (Collectors .toList ()));
0 commit comments