diff options
author | Raven Szewczyk <git@eigenraven.me> | 2023-04-10 17:49:16 +0100 |
---|---|---|
committer | Raven Szewczyk <git@eigenraven.me> | 2023-04-10 17:49:16 +0100 |
commit | 8ac58626bd4caa9e49f58acc6b97ac031f6c2107 (patch) | |
tree | 0a8c7b737f1f2607fa6875309f4c6a5c2b8b3331 /src/main/java/gregtech/common/tileentities/machines/long_distance | |
parent | d795cf740c3b48b602d3bfb708ed9e6c492ad37d (diff) | |
download | GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.tar.gz GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.tar.bz2 GT5-Unofficial-8ac58626bd4caa9e49f58acc6b97ac031f6c2107.zip |
Update spotless config to 0.2.2
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/long_distance')
3 files changed, 53 insertions, 51 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java index 898d819109..b868d151f2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java @@ -66,12 +66,12 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta protected GT_MetaTileEntity_LongDistancePipelineBase mTooCloseTarget = null, mTooCloseSender = null; public GT_MetaTileEntity_LongDistancePipelineBase(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } public GT_MetaTileEntity_LongDistancePipelineBase(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -91,9 +91,9 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta super.loadNBTData(aNBT); if (aNBT.hasKey("target")) { mTargetPos = new ChunkCoordinates( - aNBT.getInteger("target.x"), - aNBT.getInteger("target.y"), - aNBT.getInteger("target.z")); + aNBT.getInteger("target.x"), + aNBT.getInteger("target.y"), + aNBT.getInteger("target.z")); if (getDistanceToSelf(mTargetPos) < minimalDistancePoints) mTargetPos = null; } } @@ -136,8 +136,9 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta TileEntity te = world.getTileEntity(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ); final IMetaTileEntity tMeta; if (te instanceof BaseMetaTileEntity - && ((tMeta = ((BaseMetaTileEntity) te).getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase) - && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { + && ((tMeta = ((BaseMetaTileEntity) te) + .getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase) + && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { // It's the right type! mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta; } else if (te != null) { @@ -151,8 +152,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta mTooCloseSender = null; if (mTarget == null || mTarget == this) return false; if (mTarget.mSender == null || mTarget.mSender.isDead() - || mTarget.mSender.mTarget == null - || mTarget.mSender.mTarget.isDead()) { + || mTarget.mSender.mTarget == null + || mTarget.mSender.mTarget.isDead()) { mTarget.mSender = this; mTarget.mTooCloseSender = null; } @@ -162,22 +163,22 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, - int aLogLevel, ArrayList<String> aList) { + int aLogLevel, ArrayList<String> aList) { if (mSender != null && !mSender.isDead() && mSender.mTarget == this) { final ChunkCoordinates coords = mSender.getCoords(); aList.addAll( - Arrays.asList( - "Is the Target", - "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); + Arrays.asList( + "Is the Target", + "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); } else { aList.addAll( - Arrays.asList( - checkTarget() ? "Has Target" : "Has no loaded Target", - "Target should be around: X: " + mTargetPos.posX - + " Y: " - + mTargetPos.posY - + " Z: " - + mTargetPos.posZ)); + Arrays.asList( + checkTarget() ? "Has Target" : "Has no loaded Target", + "Target should be around: X: " + mTargetPos.posX + + " Y: " + + mTargetPos.posY + + " Z: " + + mTargetPos.posZ)); } return aList; @@ -208,15 +209,15 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta if (aMetaData != getPipeMeta()) return; HashSet<ChunkCoordinates> tVisited = new HashSet<>(Collections.singletonList(getCoords())), - tWires = new HashSet<>(); + tWires = new HashSet<>(); Queue<ChunkCoordinates> tQueue = new LinkedList<>( - Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); + Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); while (!tQueue.isEmpty()) { final ChunkCoordinates aCoords = tQueue.poll(); if (world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ) == aBlock - && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { + && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { // We've got another pipe/wire block // TODO: Make sure it's the right type of pipe/wire via meta ChunkCoordinates tCoords; @@ -240,11 +241,12 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta // It's not a block - let's see if it's a tile entity TileEntity tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); if (tTileEntity != gtTile && tTileEntity instanceof BaseMetaTileEntity - && ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase tGtTile) { + && ((BaseMetaTileEntity) tTileEntity) + .getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase tGtTile) { if (isSameClass(tGtTile) && tWires.contains( - tGtTile.getFacingOffset( - (BaseMetaTileEntity) tTileEntity, - ((BaseMetaTileEntity) tTileEntity).getFrontFacing()))) { + tGtTile.getFacingOffset( + (BaseMetaTileEntity) tTileEntity, + ((BaseMetaTileEntity) tTileEntity).getFrontFacing()))) { // If it's the same class, and we've scanned a wire in front of it (the input side), we've // found our target // still need to check if it's distant enough @@ -273,15 +275,15 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta protected int getDistanceToSelf(ChunkCoordinates aCoords) { return Math.abs(getBaseMetaTileEntity().getXCoord() - aCoords.posX) - + Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 - + Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); + + Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 + + Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); } public ChunkCoordinates getFacingOffset(IGregTechTileEntity gt_tile, byte aSide) { return new ChunkCoordinates( - gt_tile.getOffsetX(aSide, 1), - gt_tile.getOffsetY(aSide, 1), - gt_tile.getOffsetZ(aSide, 1)); + gt_tile.getOffsetX(aSide, 1), + gt_tile.getOffsetY(aSide, 1), + gt_tile.getOffsetZ(aSide, 1)); } public ChunkCoordinates getCoords() { @@ -308,11 +310,11 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); final int facing = getBaseMetaTileEntity().getFrontFacing(); final int side = (byte) accessor.getSide() - .ordinal(); + .ordinal(); if (side == facing) currentTip.add(GOLD + "Pipeline Input" + RESET); else if (side == ForgeDirection.OPPOSITES[facing]) currentTip.add(BLUE + "Pipeline Output" + RESET); @@ -333,7 +335,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setBoolean("hasSender", mSender != null); diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java index 2b4f4fe377..6b95d20d5c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java @@ -46,7 +46,7 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti } public GT_MetaTileEntity_LongDistancePipelineFluid(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -110,15 +110,15 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT) }; + TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT) }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) }; + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) }; else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), TextureFactory.builder() - .addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW) - .glow() - .build() }; + TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), TextureFactory.builder() + .addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW) + .glow() + .build() }; } } diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java index 85c009b350..dc3956d2a6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java @@ -44,7 +44,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } public GT_MetaTileEntity_LongDistancePipelineItem(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -189,15 +189,15 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT) }; + TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT) }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) }; + MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) }; else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), TextureFactory.builder() - .addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW) - .glow() - .build() }; + TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), TextureFactory.builder() + .addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW) + .glow() + .build() }; } } |