aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/basic
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2023-04-01 18:11:43 +0200
committerGitHub <noreply@github.com>2023-04-01 18:11:43 +0200
commit5f50e4a36ec000657b0a1664784acf00275293c6 (patch)
tree5ef81441032735438c9fd9c620224ca58e46e537 /src/main/java/gregtech/common/tileentities/machines/basic
parent6b77557e0e87cf5afd9ebd3985323ff1249e615c (diff)
downloadGT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.gz
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.bz2
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.zip
update spotless formatting (#1827)
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/basic')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java91
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java175
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java423
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java79
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java87
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java22
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java54
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java142
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java108
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java147
17 files changed, 1088 insertions, 496 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index 34589d2c1c..ad55276576 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -56,28 +56,52 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
"", // NEI name
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
radius = aRadius;
step = aStep;
}
@@ -142,10 +166,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
GT_Utility.ItemNBT.setAdvancedProspectionData(
mTier,
aStack,
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId,
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId,
tOils,
GT_Utility.sortByValueToList(tOres),
radius);
@@ -173,9 +201,10 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
for (int i = 0; i < oilfieldSize; i++) {
for (int j = 0; j < oilfieldSize; j++) {
- Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(
- xChunk + i + x * oilfieldSize,
- zChunk + j + z * oilfieldSize);
+ Chunk tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(
+ xChunk + i + x * oilfieldSize,
+ zChunk + j + z * oilfieldSize);
FluidStack tFluid = undergroundOilReadInformation(tChunk);
if (tFluid != null) {
if (tFluid.amount > max) max = tFluid.amount;
@@ -187,17 +216,28 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
}
}
- aOils.add(++oilFieldCount + "," + min + "-" + max + "," + tFluids.get(cInts).getLocalizedName());
+ aOils.add(
+ ++oilFieldCount + ","
+ + min
+ + "-"
+ + max
+ + ","
+ + tFluids.get(cInts)
+ .getLocalizedName());
}
}
} catch (Exception ignored) {}
}
private void prospectOres(Map<String, Integer> aOres) {
- int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius;
+ int tLeftXBound = this.getBaseMetaTileEntity()
+ .getXCoord()
+ - radius;
int tRightXBound = tLeftXBound + 2 * radius;
- int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius;
+ int tLeftZBound = this.getBaseMetaTileEntity()
+ .getZCoord()
+ - radius;
int tRightZBound = tLeftZBound + 2 * radius;
for (int i = tLeftXBound; i <= tRightXBound; i += step) {
@@ -217,17 +257,20 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
private void prospectHole(int i, int k, Map<String, Integer> aOres) {
String tFoundOre;
- for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) {
+ for (int j = this.getBaseMetaTileEntity()
+ .getYCoord(); j > 0; j--) {
tFoundOre = checkForOre(i, j, k);
if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ);
}
}
private String checkForOre(int x, int y, int z) {
- Block tBlock = this.getBaseMetaTileEntity().getBlock(x, y, z);
+ Block tBlock = this.getBaseMetaTileEntity()
+ .getBlock(x, y, z);
if (tBlock instanceof GT_Block_Ores_Abstract) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(x, y, z);
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld()
+ .getTileEntity(x, y, z);
if ((tTileEntity instanceof GT_TileEntity_Ores) && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering
// small
@@ -238,10 +281,12 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName;
}
} else {
- int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ int tMetaID = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
ItemStack is = new ItemStack(tBlock, 1, tMetaID);
ItemData association = GT_OreDictUnificator.getAssociation(is);
- if ((association != null) && (association.mPrefix.toString().startsWith("ore")))
+ if ((association != null) && (association.mPrefix.toString()
+ .startsWith("ore")))
return association.mMaterial.mMaterial.mDefaultLocalName;
else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
index f94b8404fa..1b30282781 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
@@ -34,28 +34,52 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -203,8 +227,16 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
&& GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) {
return true;
}
- return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler
- .getRecipeOutput(aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) != null);
+ return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack) != null);
} else {
return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
index 2cab223249..fb0bbfb4c2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
@@ -31,16 +31,16 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
1,
"E_Oven.png",
"",
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM")));
}
@@ -86,7 +86,8 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
NBTTagCompound aNBT = tStack.getTagCompound();
if (aNBT != null) {
int tHeat = 300;
- long tWorldTime = getBaseMetaTileEntity().getWorld().getTotalWorldTime();
+ long tWorldTime = getBaseMetaTileEntity().getWorld()
+ .getTotalWorldTime();
aNBT = aNBT.getCompoundTag("GT.ToolStats");
if (aNBT != null && aNBT.hasKey("Heat")) {
tHeat = aNBT.getInteger("Heat");
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
index 595953c06f..a0d22efd5d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
@@ -58,28 +58,52 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
// Textures
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -184,7 +208,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
if (GT_Utility.isStackInvalid(is)) return DID_NOT_FIND_RECIPE;
if (is.getItem() instanceof GT_MetaGenerated_Tool || isCircuit(is)
- || blackList.stream().anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
+ || blackList.stream()
+ .anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
|| compareToUnpacker(is))
return DID_NOT_FIND_RECIPE;
@@ -200,9 +225,10 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
ItemStack in = is.copy();
in.stackSize = 1;
if (stack.isStackEqual(in) && stack.mStackSize <= is.stackSize) {
- return setOutputsAndTime(outputHardOverrides.get(stack).toArray(new ItemStack[0]), stack.mStackSize)
- ? FOUND_AND_SUCCESSFULLY_USED_RECIPE
- : DID_NOT_FIND_RECIPE;
+ return setOutputsAndTime(
+ outputHardOverrides.get(stack)
+ .toArray(new ItemStack[0]),
+ stack.mStackSize) ? FOUND_AND_SUCCESSFULLY_USED_RECIPE : DID_NOT_FIND_RECIPE;
}
}
return null;
@@ -250,8 +276,12 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private int checkRecipeMap() {
- GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes
- .findRecipe(this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs());
+ GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ true,
+ this.maxEUInput(),
+ null,
+ this.getAllInputs());
if (gt_recipe == null) return DID_NOT_FIND_RECIPE;
if (gt_recipe.isRecipeInputEqual(false, null, this.getAllInputs())) {
if (gt_recipe.mSpecialValue == -100) {
@@ -285,17 +315,27 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static DissassembleReference ensureDowncasting(Collection<? extends DissassembleReference> recipes) {
- ItemStack[] inputs = recipes.stream().findFirst().orElseThrow(NullPointerException::new).inputs;
- int EUt = recipes.stream().findFirst().orElseThrow(NullPointerException::new).EUt;
+ ItemStack[] inputs = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).inputs;
+ int EUt = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).EUt;
ItemStack[] output = new ItemStack[inputs.length];
List<GT_Recipe> recipesColl = null;
- if (recipes.size() > 1) recipesColl = recipes.stream().skip(1).map(x -> x.recipe).collect(Collectors.toList());
+ if (recipes.size() > 1) recipesColl = recipes.stream()
+ .skip(1)
+ .map(x -> x.recipe)
+ .collect(Collectors.toList());
handleRecipeTransformation(inputs, output, recipesColl);
return new DissassembleReference(
- recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new),
+ recipes.stream()
+ .mapToInt(x -> x.stackSize)
+ .min()
+ .orElseThrow(NumberFormatException::new),
output,
null,
EUt);
@@ -305,8 +345,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
List<? extends GT_Recipe> recipesColl) {
for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) {
Set<ItemStack[]> inputsStacks = null;
- if (recipesColl != null)
- inputsStacks = recipesColl.stream().map(x -> x.mInputs).collect(Collectors.toSet());
+ if (recipesColl != null) inputsStacks = recipesColl.stream()
+ .map(x -> x.mInputs)
+ .collect(Collectors.toSet());
handleRecipeTransformationInternal(inputs, output, inputsStacks, i);
}
addOthersAndHandleAlwaysReplace(inputs, output);
@@ -360,25 +401,29 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
private static ItemStack handleUnification(ItemStack stack) {
for (int oreID : OreDictionary.getOreIDs(stack)) {
- for (int i = 0; i < OreDictionaryOverride[0].length; i++)
- if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])) {
- ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
- ret.stackSize = stack.stackSize;
- return ret;
- }
+ for (int i = 0; i < OreDictionaryOverride[0].length; i++) if (OreDictionary.getOreName(oreID)
+ .equals(
+ OreDictionaryOverride[0][i])) {
+ ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
+ ret.stackSize = stack.stackSize;
+ return ret;
+ }
}
return GT_OreDictUnificator.get(stack);
}
private static ItemStack handleWildcard(ItemStack stack) {
- if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE && !stack.getItem().isDamageable()) {
+ if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE
+ && !stack.getItem()
+ .isDamageable()) {
stack.setItemDamage(0);
}
return stack;
}
private static ItemStack handleContainerItem(ItemStack stack) {
- if (stack != null && stack.getItem().hasContainerItem(stack)) {
+ if (stack != null && stack.getItem()
+ .hasContainerItem(stack)) {
return null;
}
return stack;
@@ -421,14 +466,20 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl) {
- if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) toRpl.set(Materials.Iron);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyCopper)))
+ if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyIron)))
+ toRpl.set(Materials.Iron);
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyCopper)))
toRpl.set(Materials.Copper);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyRubber)))
toRpl.set(Materials.Rubber);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyBronze)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyBronze)))
toRpl.set(Materials.Bronze);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
toRpl.set(Materials.Rubber);
}
@@ -515,13 +566,31 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
AtomicInteger stacksize = new AtomicInteger();
// Check Recipe Maps for creation of Item
List<DissassembleReference> possibleRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream()
- .filter(x -> Arrays.stream(x.mOutputs).anyMatch(y -> {
- ItemStack out = is.copy();
- out.stackSize = y.stackSize;
- boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize;
- if (isDone) stacksize.set(y.stackSize);
- return isDone;
- })).map(x -> new DissassembleReference(stacksize.get(), x.mInputs, x)).collect(Collectors.toList());
+ .filter(
+ x -> Arrays.stream(
+ x.mOutputs)
+ .anyMatch(
+ y -> {
+ ItemStack out = is.copy();
+ out.stackSize = y.stackSize;
+ boolean isDone = GT_Utility.areStacksEqual(
+ y,
+ out,
+ true)
+ && y.stackSize
+ <= is.stackSize;
+ if (isDone)
+ stacksize.set(
+ y.stackSize);
+