diff options
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-08-30 17:31:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-30 17:31:24 +0200 |
| commit | 59fbe6b43fb455c546064c554da576f10e364bbe (patch) | |
| tree | a8881bebec2a461f632af74920146e351fdc36e6 /src/main/java/com/detrav/utils | |
| parent | f0129bff91127286a06d707056ec8ad4c02309ff (diff) | |
| download | GT5-Unofficial-59fbe6b43fb455c546064c554da576f10e364bbe.tar.gz GT5-Unofficial-59fbe6b43fb455c546064c554da576f10e364bbe.tar.bz2 GT5-Unofficial-59fbe6b43fb455c546064c554da576f10e364bbe.zip | |
Spotless apply for branch mergeDetrav for #2998 (#2999)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
Diffstat (limited to 'src/main/java/com/detrav/utils')
| -rw-r--r-- | src/main/java/com/detrav/utils/FluidColors.java | 88 | ||||
| -rw-r--r-- | src/main/java/com/detrav/utils/GTppHelper.java | 2 |
2 files changed, 69 insertions, 21 deletions
diff --git a/src/main/java/com/detrav/utils/FluidColors.java b/src/main/java/com/detrav/utils/FluidColors.java index a5cd94e492..25611dbf3e 100644 --- a/src/main/java/com/detrav/utils/FluidColors.java +++ b/src/main/java/com/detrav/utils/FluidColors.java @@ -18,17 +18,34 @@ public class FluidColors { // ProgressManager.ProgressBar progressBar = ProgressManager.push("Making Fluid Colors", (int) // (Materials.values().length + // FluidRegistry.getRegisteredFluids().values().stream().filter(Objects::nonNull).count())); - Arrays.stream(Materials.values()).forEach(mat -> { - // progressBar.step(mat.mDefaultLocalName); - if (mat.getSolid(0) != null) fluidColors.putIfAbsent(mat.getSolid(0).getFluidID(), mat.mRGBa); - if (mat.getGas(0) != null) fluidColors.putIfAbsent(mat.getGas(0).getFluidID(), mat.mRGBa); - if (mat.getFluid(0) != null) fluidColors.putIfAbsent(mat.getFluid(0).getFluidID(), mat.mRGBa); - if (mat.getMolten(0) != null) fluidColors.putIfAbsent(mat.getMolten(0).getFluidID(), mat.mRGBa); - }); - FluidRegistry.getRegisteredFluids().values().stream().filter(Objects::nonNull).forEach(fluid -> { - // progressBar.step(fluid.getName()); - fluidColors.putIfAbsent(fluid.getID(), convertColorInt(fluid.getColor())); - }); + Arrays.stream(Materials.values()) + .forEach(mat -> { + // progressBar.step(mat.mDefaultLocalName); + if (mat.getSolid(0) != null) fluidColors.putIfAbsent( + mat.getSolid(0) + .getFluidID(), + mat.mRGBa); + if (mat.getGas(0) != null) fluidColors.putIfAbsent( + mat.getGas(0) + .getFluidID(), + mat.mRGBa); + if (mat.getFluid(0) != null) fluidColors.putIfAbsent( + mat.getFluid(0) + .getFluidID(), + mat.mRGBa); + if (mat.getMolten(0) != null) fluidColors.putIfAbsent( + mat.getMolten(0) + .getFluidID(), + mat.mRGBa); + }); + FluidRegistry.getRegisteredFluids() + .values() + .stream() + .filter(Objects::nonNull) + .forEach(fluid -> { + // progressBar.step(fluid.getName()); + fluidColors.putIfAbsent(fluid.getID(), convertColorInt(fluid.getColor())); + }); // ProgressManager.pop(progressBar); } @@ -45,28 +62,59 @@ public class FluidColors { // fluidColors.put(Materials.Naquadah.getMolten(0).getFluid().getID(), new short[]{0x20, 0x20, 0x20}); // fluidColors.put(Materials.NaquadahEnriched.getMolten(0).getFluid().getID(), new short[]{0x60, 0x60, // 0x60}); - fluidColors.put(Materials.Lead.getMolten(0).getFluid().getID(), new short[] { 0xd0, 0xd0, 0xd0 }); + fluidColors.put( + Materials.Lead.getMolten(0) + .getFluid() + .getID(), + new short[] { 0xd0, 0xd0, 0xd0 }); fluidColors.put(Materials.Chlorobenzene.mFluid.getID(), new short[] { 0x40, 0x80, 0x40 }); - fluidColors.put(FluidRegistry.getFluid("liquid_extra_heavy_oil").getID(), new short[] { 0x00, 0x00, 0x50 }); + fluidColors.put( + FluidRegistry.getFluid("liquid_extra_heavy_oil") + .getID(), + new short[] { 0x00, 0x00, 0x50 }); fluidColors.put(Materials.Oxygen.mGas.getID(), new short[] { 0x40, 0x40, 0xA0 }); fluidColors.put(Materials.Nitrogen.mGas.getID(), new short[] { 0x00, 0x80, 0xd0 }); fluidColors.put(Materials.Methane.mGas.getID(), new short[] { 0x80, 0x20, 0x20 }); fluidColors.put(Materials.Ethane.mGas.getID(), new short[] { 0x40, 0x80, 0x20 }); fluidColors.put(Materials.Ethylene.mGas.getID(), new short[] { 0xd0, 0xd0, 0xd0 }); fluidColors.put(FluidRegistry.LAVA.getID(), new short[] { 0xFF, 0x00, 0x00 }); - fluidColors.put(FluidRegistry.getFluid("unknowwater").getID(), new short[] { 0x8A, 0x2B, 0xE2 }); + fluidColors.put( + FluidRegistry.getFluid("unknowwater") + .getID(), + new short[] { 0x8A, 0x2B, 0xE2 }); fluidColors.put(Materials.Hydrogen.mGas.getID(), new short[] { 0x32, 0x32, 0xD6 }); fluidColors.put(Materials.SulfuricAcid.mFluid.getID(), new short[] { 0xFF, 0xB9, 0x0F }); fluidColors.put(Materials.HydricSulfide.mFluid.getID(), new short[] { 0xFF, 0x8F, 0x43 }); fluidColors.put(Materials.CarbonMonoxide.mGas.getID(), new short[] { 0x10, 0x4E, 0x8B }); fluidColors.put(Materials.CarbonDioxide.mGas.getID(), new short[] { 0x69, 0x69, 0x69 }); - fluidColors.put(FluidRegistry.getFluid("ic2distilledwater").getID(), new short[] { 0x1E, 0x90, 0xFF }); + fluidColors.put( + FluidRegistry.getFluid("ic2distilledwater") + .getID(), + new short[] { 0x1E, 0x90, 0xFF }); fluidColors.put(Materials.Deuterium.mGas.getID(), new short[] { 0xFF, 0xE3, 0x9F }); - fluidColors.put(Materials.Iron.getMolten(0).getFluid().getID(), new short[] { 0x8B, 0x88, 0x78 }); - fluidColors.put(Materials.Tin.getMolten(0).getFluid().getID(), new short[] { 0xE7, 0xE7, 0xE4 }); - fluidColors.put(Materials.Copper.getMolten(0).getFluid().getID(), new short[] { 0xFF, 0x7F, 0x24 }); - fluidColors.put(FluidRegistry.getFluid("fluorine").getID(), new short[] { 0x99, 0xC1, 0xAD }); - fluidColors.put(FluidRegistry.getFluid("hydrofluoricacid").getID(), new short[] { 0x00, 0xCE, 0xD1 }); + fluidColors.put( + Materials.Iron.getMolten(0) + .getFluid() + .getID(), + new short[] { 0x8B, 0x88, 0x78 }); + fluidColors.put( + Materials.Tin.getMolten(0) + .getFluid() + .getID(), + new short[] { 0xE7, 0xE7, 0xE4 }); + fluidColors.put( + Materials.Copper.getMolten(0) + .getFluid() + .getID(), + new short[] { 0xFF, 0x7F, 0x24 }); + fluidColors.put( + FluidRegistry.getFluid("fluorine") + .getID(), + new short[] { 0x99, 0xC1, 0xAD }); + fluidColors.put( + FluidRegistry.getFluid("hydrofluoricacid") + .getID(), + new short[] { 0x00, 0xCE, 0xD1 }); fluidColors.put(Materials.PhosphoricAcid.mFluid.getID(), new short[] { 0xEE, 0x76, 0x00 }); // possible nulls diff --git a/src/main/java/com/detrav/utils/GTppHelper.java b/src/main/java/com/detrav/utils/GTppHelper.java index 59db67eac7..dd86b3d9f6 100644 --- a/src/main/java/com/detrav/utils/GTppHelper.java +++ b/src/main/java/com/detrav/utils/GTppHelper.java @@ -25,7 +25,7 @@ public class GTppHelper { try { Short i = (short) (n + 1); Material m = ((Material) gtPlusPlus.core.material.ORES.class.getFields()[n] - .get(gtPlusPlus.core.material.ORES.class.getFields()[n])); + .get(gtPlusPlus.core.material.ORES.class.getFields()[n])); decodeoresGTpp.put(i, m); encodeoresGTpp.put(m, i); } catch (Exception ignored) {} |
