diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-10-02 07:31:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 05:31:08 +0000 |
commit | 3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3 (patch) | |
tree | 107d9d2442891990ef1cdef1d8bb2df6bb96952a /src/main/java/gtPlusPlus/everglades/world | |
parent | bfc7b2b07f72d0903a70791ff96f9c837ddd5ff0 (diff) | |
download | GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.gz GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.tar.bz2 GT5-Unofficial-3b9bd1188e932e6bb8041f7bb9afbf3ce75e26d3.zip |
Cleanup the codebase (#3311)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/everglades/world')
-rw-r--r-- | src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java | 4 | ||||
-rw-r--r-- | src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java | 35 |
2 files changed, 19 insertions, 20 deletions
diff --git a/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java b/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java index 7e463e194c..e9d021d6fe 100644 --- a/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java +++ b/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java @@ -135,7 +135,7 @@ public class TeleporterDimensionMod extends Teleporter { if (flag) { this.destinationCoordinateCache .add(j1, new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); - this.destinationCoordinateKeys.add(Long.valueOf(j1)); + this.destinationCoordinateKeys.add(j1); } double d11 = i + 0.5D; @@ -457,7 +457,7 @@ public class TeleporterDimensionMod extends Teleporter { } } - public class PortalPosition extends ChunkCoordinates { + public static class PortalPosition extends ChunkCoordinates { /** * The worldtime at which this PortalPosition was last verified diff --git a/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java index d1a621addf..4e1db08533 100644 --- a/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java +++ b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java @@ -25,9 +25,9 @@ public class WorldChunkManagerCustom extends WorldChunkManager { /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ private GenLayer biomeIndexLayer; /** The BiomeCache object for this world. */ - private BiomeCache biomeCache; + private final BiomeCache biomeCache; /** A list of biomes that the player can spawn in. */ - private List<BiomeGenBase> biomesToSpawnIn; + private final List<BiomeGenBase> biomesToSpawnIn; @SuppressWarnings({ "rawtypes" }) public WorldChunkManagerCustom() { @@ -80,12 +80,12 @@ public class WorldChunkManagerCustom extends WorldChunkManager { } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock"); - crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1)); - crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(z)); - crashreportcategory.addCrashSection("w", Integer.valueOf(width)); - crashreportcategory.addCrashSection("h", Integer.valueOf(length)); + crashreportcategory.addCrashSection("biome id", i1); + crashreportcategory.addCrashSection("downfalls[] size", listToReuse.length); + crashreportcategory.addCrashSection("x", x); + crashreportcategory.addCrashSection("z", z); + crashreportcategory.addCrashSection("w", width); + crashreportcategory.addCrashSection("h", length); throw new ReportedException(crashreport); } } @@ -125,11 +125,11 @@ public class WorldChunkManagerCustom extends WorldChunkManager { } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock"); - crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(par2)); - crashreportcategory.addCrashSection("z", Integer.valueOf(par3)); - crashreportcategory.addCrashSection("w", Integer.valueOf(par4)); - crashreportcategory.addCrashSection("h", Integer.valueOf(par5)); + crashreportcategory.addCrashSection("biomes[] size", par1ArrayOfBiomeGenBase.length); + crashreportcategory.addCrashSection("x", par2); + crashreportcategory.addCrashSection("z", par3); + crashreportcategory.addCrashSection("w", par4); + crashreportcategory.addCrashSection("h", par5); throw new ReportedException(crashreport); } } @@ -159,15 +159,14 @@ public class WorldChunkManagerCustom extends WorldChunkManager { if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0) { BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y); System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); - return listToReuse; } else { int[] aint = this.biomeIndexLayer.getInts(x, y, width, length); for (int i = 0; i < width * length; ++i) { listToReuse[i] = BiomeGenBase.getBiome(aint[i]); } - return listToReuse; } + return listToReuse; } /** @@ -199,9 +198,9 @@ public class WorldChunkManagerCustom extends WorldChunkManager { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer"); crashreportcategory.addCrashSection("Layer", this.genBiomes.toString()); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(y)); - crashreportcategory.addCrashSection("radius", Integer.valueOf(z)); + crashreportcategory.addCrashSection("x", x); + crashreportcategory.addCrashSection("z", y); + crashreportcategory.addCrashSection("radius", z); crashreportcategory.addCrashSection("allowed", par4List); throw new ReportedException(crashreport); } |