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/GT_Client.java | |
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/GT_Client.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Client.java | 495 |
1 files changed, 238 insertions, 257 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index af7a4a6c00..2874bde726 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -97,47 +97,47 @@ public class GT_Client extends GT_Proxy implements Runnable { private static final List<Block> ROTATABLE_VANILLA_BLOCKS; private static final int[][] GRID_SWITCH_TABLE = new int[][] { { 0, 5, 3, 1, 2, 4 }, { 5, 0, 1, 3, 2, 4 }, - { 1, 3, 0, 5, 2, 4 }, { 3, 1, 5, 0, 2, 4 }, { 4, 2, 3, 1, 0, 5 }, { 2, 4, 3, 1, 5, 0 }, }; + { 1, 3, 0, 5, 2, 4 }, { 3, 1, 5, 0, 2, 4 }, { 4, 2, 3, 1, 0, 5 }, { 2, 4, 3, 1, 5, 0 }, }; // don't ask. these "just works" private static final Transformation ROTATION_MARKER_TRANSFORM_CENTER = new Scale(0.5); private static final Transformation[] ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS = { - new Scale(0.25).with(new Translation(0, 0, 0.375)) - .compile(), - new Scale(0.25).with(new Translation(0.375, 0, 0)) - .compile(), - new Scale(0.25).with(new Translation(0, 0, -0.375)) - .compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0)) - .compile(), }; + new Scale(0.25).with(new Translation(0, 0, 0.375)) + .compile(), + new Scale(0.25).with(new Translation(0.375, 0, 0)) + .compile(), + new Scale(0.25).with(new Translation(0, 0, -0.375)) + .compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0)) + .compile(), }; private static final int[] ROTATION_MARKER_TRANSFORMS_SIDES = { -1, -1, 2, 0, 3, 1, -1, -1, 0, 2, 3, 1, 0, 2, -1, - -1, 3, 1, 2, 0, -1, -1, 3, 1, 1, 3, 2, 0, -1, -1, 3, 1, 2, 0, -1, -1 }; + -1, 3, 1, 2, 0, -1, -1, 3, 1, 1, 3, 2, 0, -1, -1, 3, 1, 2, 0, -1, -1 }; private static final Transformation[] ROTATION_MARKER_TRANSFORMS_CORNER = { - new Scale(0.25).with(new Translation(0.375, 0, 0.375)) - .compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0.375)) - .compile(), - new Scale(0.25).with(new Translation(0.375, 0, -0.375)) - .compile(), - new Scale(0.25).with(new Translation(-0.375, 0, -0.375)) - .compile(), }; + new Scale(0.25).with(new Translation(0.375, 0, 0.375)) + .compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0.375)) + .compile(), + new Scale(0.25).with(new Translation(0.375, 0, -0.375)) + .compile(), + new Scale(0.25).with(new Translation(-0.375, 0, -0.375)) + .compile(), }; private static int rotationMarkerDisplayList; private static boolean rotationMarkerDisplayListCompiled = false; static { ROTATABLE_VANILLA_BLOCKS = Arrays.asList( - Blocks.piston, - Blocks.sticky_piston, - Blocks.furnace, - Blocks.lit_furnace, - Blocks.dropper, - Blocks.dispenser, - Blocks.chest, - Blocks.trapped_chest, - Blocks.ender_chest, - Blocks.hopper, - Blocks.pumpkin, - Blocks.lit_pumpkin); + Blocks.piston, + Blocks.sticky_piston, + Blocks.furnace, + Blocks.lit_furnace, + Blocks.dropper, + Blocks.dispenser, + Blocks.chest, + Blocks.trapped_chest, + Blocks.ender_chest, + Blocks.hopper, + Blocks.pumpkin, + Blocks.lit_pumpkin); } private final HashSet<String> mCapeList = new HashSet<>(); @@ -181,103 +181,103 @@ public class GT_Client extends GT_Proxy implements Runnable { mAnimationTick = 0L; mAnimationDirection = false; mPosR = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.Thaumium, - Materials.InfusedVis, - Materials.InfusedAir, - Materials.InfusedFire, - Materials.FierySteel, - Materials.Firestone); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); mPosG = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.InfusedAir, - Materials.InfusedEarth); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); mPosB = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.InfusedVis, - Materials.InfusedWater, - Materials.Thaumium); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mNegR = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegG = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegB = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mMoltenPosR = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.Thaumium, - Materials.InfusedVis, - Materials.InfusedAir, - Materials.InfusedFire, - Materials.FierySteel, - Materials.Firestone); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); mMoltenPosG = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.InfusedAir, - Materials.InfusedEarth); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); mMoltenPosB = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.InfusedVis, - Materials.InfusedWater, - Materials.Thaumium); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mMoltenNegR = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegG = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegB = Collections.singletonList(Materials.InfusedEntropy); @@ -286,7 +286,7 @@ public class GT_Client extends GT_Proxy implements Runnable { private static boolean checkedForChicken = false; private static void drawGrid(DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, - boolean aIsSneaking) { + boolean aIsSneaking) { if (!checkedForChicken) { try { Class.forName("codechicken.lib.vec.Rotation"); @@ -298,16 +298,16 @@ public class GT_Client extends GT_Proxy implements Runnable { GL11.glPushMatrix(); GL11.glTranslated( - -(aEvent.player.lastTickPosX - + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), - -(aEvent.player.lastTickPosY - + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), - -(aEvent.player.lastTickPosZ - + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); + -(aEvent.player.lastTickPosX + + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosY + + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosZ + + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); GL11.glTranslated( - (float) aEvent.target.blockX + 0.5F, - (float) aEvent.target.blockY + 0.5F, - (float) aEvent.target.blockZ + 0.5F); + (float) aEvent.target.blockX + 0.5F, + (float) aEvent.target.blockY + 0.5F, + (float) aEvent.target.blockZ + 0.5F); final int tSideHit = aEvent.target.sideHit; Rotation.sideRotations[tSideHit].glApply(); // draw grid @@ -323,10 +323,8 @@ public class GT_Client extends GT_Proxy implements Runnable { GL11.glVertex3d(+.25D, .0D, +.50D); GL11.glVertex3d(-.25D, .0D, -.50D); GL11.glVertex3d(-.25D, .0D, +.50D); - final TileEntity tTile = aEvent.player.worldObj.getTileEntity( - aEvent.target.blockX, - aEvent.target.blockY, - aEvent.target.blockZ); + final TileEntity tTile = aEvent.player.worldObj + .getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); // draw connection indicators byte tConnections = 0; @@ -404,18 +402,17 @@ public class GT_Client extends GT_Proxy implements Runnable { if (direction.ordinal() == tSideHit) drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORM_CENTER, aIsSneaking, false); else if (direction.getOpposite() - .ordinal() - == tSideHit) { - for (Transformation t : ROTATION_MARKER_TRANSFORMS_CORNER) { - drawExtendedRotationMarker(t, aIsSneaking, true); - } - } else { - drawExtendedRotationMarker( - ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit - * 6 + direction.ordinal()]], - aIsSneaking, - true); + .ordinal() == tSideHit) { + for (Transformation t : ROTATION_MARKER_TRANSFORMS_CORNER) { + drawExtendedRotationMarker(t, aIsSneaking, true); } + } else { + drawExtendedRotationMarker( + ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + + direction.ordinal()]], + aIsSneaking, + true); + } } } GL11.glPopMatrix(); // get back to player center @@ -443,15 +440,15 @@ public class GT_Client extends GT_Proxy implements Runnable { GL11.glBegin(GL_LINE_LOOP); for (int i = 0; i <= ROTATION_MARKER_RESOLUTION; i++) { GL11.glVertex3d( - Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, - 0, - Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); } for (int i = ROTATION_MARKER_RESOLUTION; i >= 0; i--) { GL11.glVertex3d( - Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, - 0, - Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); } GL11.glVertex3d(0.141114561800, 0, 0); GL11.glVertex3d(0.32, 0, -0.178885438199); @@ -532,30 +529,28 @@ public class GT_Client extends GT_Proxy implements Runnable { MinecraftForge.EVENT_BUS.register(new ExtraIcons()); Minecraft.getMinecraft() - .getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType( - new ColorsMetadataSectionSerializer(), - ColorsMetadataSection.class); + .getResourcePackRepository().rprMetadataSerializer + .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); new GT_MetaTileEntity_AdvDebugStructureWriter.ForgeEventHandler(); final String[] arr = { "renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", - "Goshen_Ithilien", "manf", "Bimgo", "leagris", "IAmMinecrafter02", "Cerous", "Devilin_Pixy", - "Bkarlsson87", "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan", - "Deathlycraft", "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", - "mattiagraz85", "sebastiank30", "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", - "Nicholas_Manuel", "Sirbab", "kehaan", "bpgames123", "semig0d", "9000bowser", "Sovereignty89", - "Kris1432", "xander_cage_", "samuraijp", "bsaa", "SpwnX", "tworf", "Kadah", "kanni", "Stute", "Hegik", - "Onlyme", "t3hero", "Hotchi", "jagoly", "Nullav", "BH5432", "Sibmer", "inceee", "foxxx0", "Hartok", - "TMSama", "Shlnen", "Carsso", "zessirb", "meep310", "Seldron", "yttr1um", "hohounk", "freebug", - "Sylphio", "jmarler", "Saberawr", "r00teniy", "Neonbeta", "yinscape", "voooon24", "Quintine", - "peach774", "lepthymo", "bildeman", "Kremnari", "Aerosalo", "OndraSter", "oscares91", "mr10movie", - "Daxx367x2", "EGERTRONx", "aka13_404", "Abouttabs", "Johnstaal", "djshiny99", "megatronp", "DZCreeper", - "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty", "UnknownXLV", "goreacraft", - "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", "chainman564", "NikitaBuker", - "Misha999777", "25FiveDetail", "AntiCivilBoy", "michaelbrady", "xXxIceFirexXx", "Speedynutty68", - "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", "diamondguy2798", - "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", "xavier0014", "adamros", - "alexbegt" }; + "Goshen_Ithilien", "manf", "Bimgo", "leagris", "IAmMinecrafter02", "Cerous", "Devilin_Pixy", "Bkarlsson87", + "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan", "Deathlycraft", + "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", "mattiagraz85", + "sebastiank30", "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", "Nicholas_Manuel", "Sirbab", + "kehaan", "bpgames123", "semig0d", "9000bowser", "Sovereignty89", "Kris1432", "xander_cage_", "samuraijp", + "bsaa", "SpwnX", "tworf", "Kadah", "kanni", "Stute", "Hegik", "Onlyme", "t3hero", "Hotchi", "jagoly", + "Nullav", "BH5432", "Sibmer", "inceee", "foxxx0", "Hartok", "TMSama", "Shlnen", "Carsso", "zessirb", + "meep310", "Seldron", "yttr1um", "hohounk", "freebug", "Sylphio", "jmarler", "Saberawr", "r00teniy", + "Neonbeta", "yinscape", "voooon24", "Quintine", "peach774", "lepthymo", "bildeman", "Kremnari", "Aerosalo", + "OndraSter", "oscares91", "mr10movie", "Daxx367x2", "EGERTRONx", "aka13_404", "Abouttabs", "Johnstaal", + "djshiny99", "megatronp", "DZCreeper", "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty", + "UnknownXLV", "goreacraft", "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", + "chainman564", "NikitaBuker", "Misha999777", "25FiveDetail", "AntiCivilBoy", "michaelbrady", + "xXxIceFirexXx", "Speedynutty68", "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", + "diamondguy2798", "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", + "xavier0014", "adamros", "alexbegt" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); } @@ -596,7 +591,7 @@ public class GT_Client extends GT_Proxy implements Runnable { try { if (GregTech_API.METATILEENTITIES[i] != null) { GregTech_API.METATILEENTITIES[i].getStackForm(1L) - .getTooltip(null, true); + .getTooltip(null, true); GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); } } catch (Throwable e) { @@ -611,18 +606,16 @@ public class GT_Client extends GT_Proxy implements Runnable { // reobf doesn't work with lambda, so this must be a class // noinspection Convert2Lambda ((IReloadableResourceManager) Minecraft.getMinecraft() - .getResourceManager()).registerReloadListener( - new IResourceManagerReloadListener() { - - @Override - public void onResourceManagerReload(IResourceManager l) { - GT_GUIColorOverride.onResourceManagerReload(); - FallbackableSteamTexture.reload(); - GregTech_API.sCoverBehaviors.values() - .forEach( - GT_CoverBehaviorBase::reloadColorOverride); - } - }); + .getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() { + + @Override + public void onResourceManagerReload(IResourceManager l) { + GT_GUIColorOverride.onResourceManagerReload(); + FallbackableSteamTexture.reload(); + GregTech_API.sCoverBehaviors.values() + .forEach(GT_CoverBehaviorBase::reloadColorOverride); + } + }); } @Override @@ -631,8 +624,8 @@ public class GT_Client extends GT_Proxy implements Runnable { try (final Scanner tScanner = new Scanner(new URL(GT_CAPE_LIST_URL).openStream())) { while (tScanner.hasNextLine()) { this.mCapeList.add( - tScanner.nextLine() - .toLowerCase()); + tScanner.nextLine() + .toLowerCase()); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -641,7 +634,7 @@ public class GT_Client extends GT_Proxy implements Runnable { try (final Scanner tScanner = new Scanner(new URL(GTNH_CAPE_LIST_URL).openStream())) { while (tScanner.hasNextLine()) { final String tName = tScanner.nextLine() - .toLowerCase(); + .toLowerCase(); if (tName.contains(":")) { if (!this.mCapeList.contains(tName.substring(0, tName.indexOf(":")))) { this.mCapeList.add(tName); @@ -682,38 +675,38 @@ public class GT_Client extends GT_Proxy implements Runnable { GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); if (!Minecraft.getMinecraft() - .isSingleplayer()) { + .isSingleplayer()) { // Check for more IC2 recipes to also catch MineTweaker additions GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getMaceratorRecipeList(), - GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, - true, - true, - true); + GT_ModHandler.getMaceratorRecipeList(), + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getCompressorRecipeList(), - GT_Recipe.GT_Recipe_Map.sCompressorRecipes, - true, - true, - true); + GT_ModHandler.getCompressorRecipeList(), + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getExtractorRecipeList(), - GT_Recipe.GT_Recipe_Map.sExtractorRecipes, - true, - true, - true); + GT_ModHandler.getExtractorRecipeList(), + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getOreWashingRecipeList(), - GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, - false, - true, - true); + GT_ModHandler.getOreWashingRecipeList(), + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + false, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getThermalCentrifugeRecipeList(), - GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, - true, - true, - true); + GT_ModHandler.getThermalCentrifugeRecipeList(), + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + true, + true, + true); } } afterSomeTime++; @@ -724,7 +717,7 @@ public class GT_Client extends GT_Proxy implements Runnable { } } for (Iterator<Map.Entry<GT_PlayedSound, Integer>> iterator = GT_Utility.sPlayedSoundMap.entrySet() - .iterator(); iterator.hasNext();) { + .iterator(); iterator.hasNext();) { Map.Entry<GT_PlayedSound, Integer> tEntry = iterator.next(); if (tEntry.getValue() < 0) { iterator.remove(); @@ -736,23 +729,21 @@ public class GT_Client extends GT_Proxy implements Runnable { if (GT_Values.updateFluidDisplayItems) { final MovingObjectPosition trace = Minecraft.getMinecraft().objectMouseOver; if (trace != null && trace.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK - && (mLastUpdatedBlockX != trace.blockX && mLastUpdatedBlockY != trace.blockY - && mLastUpdatedBlockZ != trace.blockZ || afterSomeTime % 10 == 0)) { + && (mLastUpdatedBlockX != trace.blockX && mLastUpdatedBlockY != trace.blockY + && mLastUpdatedBlockZ != trace.blockZ || afterSomeTime % 10 == 0)) { mLastUpdatedBlockX = trace.blockX; mLastUpdatedBlockY = trace.blockY; mLastUpdatedBlockZ = trace.blockZ; - final TileEntity tileEntity = aEvent.player.worldObj.getTileEntity( - trace.blockX, - trace.blockY, - trace.blockZ); + final TileEntity tileEntity = aEvent.player.worldObj + .getTileEntity(trace.blockX, trace.blockY, trace.blockZ); if (tileEntity instanceof IGregTechTileEntity gtTile) { if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) { GT_Values.NW.sendToServer( - new MessageUpdateFluidDisplayItem( - trace.blockX, - trace.blockY, - trace.blockZ, - gtTile.getWorld().provider.dimensionId)); + new MessageUpdateFluidDisplayItem( + trace.blockX, + trace.blockY, + trace.blockZ, + gtTile.getWorld().provider.dimensionId)); } } } @@ -773,34 +764,29 @@ public class GT_Client extends GT_Proxy implements Runnable { @SubscribeEvent public void onDrawBlockHighlight(DrawBlockHighlightEvent aEvent) { - final Block aBlock = aEvent.player.worldObj.getBlock( - aEvent.target.blockX, - aEvent.target.blockY, - aEvent.target.blockZ); - final TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity( - aEvent.target.blockX, - aEvent.target.blockY, - aEvent.target.blockZ); + final Block aBlock = aEvent.player.worldObj + .getBlock(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + final TileEntity aTileEntity = aEvent.player.worldObj + .getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWrenchList)) { if (aTileEntity instanceof ITurnable || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) - || aTileEntity instanceof IWrenchable) - drawGrid(aEvent, false, true, aEvent.player.isSneaking()); + || aTileEntity instanceof IWrenchable) drawGrid(aEvent, false, true, aEvent.player.isSneaking()); return; } if (!(aTileEntity instanceof ICoverable)) return; if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) drawGrid(aEvent, false, false, aEvent.player.isSneaking()); return; } if ((aEvent.currentItem == null && aEvent.player.isSneaking()) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) for (byte tSide : ALL_VALID_SIDES) if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { drawGrid(aEvent, true, false, true); @@ -977,20 +963,15 @@ public class GT_Client extends GT_Proxy implements Runnable { }; if (tString.startsWith("streaming.")) { new WorldSpawnedEventBuilder.RecordEffectEventBuilder().setIdentifier(tString.substring(10)) - .setPosition(aX, aY, aZ) - .run(); + .setPosition(aX, aY, aZ) + .run(); } else { new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(3f) - .setPitch( - tString.startsWith("note.") - ? (float) Math.pow( - 2D, - (double) (aStack.stackSize - 13) - / 12D) - : 1.0F) - .setIdentifier(tString) - .setPosition(aX, aY, aZ) - .run(); + .setPitch( + tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setIdentifier(tString) + .setPosition(aX, aY, aZ) + .run(); } } @@ -1017,19 +998,19 @@ public class GT_Client extends GT_Proxy implements Runnable { int hide = 0; for (int i : ids) { if (OreDictionary.getOreName(i) - .equals("craftingToolSolderingIron")) { + .equals("craftingToolSolderingIron")) { hide |= 0x1; break; } } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) - || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) + || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { hide |= 0x2; } return hide; |