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/api/threads | |
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/api/threads')
3 files changed, 53 insertions, 53 deletions
diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java b/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java index e4febba51f..c670307b5d 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Cable_Update.java @@ -52,17 +52,17 @@ public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { // Now see if we should add the nearby blocks to the queue: // only add blocks the cable is connected to if (tTileEntity instanceof BaseMetaPipeEntity - && ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) { + && ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) { ChunkCoordinates tCoords; for (byte tSide : ALL_VALID_SIDES) { - if (((GT_MetaPipeEntity_Cable) ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity()).isConnectedAtSide( - tSide)) { + if (((GT_MetaPipeEntity_Cable) ((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity()) + .isConnectedAtSide(tSide)) { final ForgeDirection offset = ForgeDirection.getOrientation(tSide); if (visited.add( - tCoords = new ChunkCoordinates( - aCoords.posX + offset.offsetX, - aCoords.posY + offset.offsetY, - aCoords.posZ + offset.offsetZ))) + tCoords = new ChunkCoordinates( + aCoords.posX + offset.offsetX, + aCoords.posY + offset.offsetY, + aCoords.posZ + offset.offsetZ))) tQueue.add(tCoords); } } @@ -70,13 +70,13 @@ public class GT_Runnable_Cable_Update extends GT_Runnable_MachineBlockUpdate { } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Well this update was broken... " + mCoords - + ", mWorld={" - + world.getProviderName() - + " @dimId " - + world.provider.dimensionId - + "}", - e); + "Well this update was broken... " + mCoords + + ", mWorld={" + + world.getProviderName() + + " @dimId " + + world.provider.dimensionId + + "}", + e); } } } diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java index f06c3ac06b..ceb6adfa7a 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_MachineBlockUpdate.java @@ -77,12 +77,12 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { public static void initExecutorService() { EXECUTOR_SERVICE = Executors.newFixedThreadPool( - Math.max( - 1, - (Runtime.getRuntime() - .availableProcessors() * 2 - / 3)), - THREAD_FACTORY); + Math.max( + 1, + (Runtime.getRuntime() + .availableProcessors() * 2 + / 3)), + THREAD_FACTORY); } public static void shutdownExecutorService() { @@ -95,7 +95,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { // Wait a while for tasks to respond to being cancelled if (!EXECUTOR_SERVICE.awaitTermination(60, TimeUnit.SECONDS)) { GT_Mod.GT_FML_LOGGER.error( - "Well this didn't terminated well... GT_Runnable_MachineBlockUpdate.shutdownExecutorService"); + "Well this didn't terminated well... GT_Runnable_MachineBlockUpdate.shutdownExecutorService"); } } } catch (InterruptedException ie) { @@ -104,7 +104,7 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { EXECUTOR_SERVICE.shutdownNow(); // Preserve interrupt status Thread.currentThread() - .interrupt(); + .interrupt(); } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error("Well this didn't terminated well...", e); // (Re-)Cancel in case @@ -130,8 +130,8 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { try { tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ); isMachineBlock = GregTech_API.isMachineBlock( - world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ), - world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ)); + world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ), + world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ)); } finally { GT_Proxy.TICK_LOCK.unlock(); } @@ -145,9 +145,9 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { // 2) If the tile says we should recursively updated (pipes don't, machine blocks do) // 3) If the block at the coordinates is marked as a machine block if (visited.size() < 5 - || (tTileEntity instanceof IMachineBlockUpdateable - && ((IMachineBlockUpdateable) tTileEntity).isMachineBlockUpdateRecursive()) - || isMachineBlock) { + || (tTileEntity instanceof IMachineBlockUpdateable + && ((IMachineBlockUpdateable) tTileEntity).isMachineBlockUpdateRecursive()) + || isMachineBlock) { ChunkCoordinates tCoords; if (visited.add(tCoords = new ChunkCoordinates(aCoords.posX + 1, aCoords.posY, aCoords.posZ))) @@ -166,13 +166,13 @@ public class GT_Runnable_MachineBlockUpdate implements Runnable { } } catch (Exception e) { GT_Mod.GT_FML_LOGGER.error( - "Well this update was broken... " + mCoords - + ", mWorld={" - + world.getProviderName() - + " @dimId " - + world.provider.dimensionId - + "}", - e); + "Well this update was broken... " + mCoords + + ", mWorld={" + + world.getProviderName() + + " @dimId " + + world.provider.dimensionId + + "}", + e); } } } diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java index dfee28cf47..b3c04bc233 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java @@ -15,7 +15,7 @@ public class GT_Runnable_Sound implements Runnable { private final float mSoundStrength, mSoundModulation; public GT_Runnable_Sound(World aWorld, double aX, double aY, double aZ, int aTimeUntilNextSound, - ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { + ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { mWorld = aWorld; mX = aX; mY = aY; @@ -30,16 +30,16 @@ public class GT_Runnable_Sound implements Runnable { * @deprecated Use {@link #GT_Runnable_Sound(World, double, double, double, int, ResourceLocation, float, float)} */ public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, - ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { + ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { this( - aWorld, - (double) aX + 0.5D, - (double) aY + 0.5D, - (double) aZ + 0.5D, - aTimeUntilNextSound, - aSoundResourceLocation, - aSoundStrength, - aSoundModulation); + aWorld, + (double) aX + 0.5D, + (double) aY + 0.5D, + (double) aZ + 0.5D, + aTimeUntilNextSound, + aSoundResourceLocation, + aSoundStrength, + aSoundModulation); } /** @@ -47,16 +47,16 @@ public class GT_Runnable_Sound implements Runnable { */ @Deprecated public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, - float aSoundStrength, float aSoundModulation) { + float aSoundStrength, float aSoundModulation) { this( - aWorld, - (double) aX + 0.5D, - (double) aY + 0.5D, - (double) aZ + 0.5D, - aTimeUntilNextSound, - new ResourceLocation(aSoundName), - aSoundStrength, - aSoundModulation); + aWorld, + (double) aX + 0.5D, + (double) aY + 0.5D, + (double) aZ + 0.5D, + aTimeUntilNextSound, + new ResourceLocation(aSoundName), + aSoundStrength, + aSoundModulation); } @Override |