diff options
Diffstat (limited to 'src/main/java/gregtech/api')
6 files changed, 109 insertions, 97 deletions
diff --git a/src/main/java/gregtech/api/enums/TAE.java b/src/main/java/gregtech/api/enums/TAE.java index 73a18dc771..246b2006ea 100644 --- a/src/main/java/gregtech/api/enums/TAE.java +++ b/src/main/java/gregtech/api/enums/TAE.java @@ -89,8 +89,8 @@ public class TAE { if (h != null) { h[64][secondaryIndex++] = GTPP_CopiedBlockTexture; x.set(null, h); - Logger.INFO( - "[TAE} Registered Texture with ID " + (secondaryIndex - 1) + " in secondary index."); + Logger + .INFO("[TAE} Registered Texture with ID " + (secondaryIndex - 1) + " in secondary index."); return true; } } diff --git a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java index 81403c1612..dc579ebd9b 100644 --- a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java +++ b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java @@ -24,10 +24,12 @@ public class FishPondFakeRecipe { public static boolean generateFishPondRecipes() { try { - fish = (ArrayList<WeightedRandomFishable>) ReflectionUtils.getField(FishingHooks.class, "fish").get(null); - junk = (ArrayList<WeightedRandomFishable>) ReflectionUtils.getField(FishingHooks.class, "junk").get(null); + fish = (ArrayList<WeightedRandomFishable>) ReflectionUtils.getField(FishingHooks.class, "fish") + .get(null); + junk = (ArrayList<WeightedRandomFishable>) ReflectionUtils.getField(FishingHooks.class, "junk") + .get(null); treasure = (ArrayList<WeightedRandomFishable>) ReflectionUtils.getField(FishingHooks.class, "treasure") - .get(null); + .get(null); } catch (IllegalArgumentException | IllegalAccessException e) { Logger.INFO("Error generating Fish Pond Recipes. [1]"); e.printStackTrace(); @@ -45,7 +47,8 @@ public class FishPondFakeRecipe { WeightedRandomFishable u = weightedRandomFishable; try { ItemStack t = (ItemStack) ReflectionUtils - .getField(WeightedRandomFishable.class, "field_150711_b").get(u); + .getField(WeightedRandomFishable.class, "field_150711_b") + .get(u); addNewFishPondLoot(mType, new ItemStack[] { t }, new int[] { 10000 }); } catch (IllegalArgumentException | IllegalAccessException e1) { Logger.INFO("Error generating Fish Pond Recipes. [2]"); @@ -61,16 +64,16 @@ public class FishPondFakeRecipe { public static void addNewFishPondLoot(int circuit, ItemStack[] outputItems, int[] chances) { GT_Recipe x = new GT_Recipe( - true, - new ItemStack[] { CI.getNumberedCircuit(circuit) }, - outputItems, - null, - chances, - new FluidStack[] { null }, - new FluidStack[] { null }, - 100, // 1 Tick - 0, // No Eu produced - 0); + true, + new ItemStack[] { CI.getNumberedCircuit(circuit) }, + outputItems, + null, + chances, + new FluidStack[] { null }, + new FluidStack[] { null }, + 100, // 1 Tick + 0, // No Eu produced + 0); Logger.INFO("Fishing [" + circuit + "]: " + ItemUtils.getArrayStackNames(outputItems)); GTPPRecipeMaps.fishPondRecipes.addRecipe(x, false, false, false); } diff --git a/src/main/java/gregtech/api/util/GasSpargingRecipe.java b/src/main/java/gregtech/api/util/GasSpargingRecipe.java index 9853b392be..667cc78d85 100644 --- a/src/main/java/gregtech/api/util/GasSpargingRecipe.java +++ b/src/main/java/gregtech/api/util/GasSpargingRecipe.java @@ -19,7 +19,7 @@ public class GasSpargingRecipe implements Comparable<GasSpargingRecipe> { public final int mEUt; public GasSpargingRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, - FluidStack[] aOutputs, int[] aMaxOutputQuantity) { + FluidStack[] aOutputs, int[] aMaxOutputQuantity) { mInputGas = aSpargeGas; mInputSpentFuel = aSpentFuel; mOutputSpargedFuel = aSpargedFuel; @@ -57,21 +57,23 @@ public class GasSpargingRecipe implements Comparable<GasSpargingRecipe> { public boolean isValid() { if (mInputGas == null || mInputGas.amount <= 0 - || mInputSpentFuel == null - || mInputSpentFuel.amount <= 0 - || mFluidOutputs == null - || mFluidOutputs.length < 1 - || mMaxOutputQuantity == null - || mMaxOutputQuantity.length < 1 - || mFluidOutputs.length != mMaxOutputQuantity.length) { + || mInputSpentFuel == null + || mInputSpentFuel.amount <= 0 + || mFluidOutputs == null + || mFluidOutputs.length < 1 + || mMaxOutputQuantity == null + || mMaxOutputQuantity.length < 1 + || mFluidOutputs.length != mMaxOutputQuantity.length) { return false; } return true; } public boolean containsInputs(FluidStack aSpargeGas, FluidStack aSpentFuel) { - if (aSpargeGas != null && aSpargeGas.getFluid().equals(this.mInputGas.getFluid())) { - if (aSpentFuel != null && aSpentFuel.getFluid().equals(this.mInputSpentFuel.getFluid())) { + if (aSpargeGas != null && aSpargeGas.getFluid() + .equals(this.mInputGas.getFluid())) { + if (aSpentFuel != null && aSpentFuel.getFluid() + .equals(this.mInputSpentFuel.getFluid())) { return true; } } diff --git a/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java b/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java index b078394f92..6dcc7721e0 100644 --- a/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java +++ b/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java @@ -15,17 +15,17 @@ public class GasSpargingRecipeMap extends AutoMap<GasSpargingRecipe> { public static final String mNEIGUIPath = GregTech.getResourcePath("textures", "gui/basicmachines/FissionFuel.png"); public static boolean addRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, - FluidStack[] aOutputs, int[] aMaxOutputs) { + FluidStack[] aOutputs, int[] aMaxOutputs) { if (aSpargeGas == null || aSpargeGas.amount <= 0 - || aSpentFuel == null - || aSpentFuel.amount <= 0 - || aSpargedFuel == null - || aSpargedFuel.amount <= 0 - || aOutputs == null - || aOutputs.length < 1 - || aMaxOutputs == null - || aMaxOutputs.length < 1 - || aOutputs.length != aMaxOutputs.length) { + || aSpentFuel == null + || aSpentFuel.amount <= 0 + || aSpargedFuel == null + || aSpargedFuel.amount <= 0 + || aOutputs == null + || aOutputs.length < 1 + || aMaxOutputs == null + || aMaxOutputs.length < 1 + || aOutputs.length != aMaxOutputs.length) { return false; } int aMapSize = mRecipes.size(); diff --git a/src/main/java/gregtech/api/util/HotFuel.java b/src/main/java/gregtech/api/util/HotFuel.java index 15104807a4..6054a57b84 100644 --- a/src/main/java/gregtech/api/util/HotFuel.java +++ b/src/main/java/gregtech/api/util/HotFuel.java @@ -8,33 +8,33 @@ import gtPlusPlus.api.recipe.GTPPRecipeMaps; public class HotFuel { public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, ItemStack[] outputItems, int[] chances, - int aSpecialValue) { + int aSpecialValue) { GTPPRecipeMaps.thermalBoilerRecipes.addRecipe( - true, - null, - outputItems, - null, - chances, - new FluidStack[] { aInput1 }, - new FluidStack[] { aOutput1 }, - 1, // 1 Tick - 0, // No Eu produced - aSpecialValue // Magic Number + true, + null, + outputItems, + null, + chances, + new FluidStack[] { aInput1 }, + new FluidStack[] { aOutput1 }, + 1, // 1 Tick + 0, // No Eu produced + aSpecialValue // Magic Number ); } public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, FluidStack aOutput2, int aSpecialValue) { GTPPRecipeMaps.thermalBoilerRecipes.addRecipe( - false, - null, - null, - null, - null, - new FluidStack[] { aInput1 }, - new FluidStack[] { aOutput1, aOutput2 }, - 20, // 1 Second - 0, // No Eu produced - aSpecialValue // Magic Number + false, + null, + null, + null, + null, + new FluidStack[] { aInput1 }, + new FluidStack[] { aOutput1, aOutput2 }, + 20, // 1 Second + 0, // No Eu produced + aSpecialValue // Magic Number ); } } diff --git a/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java index be4dc21815..e3baa9ac90 100644 --- a/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java +++ b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java @@ -29,22 +29,22 @@ public class SemiFluidFuelHandler { FluidStack p = aFuel; if (p != null && aFuelValue > 0) { GT_Recipe aRecipe = new GT_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] { p }, - null, - 0, - 0, - aFuelValue); + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] { p }, + null, + 0, + 0, + aFuelValue); if (aRecipe.mSpecialValue > 0) { Logger.INFO( - "Added " + aRecipe.mFluidInputs[0].getLocalizedName() - + " to the Semi-Fluid Generator fuel map. Fuel Produces " - + (aRecipe.mSpecialValue * 1000) - + "EU per 1000L."); + "Added " + aRecipe.mFluidInputs[0].getLocalizedName() + + " to the Semi-Fluid Generator fuel map. Fuel Produces " + + (aRecipe.mSpecialValue * 1000) + + "EU per 1000L."); semiFluidFuels.add(aRecipe); return true; } @@ -81,49 +81,56 @@ public class SemiFluidFuelHandler { } g.mSpecialValue *= aContainsCreosote ? 6 : 3; Logger.INFO( - "Added " + g.mFluidInputs[0].getLocalizedName() - + " to the Semi-Fluid Generator fuel map. Fuel Produces " - + g.mSpecialValue - + "EU per 1000L."); + "Added " + g.mFluidInputs[0].getLocalizedName() + + " to the Semi-Fluid Generator fuel map. Fuel Produces " + + g.mSpecialValue + + "EU per 1000L."); semiFluidFuels.add(g); } } for (Pair<FluidStack, Integer> p : aFoundFluidsFromItems.values()) { if (p != null) { int aFuelValue = p.getValue(); - if (p.getKey().isFluidEqual(aCreosote)) { + if (p.getKey() + .isFluidEqual(aCreosote)) { aFuelValue *= 6; - } else if (p.getKey().isFluidEqual(aHeavyFuel) || p.getKey().isFluidEqual(aHeavyOil)) { - aFuelValue *= 1.5; - } else { - aFuelValue *= 2; - } + } else if (p.getKey() + .isFluidEqual(aHeavyFuel) + || p.getKey() + .isFluidEqual(aHeavyOil)) { + aFuelValue *= 1.5; + } else { + aFuelValue *= 2; + } if (aFuelValue <= (128 * 3)) { GT_Recipe aRecipe = new GT_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] { p.getKey() }, - null, - 0, - 0, - aFuelValue); + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] { p.getKey() }, + null, + 0, + 0, + aFuelValue); if (aRecipe.mSpecialValue > 0) { Logger.INFO( - "Added " + aRecipe.mFluidInputs[0].getLocalizedName() - + " to the Semi-Fluid Generator fuel map. Fuel Produces " - + (aRecipe.mSpecialValue * 1000) - + "EU per 1000L."); + "Added " + aRecipe.mFluidInputs[0].getLocalizedName() + + " to the Semi-Fluid Generator fuel map. Fuel Produces " + + (aRecipe.mSpecialValue * 1000) + + "EU per 1000L."); semiFluidFuels.add(aRecipe); } } else { - Logger.INFO("Boosted Fuel value for " + p.getKey().getLocalizedName() + " exceeds 512k, ignoring."); + Logger.INFO( + "Boosted Fuel value for " + p.getKey() + .getLocalizedName() + " exceeds 512k, ignoring."); } } } - return !semiFluidFuels.getAllRecipes().isEmpty(); + return !semiFluidFuels.getAllRecipes() + .isEmpty(); } } |