diff options
author | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:04:17 +0100 |
---|---|---|
committer | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:04:17 +0100 |
commit | 69ce418e29e22391f60cdd55815727762a78c33a (patch) | |
tree | 97be683e94b8a541d7578760a154f16d4dea38e2 /src/main/java/gtPlusPlus/api/objects/minecraft | |
parent | 38f38a991e433f6eff30476b87a71eeadee228ce (diff) | |
download | GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.tar.gz GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.tar.bz2 GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.zip |
Apply updated GT5u spotless configs
Diffstat (limited to 'src/main/java/gtPlusPlus/api/objects/minecraft')
5 files changed, 46 insertions, 41 deletions
diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java index bf98c7d633..13f12503f0 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java @@ -84,12 +84,13 @@ public class BTF_FluidTank extends FluidTank { @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid != null && aFluid.getFluid().getID() > 0 - && aFluid.amount > 0 - && this.canTankBeFilled() - && this.isFluidInputAllowed(aFluid)) { - if (this.getFillableStack() != null && this.getFillableStack().getFluid().getID() > 0) { - if (!this.getFillableStack().isFluidEqual(aFluid)) { + if (aFluid != null && aFluid.getFluid() + .getID() > 0 && aFluid.amount > 0 && this.canTankBeFilled() && this.isFluidInputAllowed(aFluid)) { + if (this.getFillableStack() != null && this.getFillableStack() + .getFluid() + .getID() > 0) { + if (!this.getFillableStack() + .isFluidEqual(aFluid)) { return 0; } else { int space = this.getCapacity() - this.getFillableStack().amount; @@ -144,7 +145,8 @@ public class BTF_FluidTank extends FluidTank { arg9999.amount -= used; } - FluidStack drained = this.getDrainableStack().copy(); + FluidStack drained = this.getDrainableStack() + .copy(); drained.amount = used; if (this.getDrainableStack().amount <= 0 && this.isFluidChangingAllowed()) { this.setDrainableStack((FluidStack) null); diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java index 7718f68176..fc71869d9e 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java @@ -97,7 +97,7 @@ public class BTF_Inventory implements ISidedInventory { for (int rArray = 0; rArray < this.getSizeInventory(); ++rArray) { if (this.isValidSlot(rArray) - && (tSkip || coverInfo.letsItemsOut(rArray) || coverInfo.letsItemsIn(rArray))) { + && (tSkip || coverInfo.letsItemsOut(rArray) || coverInfo.letsItemsIn(rArray))) { tList.add(rArray); } } @@ -114,16 +114,16 @@ public class BTF_Inventory implements ISidedInventory { @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) { return this.isValidSlot(aIndex) && aStack != null - && aIndex < this.mInventory.length - && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, this.mInventory[aIndex])) - && this.allowPutStack(this.mTile, aIndex, ForgeDirection.getOrientation(ordinalSide), aStack); + && aIndex < this.mInventory.length + && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, this.mInventory[aIndex])) + && this.allowPutStack(this.mTile, aIndex, ForgeDirection.getOrientation(ordinalSide), aStack); } @Override public boolean canExtractItem(int aIndex, ItemStack aStack, int ordinalSide) { return this.isValidSlot(aIndex) && aStack != null - && aIndex < this.mInventory.length - && this.allowPullStack(this.mTile, aIndex, ForgeDirection.getOrientation(ordinalSide), aStack); + && aIndex < this.mInventory.length + && this.allowPullStack(this.mTile, aIndex, ForgeDirection.getOrientation(ordinalSide), aStack); } public boolean allowPullStack(TileEntityBase mTile2, int aIndex, ForgeDirection side, ItemStack aStack) { @@ -131,9 +131,9 @@ public class BTF_Inventory implements ISidedInventory { } public boolean allowPutStack(TileEntityBase aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return (aIndex >= 0 && aIndex < this.getSizeInventory()) - && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(this.mInventory[aIndex], aStack)); + && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(this.mInventory[aIndex], aStack)); } @Override @@ -198,7 +198,8 @@ public class BTF_Inventory implements ISidedInventory { if (mInventory != null && mInventory[s] != null) { ItemStack slot = mInventory[s]; if (slot == null || (slot != null && GT_Utility.areStacksEqual(aInput, slot) - && slot.stackSize != slot.getItem().getItemStackLimit(slot))) { + && slot.stackSize != slot.getItem() + .getItemStackLimit(slot))) { if (slot == null) { slot = aInput.copy(); } else { diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java index 686c0e7667..3853f61793 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java @@ -91,8 +91,8 @@ public class BlockPos implements Serializable { return false; } return this.xPos == otherPoint.xPos && this.yPos == otherPoint.yPos - && this.zPos == otherPoint.zPos - && this.dim == otherPoint.dim; + && this.zPos == otherPoint.zPos + && this.dim == otherPoint.dim; } public int distanceFrom(BlockPos target) { diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java index a90a52e829..c5c903cd1f 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java @@ -23,7 +23,7 @@ public class FluidGT6 extends Fluid implements Runnable { @Override public int getColor() { return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) - | Math.max(0, Math.min(255, this.mRGBa[2])); + | Math.max(0, Math.min(255, this.mRGBa[2])); } @Override diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java index db9599e130..f799623dd6 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java @@ -17,7 +17,7 @@ public class ShapedRecipe { ItemStack[] mBlackList = null; public ShapedRecipe(Object aInput1, Object aInput2, Object aInput3, Object aInput4, Object aInput5, Object aInput6, - Object aInput7, Object aInput8, Object aInput9, ItemStack aOutput) { + Object aInput7, Object aInput8, Object aInput9, ItemStack aOutput) { this(new Object[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, aOutput); } @@ -68,10 +68,10 @@ public class ShapedRecipe { if (aInputs.length < 9 || aInputs.length > 9) { Logger.RECIPE( - "[Fix] Recipe for " + aOutput.getDisplayName() - + " has incorrect number of inputs. Size: " - + aInputs.length - + "."); + "[Fix] Recipe for " + aOutput.getDisplayName() + + " has incorrect number of inputs. Size: " + + aInputs.length + + "."); } // Build a Pair for each slot @@ -92,11 +92,12 @@ public class ShapedRecipe { } aRecipePairs.put(new Pair<>(CHARS.charAt(aCharSlot), stack)); Logger.RECIPE( - "Storing '" + CHARS.charAt(aCharSlot) - + "' with an object of type " - + stack.getClass().getSimpleName() - + " and a value of " - + mInfo); + "Storing '" + CHARS.charAt(aCharSlot) + + "' with an object of type " + + stack.getClass() + .getSimpleName() + + " and a value of " + + mInfo); aChar[aMemSlot++] = CHARS.charAt(aCharSlot); aCharSlot++; aLoggingInfo[aInfoSlot++] = mInfo; @@ -130,7 +131,7 @@ public class ShapedRecipe { aGrid[2] = "" + aGridWhole.charAt(6) + aGridWhole.charAt(7) + aGridWhole.charAt(8); } else { Logger.RECIPE( - "[Fix] Grid length for recipe outputting " + aOutput.getDisplayName() + " is not 9."); + "[Fix] Grid length for recipe outputting " + aOutput.getDisplayName() + " is not 9."); } // Rebuild the Map without spaces @@ -155,22 +156,23 @@ public class ShapedRecipe { } aRecipePairs.put(new Pair<>(CHARS.charAt(aCharSlot), stack)); Logger.RECIPE( - "Registering Pair of '" + CHARS.charAt(aCharSlot) - + "' and a " - + stack.getClass().getSimpleName() - + " object. Object has a value of " - + mInfo); + "Registering Pair of '" + CHARS.charAt(aCharSlot) + + "' and a " + + stack.getClass() + .getSimpleName() + + " object. Object has a value of " + + mInfo); aCharSlot++; counter++; } } Logger.RECIPE( - "Counter started at " + KEY_COUNTER - + ", counter is now at " - + counter - + ". Trying to create Varag array with a size of " - + (KEY_COUNTER + (counter - KEY_COUNTER) * 2)); + "Counter started at " + KEY_COUNTER + + ", counter is now at " + + counter + + ". Trying to create Varag array with a size of " + + (KEY_COUNTER + (counter - KEY_COUNTER) * 2)); // Counter started at 3, counter is now at 4. Trying to create Varag array with a size of 2 // Register the shaped grid straight to the varags @@ -214,7 +216,7 @@ public class ShapedRecipe { } else { Logger.RECIPE( - "[Fix] Recipe for " + aOutput.getDisplayName() + " contains a strange number of inputs."); + "[Fix] Recipe for " + aOutput.getDisplayName() + " contains a strange number of inputs."); } // Try set the recipe for this object. |