diff --git a/patches/server/0103-Replace-Entity-active-effects-map-with-optimized-col.patch b/patches/server/0105-Replace-Entity-active-effects-map-with-optimized-col.patch similarity index 100% rename from patches/server/0103-Replace-Entity-active-effects-map-with-optimized-col.patch rename to patches/server/0105-Replace-Entity-active-effects-map-with-optimized-col.patch diff --git a/patches/server/0104-Replace-criterion-map-with-optimized-collection.patch b/patches/server/0106-Replace-criterion-map-with-optimized-collection.patch similarity index 100% rename from patches/server/0104-Replace-criterion-map-with-optimized-collection.patch rename to patches/server/0106-Replace-criterion-map-with-optimized-collection.patch diff --git a/patches/server/0105-Replace-world-map-with-optimized-collection.patch b/patches/server/0107-Replace-world-map-with-optimized-collection.patch similarity index 100% rename from patches/server/0105-Replace-world-map-with-optimized-collection.patch rename to patches/server/0107-Replace-world-map-with-optimized-collection.patch diff --git a/patches/server/0106-Replace-brain-maps-with-optimized-collection.patch b/patches/server/0108-Replace-brain-maps-with-optimized-collection.patch similarity index 100% rename from patches/server/0106-Replace-brain-maps-with-optimized-collection.patch rename to patches/server/0108-Replace-brain-maps-with-optimized-collection.patch diff --git a/patches/server/0107-Reduce-worldgen-allocations.patch b/patches/server/0109-Reduce-worldgen-allocations.patch similarity index 100% rename from patches/server/0107-Reduce-worldgen-allocations.patch rename to patches/server/0109-Reduce-worldgen-allocations.patch diff --git a/patches/server/0108-Use-caffeine-cache-kickPermission-instead-of-using-g.patch b/patches/server/0110-Use-caffeine-cache-kickPermission-instead-of-using-g.patch similarity index 100% rename from patches/server/0108-Use-caffeine-cache-kickPermission-instead-of-using-g.patch rename to patches/server/0110-Use-caffeine-cache-kickPermission-instead-of-using-g.patch diff --git a/patches/server/0109-Do-not-place-player-if-the-server-is-full.patch b/patches/server/0111-Do-not-place-player-if-the-server-is-full.patch similarity index 97% rename from patches/server/0109-Do-not-place-player-if-the-server-is-full.patch rename to patches/server/0111-Do-not-place-player-if-the-server-is-full.patch index 8c855b4a..251a3643 100644 --- a/patches/server/0109-Do-not-place-player-if-the-server-is-full.patch +++ b/patches/server/0111-Do-not-place-player-if-the-server-is-full.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Do not place player if the server is full Fix https://github.com/PaperMC/Paper/issues/10668 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8e3bbc7a0cf2a3e5999738c0f764544f5e64ef4a..a7fadf66ff2935c6a3751f2121b0e1a8860cc3f9 100644 +index 6da4b4d3f00527aabf398ab614140bc6f8c7442c..f3b98a4a66cec8d6c9dc46479d573c2fb453837a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -377,6 +377,13 @@ public abstract class PlayerList { diff --git a/patches/server/0110-Fix-MC-65198.patch b/patches/server/0112-Fix-MC-65198.patch similarity index 100% rename from patches/server/0110-Fix-MC-65198.patch rename to patches/server/0112-Fix-MC-65198.patch diff --git a/patches/server/0111-Fix-MC-183518.patch b/patches/server/0113-Fix-MC-183518.patch similarity index 100% rename from patches/server/0111-Fix-MC-183518.patch rename to patches/server/0113-Fix-MC-183518.patch diff --git a/patches/server/0112-Fix-MC-200418.patch b/patches/server/0114-Fix-MC-200418.patch similarity index 100% rename from patches/server/0112-Fix-MC-200418.patch rename to patches/server/0114-Fix-MC-200418.patch diff --git a/patches/server/0113-Fix-MC-119417.patch b/patches/server/0115-Fix-MC-119417.patch similarity index 100% rename from patches/server/0113-Fix-MC-119417.patch rename to patches/server/0115-Fix-MC-119417.patch diff --git a/patches/server/0114-Fix-MC-223153.patch b/patches/server/0116-Fix-MC-223153.patch similarity index 100% rename from patches/server/0114-Fix-MC-223153.patch rename to patches/server/0116-Fix-MC-223153.patch diff --git a/patches/server/0115-Fix-MC-177381.patch b/patches/server/0117-Fix-MC-177381.patch similarity index 100% rename from patches/server/0115-Fix-MC-177381.patch rename to patches/server/0117-Fix-MC-177381.patch diff --git a/patches/server/0116-Optimize-LeavesProtocolManager-init-protocol.patch b/patches/server/0119-Optimize-LeavesProtocolManager-init-protocol.patch similarity index 100% rename from patches/server/0116-Optimize-LeavesProtocolManager-init-protocol.patch rename to patches/server/0119-Optimize-LeavesProtocolManager-init-protocol.patch diff --git a/patches/server/0117-Cache-CraftEntityType-minecraftToBukkit-convert.patch b/patches/server/0120-Cache-CraftEntityType-minecraftToBukkit-convert.patch similarity index 100% rename from patches/server/0117-Cache-CraftEntityType-minecraftToBukkit-convert.patch rename to patches/server/0120-Cache-CraftEntityType-minecraftToBukkit-convert.patch diff --git a/patches/server/0118-Configurable-player-knockback-zombie.patch b/patches/server/0121-Configurable-player-knockback-zombie.patch similarity index 100% rename from patches/server/0118-Configurable-player-knockback-zombie.patch rename to patches/server/0121-Configurable-player-knockback-zombie.patch diff --git a/patches/server/0119-Hide-specified-item-components-to-clients.patch b/patches/server/0122-Hide-specified-item-components-to-clients.patch similarity index 100% rename from patches/server/0119-Hide-specified-item-components-to-clients.patch rename to patches/server/0122-Hide-specified-item-components-to-clients.patch diff --git a/patches/server/0120-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/patches/server/0123-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch similarity index 100% rename from patches/server/0120-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch rename to patches/server/0123-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch diff --git a/patches/server/0121-Paper-PR-Reduce-work-done-in-CraftMapCanvas.drawImag.patch b/patches/server/0124-Paper-PR-Reduce-work-done-in-CraftMapCanvas.drawImag.patch similarity index 100% rename from patches/server/0121-Paper-PR-Reduce-work-done-in-CraftMapCanvas.drawImag.patch rename to patches/server/0124-Paper-PR-Reduce-work-done-in-CraftMapCanvas.drawImag.patch diff --git a/patches/server/0122-Paper-PR-Throttle-failed-spawn-attempts.patch b/patches/server/0125-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from patches/server/0122-Paper-PR-Throttle-failed-spawn-attempts.patch rename to patches/server/0125-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/patches/server/0123-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/patches/server/0126-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch similarity index 100% rename from patches/server/0123-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch rename to patches/server/0126-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch diff --git a/patches/server/0124-Paper-Fix-move-to-jline-terminal-ffm-on-java-22-and-.patch b/patches/server/0129-Paper-Fix-move-to-jline-terminal-ffm-on-java-22-and-.patch similarity index 100% rename from patches/server/0124-Paper-Fix-move-to-jline-terminal-ffm-on-java-22-and-.patch rename to patches/server/0129-Paper-Fix-move-to-jline-terminal-ffm-on-java-22-and-.patch diff --git a/patches/server/0125-Dont-send-useless-entity-packets.patch b/patches/server/0130-Dont-send-useless-entity-packets.patch similarity index 100% rename from patches/server/0125-Dont-send-useless-entity-packets.patch rename to patches/server/0130-Dont-send-useless-entity-packets.patch diff --git a/patches/server/0126-Don-t-spawn-if-lastSpawnState-is-null.patch b/patches/server/0131-Don-t-spawn-if-lastSpawnState-is-null.patch similarity index 100% rename from patches/server/0126-Don-t-spawn-if-lastSpawnState-is-null.patch rename to patches/server/0131-Don-t-spawn-if-lastSpawnState-is-null.patch diff --git a/patches/server/0127-Multithreaded-Tracker.patch b/patches/server/0132-Multithreaded-Tracker.patch similarity index 100% rename from patches/server/0127-Multithreaded-Tracker.patch rename to patches/server/0132-Multithreaded-Tracker.patch diff --git a/patches/server/0128-Nitori-Async-playerdata-Save.patch b/patches/server/0133-Nitori-Async-playerdata-Save.patch similarity index 100% rename from patches/server/0128-Nitori-Async-playerdata-Save.patch rename to patches/server/0133-Nitori-Async-playerdata-Save.patch diff --git a/patches/server/0129-Change-max-stack-count.patch b/patches/server/0134-Change-max-stack-count.patch similarity index 100% rename from patches/server/0129-Change-max-stack-count.patch rename to patches/server/0134-Change-max-stack-count.patch diff --git a/patches/server/0130-Reduce-object-complexity-to-make-block-isValid-calls.patch b/patches/server/0135-Reduce-object-complexity-to-make-block-isValid-calls.patch similarity index 100% rename from patches/server/0130-Reduce-object-complexity-to-make-block-isValid-calls.patch rename to patches/server/0135-Reduce-object-complexity-to-make-block-isValid-calls.patch diff --git a/patches/server/0131-Optimize-nearby-alive-players-for-spawning.patch b/patches/server/0136-Optimize-nearby-alive-players-for-spawning.patch similarity index 100% rename from patches/server/0131-Optimize-nearby-alive-players-for-spawning.patch rename to patches/server/0136-Optimize-nearby-alive-players-for-spawning.patch diff --git a/patches/server/0132-Cache-blockstate-cache.patch b/patches/server/0137-Cache-blockstate-cache.patch similarity index 100% rename from patches/server/0132-Cache-blockstate-cache.patch rename to patches/server/0137-Cache-blockstate-cache.patch diff --git a/patches/server/0133-Asynchronous-locator.patch b/patches/server/0138-Asynchronous-locator.patch similarity index 100% rename from patches/server/0133-Asynchronous-locator.patch rename to patches/server/0138-Asynchronous-locator.patch diff --git a/patches/server/0134-Smart-sort-entities-in-NearestLivingEntitySensor.patch b/patches/server/0139-Smart-sort-entities-in-NearestLivingEntitySensor.patch similarity index 100% rename from patches/server/0134-Smart-sort-entities-in-NearestLivingEntitySensor.patch rename to patches/server/0139-Smart-sort-entities-in-NearestLivingEntitySensor.patch diff --git a/patches/server/0135-Further-reduce-memory-footprint-of-CompoundTag.patch b/patches/server/0140-Further-reduce-memory-footprint-of-CompoundTag.patch similarity index 100% rename from patches/server/0135-Further-reduce-memory-footprint-of-CompoundTag.patch rename to patches/server/0140-Further-reduce-memory-footprint-of-CompoundTag.patch diff --git a/patches/server/0136-Optimize-Entity-distanceToSqr.patch b/patches/server/0141-Optimize-Entity-distanceToSqr.patch similarity index 96% rename from patches/server/0136-Optimize-Entity-distanceToSqr.patch rename to patches/server/0141-Optimize-Entity-distanceToSqr.patch index 27e08b6c..d50a6a69 100644 --- a/patches/server/0136-Optimize-Entity-distanceToSqr.patch +++ b/patches/server/0141-Optimize-Entity-distanceToSqr.patch @@ -8,10 +8,10 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o these methods more able to be inlined by the JIT compiler. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 08a3714c530fb375ee729e91965c65efb9e6e3d2..6a19390aff7c8f7170467d2c6306b00779f23082 100644 +index c4965b7582edfdf97cac82c1472f8fcc1a880a6b..d55560a12be8846db7c0969f5e72f3d79bf0d9c4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2368,33 +2368,41 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2370,33 +2370,41 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.xRotO = this.getXRot(); } diff --git a/patches/server/0137-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch b/patches/server/0142-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch similarity index 100% rename from patches/server/0137-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch rename to patches/server/0142-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch diff --git a/patches/server/0138-EMC-Default-don-t-use-blockstate-snapshots.patch b/patches/server/0143-EMC-Default-don-t-use-blockstate-snapshots.patch similarity index 100% rename from patches/server/0138-EMC-Default-don-t-use-blockstate-snapshots.patch rename to patches/server/0143-EMC-Default-don-t-use-blockstate-snapshots.patch diff --git a/patches/server/0139-Cache-tile-entity-position.patch b/patches/server/0144-Cache-tile-entity-position.patch similarity index 100% rename from patches/server/0139-Cache-tile-entity-position.patch rename to patches/server/0144-Cache-tile-entity-position.patch diff --git a/patches/server/0140-TT20-Lag-compensation.patch b/patches/server/0145-TT20-Lag-compensation.patch similarity index 100% rename from patches/server/0140-TT20-Lag-compensation.patch rename to patches/server/0145-TT20-Lag-compensation.patch diff --git a/patches/server/0141-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch b/patches/server/0146-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch similarity index 90% rename from patches/server/0141-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch rename to patches/server/0146-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch index a17cd81f..2a172dd7 100644 --- a/patches/server/0141-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch +++ b/patches/server/0146-Fix-wrong-entity-behavior-in-fluid-caused-by-inconsi.patch @@ -10,10 +10,10 @@ This issue caused by inconsistent fluid count, because of a condition change in LevelChunkSection#setBlockState, introduced by Moonrise's block count optimisation diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6a19390aff7c8f7170467d2c6306b00779f23082..d0bbbd2044809bdb1273248297f5d9fb87011189 100644 +index d55560a12be8846db7c0969f5e72f3d79bf0d9c4..3c467580195355fb1a04568e628f601365fdbfe0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4797,7 +4797,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4799,7 +4799,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess for (int currY = minYIterate; currY < maxYIterate; ++currY) { net.minecraft.world.level.chunk.LevelChunkSection section = sections[(currY >> 4) - minSection]; diff --git a/patches/server/0142-C2ME-Reduce-Allocations.patch b/patches/server/0147-C2ME-Reduce-Allocations.patch similarity index 100% rename from patches/server/0142-C2ME-Reduce-Allocations.patch rename to patches/server/0147-C2ME-Reduce-Allocations.patch diff --git a/patches/server/0143-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch b/patches/server/0148-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch similarity index 100% rename from patches/server/0143-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch rename to patches/server/0148-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch diff --git a/patches/server/0144-Lithium-fast-util.patch b/patches/server/0149-Lithium-fast-util.patch similarity index 100% rename from patches/server/0144-Lithium-fast-util.patch rename to patches/server/0149-Lithium-fast-util.patch diff --git a/patches/server/0145-Lithium-CompactSineLUT.patch b/patches/server/0150-Lithium-CompactSineLUT.patch similarity index 100% rename from patches/server/0145-Lithium-CompactSineLUT.patch rename to patches/server/0150-Lithium-CompactSineLUT.patch diff --git a/patches/server/0146-Lithium-IterateOutwardsCache.patch b/patches/server/0151-Lithium-IterateOutwardsCache.patch similarity index 100% rename from patches/server/0146-Lithium-IterateOutwardsCache.patch rename to patches/server/0151-Lithium-IterateOutwardsCache.patch diff --git a/patches/server/0147-Lithium-HashedList.patch b/patches/server/0152-Lithium-HashedList.patch similarity index 100% rename from patches/server/0147-Lithium-HashedList.patch rename to patches/server/0152-Lithium-HashedList.patch diff --git a/patches/server/0148-Use-MCUtil.asyncExecutor-for-MAIN_WORKER_EXECUTOR.patch b/patches/server/0153-Use-MCUtil.asyncExecutor-for-MAIN_WORKER_EXECUTOR.patch similarity index 100% rename from patches/server/0148-Use-MCUtil.asyncExecutor-for-MAIN_WORKER_EXECUTOR.patch rename to patches/server/0153-Use-MCUtil.asyncExecutor-for-MAIN_WORKER_EXECUTOR.patch diff --git a/patches/server/0149-Better-inline-world-height.patch b/patches/server/0154-Better-inline-world-height.patch similarity index 51% rename from patches/server/0149-Better-inline-world-height.patch rename to patches/server/0154-Better-inline-world-height.patch index 61b58624..6c85dcd3 100644 --- a/patches/server/0149-Better-inline-world-height.patch +++ b/patches/server/0154-Better-inline-world-height.patch @@ -4,45 +4,70 @@ Date: Fri, 8 Nov 2024 04:07:25 +0100 Subject: [PATCH] Better inline world height +diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java b/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java +index af9623240ff2d389aa7090623f507720e7dbab7d..a286c8989f8c53fb896be7a3a8e15f850ece1df8 100644 +--- a/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java ++++ b/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java +@@ -7,6 +7,14 @@ public final class WorldUtil { + + // min, max are inclusive + ++ public static int getMaxSection(final Level world) { ++ return world.getMaxSection() - 1; // getMaxSection() is exclusive ++ } ++ ++ public static int getMinSection(final Level world) { ++ return world.getMinSection(); ++ } ++ + public static int getMaxSection(final LevelHeightAccessor world) { + return world.getMaxSection() - 1; // getMaxSection() is exclusive + } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a34ae9bfda0df2834565dc3ea1fb48f7f2efc099..704631730cf7679446a98cea6faeb70eb89c9849 100644 +index a34ae9bfda0df2834565dc3ea1fb48f7f2efc099..37783156170e3c0315d043963244f6a42e025576 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -733,11 +733,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -732,12 +732,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl + // Paper end - optimise random ticking // Gale start - Airplane - inline level height - private final int minBuildHeight, levelHeightAccessorMinSection, height, maxBuildHeight, levelHeightAccessorMaxSection; +- private final int minBuildHeight, levelHeightAccessorMinSection, height, maxBuildHeight, levelHeightAccessorMaxSection; - @Override public final int getMaxBuildHeight() { return this.maxBuildHeight; } - @Override public final int getMinSection() { return this.levelHeightAccessorMinSection; } - @Override public final int getMaxSection() { return this.levelHeightAccessorMaxSection; } - @Override public final int getMinBuildHeight() { return this.minBuildHeight; } - @Override public final int getHeight() { return this.height; } -+ @Override public final int getMaxBuildHeight() { return maxBuildHeight; } -+ @Override public final int getMinSection() { return levelHeightAccessorMinSection; } -+ @Override public final int getMaxSection() { return levelHeightAccessorMaxSection; } -+ @Override public final int getMinBuildHeight() { return minBuildHeight; } ++ private final int height, minBuildHeight, maxBuildHeight, sectionsCount, levelMinSection, levelMaxSection; + @Override public final int getHeight() { return height; } ++ @Override public final int getMinBuildHeight() { return minBuildHeight; } ++ @Override public final int getMaxBuildHeight() { return maxBuildHeight; } ++ @Override public final int getSectionsCount() { return sectionsCount; } ++ @Override public final int getMinSection() { return levelMinSection; } ++ @Override public final int getMaxSection() { return levelMaxSection; } ++ @Override public final boolean isOutsideBuildHeight(BlockPos pos) { final int y = pos.getY(); return y < minBuildHeight || y >= maxBuildHeight; } ++ @Override public final boolean isOutsideBuildHeight(int y) { return y < minBuildHeight || y >= maxBuildHeight; } ++ @Override public final int getSectionIndex(int y) { return (y >> 4) - levelMinSection; } ++ @Override public final int getSectionIndexFromSectionY(int coord) { return coord - levelMinSection; } ++ @Override public final int getSectionYFromSectionIndex(int index) { return index + levelMinSection; } // Gale end - Airplane - inline level height protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config & Anti-Xray // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot -@@ -760,13 +760,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl - this.dimensionTypeRegistration = holder; +@@ -761,11 +767,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl final DimensionType dimensionmanager = (DimensionType) holder.value(); -- // Gale start - Airplane - inline level height + // Gale start - Airplane - inline level height - this.minBuildHeight = LevelAccessor.super.getMinBuildHeight(); - this.levelHeightAccessorMinSection = LevelAccessor.super.getMinSection(); - this.height = LevelAccessor.super.getHeight(); - this.maxBuildHeight = LevelAccessor.super.getMaxBuildHeight(); - this.levelHeightAccessorMaxSection = LevelAccessor.super.getMaxSection(); -- // Gale end - Airplane - inline level height -+ // Gale start - Airplane - Pluto - inline level height -+ this.minBuildHeight = dimensionmanager.minY(); -+ this.levelHeightAccessorMinSection = SectionPos.blockToSectionCoord(dimensionmanager.minY()); -+ this.height = dimensionmanager.height(); -+ this.maxBuildHeight = dimensionmanager.minY() + dimensionmanager.height(); -+ this.levelHeightAccessorMaxSection = SectionPos.blockToSectionCoord((dimensionmanager.minY() + dimensionmanager.height()) - 1) + 1; -+ // Gale end - Airplane - Pluto - inline level height ++ final DimensionType dim = dimensionmanager; ++ this.height = dim.height(); ++ this.minBuildHeight = dim.minY(); ++ this.maxBuildHeight = dim.minY() + dim.height(); ++ this.sectionsCount = (((dim.minY() + dim.height() - 1) >> 4) + 1) - (dim.minY() >> 4); ++ this.levelMinSection = dim.minY() >> 4; ++ this.levelMaxSection = ((dim.minY() + dim.height() - 1) >> 4) + 1; + // Gale end - Airplane - inline level height this.dimension = resourcekey; this.isClientSide = flag; - if (dimensionmanager.coordinateScale() != 1.0D) { diff --git a/patches/server/0150-Use-faster-and-thread-safe-ban-list-date-format-pars.patch b/patches/server/0155-Use-faster-and-thread-safe-ban-list-date-format-pars.patch similarity index 100% rename from patches/server/0150-Use-faster-and-thread-safe-ban-list-date-format-pars.patch rename to patches/server/0155-Use-faster-and-thread-safe-ban-list-date-format-pars.patch diff --git a/patches/server/0151-Collect-then-startEachNonRunningBehavior-in-Brain.patch b/patches/server/0156-Collect-then-startEachNonRunningBehavior-in-Brain.patch similarity index 100% rename from patches/server/0151-Collect-then-startEachNonRunningBehavior-in-Brain.patch rename to patches/server/0156-Collect-then-startEachNonRunningBehavior-in-Brain.patch diff --git a/patches/server/0152-Lithium-equipment-tracking.patch b/patches/server/0157-Lithium-equipment-tracking.patch similarity index 100% rename from patches/server/0152-Lithium-equipment-tracking.patch rename to patches/server/0157-Lithium-equipment-tracking.patch diff --git a/patches/server/0153-Faster-CraftServer-getworlds-list-creation.patch b/patches/server/0158-Faster-CraftServer-getworlds-list-creation.patch similarity index 100% rename from patches/server/0153-Faster-CraftServer-getworlds-list-creation.patch rename to patches/server/0158-Faster-CraftServer-getworlds-list-creation.patch diff --git a/patches/server/0154-C2ME-Optimize-world-gen-math.patch b/patches/server/0159-C2ME-Optimize-world-gen-math.patch similarity index 97% rename from patches/server/0154-C2ME-Optimize-world-gen-math.patch rename to patches/server/0159-C2ME-Optimize-world-gen-math.patch index 20d88f78..f0a6a9df 100644 --- a/patches/server/0154-C2ME-Optimize-world-gen-math.patch +++ b/patches/server/0159-C2ME-Optimize-world-gen-math.patch @@ -52,7 +52,7 @@ index ca93a97256350789ca56f910862c9d717ca7670b..3a1a5257e1a98cc1d520f407bb1f8c74 private static double getBeardContribution(int x, int y, int z, int yy) { diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java -index c991da3d975e07f3e1e59d5b2e91ed629ea608e6..4a56c06fef4efbed9fa72cf11583f25854c5a9c2 100644 +index f7d0eb09640b8b8eeec9269eca867f53e05d023b..a21c77def8c27315b246e3cff4642951a0bf70b6 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java @@ -76,14 +76,13 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {