diff --git a/patches/server/0113-Load-portal-destination-chunk-before-entity-teleport.patch b/patches/server/0113-Load-portal-destination-chunk-before-entity-teleport.patch new file mode 100644 index 0000000..8dbedce --- /dev/null +++ b/patches/server/0113-Load-portal-destination-chunk-before-entity-teleport.patch @@ -0,0 +1,60 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martijn Muijsers +Date: Sun, 25 Dec 2022 16:55:45 +0100 +Subject: [PATCH] Load portal destination chunk before entity teleport + +License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) +Gale - https://galemc.org + +This patch is based on the following patch: +"Load chunks when entities go through an end portal" +By: PureGero +As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) +Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) + +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index d05e5b9b4dec0779489856dab5e50b53ff698c38..2929669ae099482185f1abef60c569bf00b0597f 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -3446,6 +3446,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + Entity entity = this.getType().create(worldserver); + + if (entity != null) { ++ // Gale start - MultiPaper - load portal destination chunk before entity teleport ++ if (entity.level.galeConfig().gameplayMechanics.technical.loadPortalDestinationChunkBeforeEntityTeleport) { ++ BlockPos pos = new BlockPos(position); ++ worldserver.getChunkSource().addRegionTicket(TicketType.PORTAL, new ChunkPos(pos), 1, pos); ++ worldserver.getChunkAt(pos); ++ } ++ // Gale end - MultiPaper - load portal destination chunk before entity teleport + entity.restoreFrom(this); + entity.moveTo(position.x, position.y, position.z, yaw, pitch); // Paper - use EntityPortalExitEvent values + entity.setDeltaMovement(velocity); // Paper - use EntityPortalExitEvent values +diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +index 53bc702695674ea969a3a0b7c7946e1d9b4a4f82..c45f4b9d06956a58b4e59afe70203ee8abbfccee 100644 +--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java ++++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +@@ -315,6 +315,23 @@ public class GaleWorldConfiguration extends ConfigurationPart { + + } + ++ public Technical technical; ++ public class Technical extends ConfigurationPart { ++ ++ // Gale start - MultiPaper - load portal destination chunk before entity teleport ++ /** ++ * Whether to fully load chunks before teleporting an entity, when an entity enters a portal. ++ * This forces the entire server to wait for the chunk to be loaded. ++ * ++ */ ++ public boolean loadPortalDestinationChunkBeforeEntityTeleport = false; ++ // Gale end - MultiPaper - load portal destination chunk before entity teleport ++ ++ } ++ + @Override + public void postProcess() { + this.playerMaxInteractionDistanceSquared = this.playerMaxInteractionDistance * this.playerMaxInteractionDistance; // Gale - make max interaction distance configurable diff --git a/patches/server/0113-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0114-Prevent-entities-random-strolling-into-non-ticking-c.patch similarity index 96% rename from patches/server/0113-Prevent-entities-random-strolling-into-non-ticking-c.patch rename to patches/server/0114-Prevent-entities-random-strolling-into-non-ticking-c.patch index 4a9ca12..dee3ea5 100644 --- a/patches/server/0113-Prevent-entities-random-strolling-into-non-ticking-c.patch +++ b/patches/server/0114-Prevent-entities-random-strolling-into-non-ticking-c.patch @@ -36,7 +36,7 @@ index 216929c838446c3c14d9b9906ffa625ef35fcbc8..29c7f53a4fa88a77c4076a6294e689e4 } else { this.wantedX = vec3.x; diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -index 53bc702695674ea969a3a0b7c7946e1d9b4a4f82..885afe06ed3cc323325a63b82b587abb3883195a 100644 +index c45f4b9d06956a58b4e59afe70203ee8abbfccee..b02eeb68002ed802714ade7a89fecc249d95375b 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java @@ -264,6 +264,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { diff --git a/patches/server/0114-CraftBukkit-UUID-to-world-map.patch b/patches/server/0115-CraftBukkit-UUID-to-world-map.patch similarity index 100% rename from patches/server/0114-CraftBukkit-UUID-to-world-map.patch rename to patches/server/0115-CraftBukkit-UUID-to-world-map.patch diff --git a/patches/server/0115-Don-t-double-save-stored-user-lists.patch b/patches/server/0116-Don-t-double-save-stored-user-lists.patch similarity index 100% rename from patches/server/0115-Don-t-double-save-stored-user-lists.patch rename to patches/server/0116-Don-t-double-save-stored-user-lists.patch diff --git a/patches/server/0116-Specific-interval-TPS-API.patch b/patches/server/0117-Specific-interval-TPS-API.patch similarity index 100% rename from patches/server/0116-Specific-interval-TPS-API.patch rename to patches/server/0117-Specific-interval-TPS-API.patch diff --git a/patches/server/0117-5-second-TPS-average.patch b/patches/server/0118-5-second-TPS-average.patch similarity index 100% rename from patches/server/0117-5-second-TPS-average.patch rename to patches/server/0118-5-second-TPS-average.patch diff --git a/patches/server/0118-Measure-last-tick-time.patch b/patches/server/0119-Measure-last-tick-time.patch similarity index 100% rename from patches/server/0118-Measure-last-tick-time.patch rename to patches/server/0119-Measure-last-tick-time.patch diff --git a/patches/server/0119-Last-tick-time-API.patch b/patches/server/0120-Last-tick-time-API.patch similarity index 100% rename from patches/server/0119-Last-tick-time-API.patch rename to patches/server/0120-Last-tick-time-API.patch diff --git a/patches/server/0120-Show-last-tick-time-in-tps-command.patch b/patches/server/0121-Show-last-tick-time-in-tps-command.patch similarity index 100% rename from patches/server/0120-Show-last-tick-time-in-tps-command.patch rename to patches/server/0121-Show-last-tick-time-in-tps-command.patch diff --git a/patches/server/0121-Increase-time-statistics-in-intervals.patch b/patches/server/0122-Increase-time-statistics-in-intervals.patch similarity index 100% rename from patches/server/0121-Increase-time-statistics-in-intervals.patch rename to patches/server/0122-Increase-time-statistics-in-intervals.patch diff --git a/patches/server/0122-For-collision-check-has-physics-before-same-vehicle.patch b/patches/server/0123-For-collision-check-has-physics-before-same-vehicle.patch similarity index 94% rename from patches/server/0122-For-collision-check-has-physics-before-same-vehicle.patch rename to patches/server/0123-For-collision-check-has-physics-before-same-vehicle.patch index 2b91672..8df69cf 100644 --- a/patches/server/0122-For-collision-check-has-physics-before-same-vehicle.patch +++ b/patches/server/0123-For-collision-check-has-physics-before-same-vehicle.patch @@ -16,7 +16,7 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d05e5b9b4dec0779489856dab5e50b53ff698c38..7a2c57900d6d651bc9e05073fffe1476f6032e80 100644 +index 2929669ae099482185f1abef60c569bf00b0597f..26f06bf9b738938f47eb5707d843eec66d0edb3b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1983,8 +1983,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0123-Skip-negligible-planar-movement-multiplication.patch b/patches/server/0124-Skip-negligible-planar-movement-multiplication.patch similarity index 94% rename from patches/server/0123-Skip-negligible-planar-movement-multiplication.patch rename to patches/server/0124-Skip-negligible-planar-movement-multiplication.patch index 34ca97e..5b2b465 100644 --- a/patches/server/0123-Skip-negligible-planar-movement-multiplication.patch +++ b/patches/server/0124-Skip-negligible-planar-movement-multiplication.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7a2c57900d6d651bc9e05073fffe1476f6032e80..5f1cea3088cb48804c46d7aadf347a8481470933 100644 +index 26f06bf9b738938f47eb5707d843eec66d0edb3b..271f818e2aff1e7527aad9417be848f2cfb89da6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1187,9 +1187,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0124-Reduce-RandomSource-instances.patch b/patches/server/0125-Reduce-RandomSource-instances.patch similarity index 100% rename from patches/server/0124-Reduce-RandomSource-instances.patch rename to patches/server/0125-Reduce-RandomSource-instances.patch diff --git a/patches/server/0125-Server-thread-priority-environment-variable.patch b/patches/server/0126-Server-thread-priority-environment-variable.patch similarity index 100% rename from patches/server/0125-Server-thread-priority-environment-variable.patch rename to patches/server/0126-Server-thread-priority-environment-variable.patch diff --git a/patches/server/0126-Thread-safety-annotations.patch b/patches/server/0127-Thread-safety-annotations.patch similarity index 100% rename from patches/server/0126-Thread-safety-annotations.patch rename to patches/server/0127-Thread-safety-annotations.patch diff --git a/patches/server/0127-CPU-cores-estimation.patch b/patches/server/0128-CPU-cores-estimation.patch similarity index 100% rename from patches/server/0127-CPU-cores-estimation.patch rename to patches/server/0128-CPU-cores-estimation.patch diff --git a/patches/server/0128-Mutex-utility.patch b/patches/server/0129-Mutex-utility.patch similarity index 100% rename from patches/server/0128-Mutex-utility.patch rename to patches/server/0129-Mutex-utility.patch diff --git a/patches/server/0129-Paired-lock-and-condition-utility.patch b/patches/server/0130-Paired-lock-and-condition-utility.patch similarity index 100% rename from patches/server/0129-Paired-lock-and-condition-utility.patch rename to patches/server/0130-Paired-lock-and-condition-utility.patch diff --git a/patches/server/0130-Unterminable-executor-utility.patch b/patches/server/0131-Unterminable-executor-utility.patch similarity index 100% rename from patches/server/0130-Unterminable-executor-utility.patch rename to patches/server/0131-Unterminable-executor-utility.patch diff --git a/patches/server/0131-FIFO-concurrent-queue-utility.patch b/patches/server/0132-FIFO-concurrent-queue-utility.patch similarity index 100% rename from patches/server/0131-FIFO-concurrent-queue-utility.patch rename to patches/server/0132-FIFO-concurrent-queue-utility.patch diff --git a/patches/server/0132-Base-thread-pools.patch b/patches/server/0133-Base-thread-pools.patch similarity index 100% rename from patches/server/0132-Base-thread-pools.patch rename to patches/server/0133-Base-thread-pools.patch diff --git a/patches/server/0133-Non-blocking-PooledObjects.patch b/patches/server/0134-Non-blocking-PooledObjects.patch similarity index 100% rename from patches/server/0133-Non-blocking-PooledObjects.patch rename to patches/server/0134-Non-blocking-PooledObjects.patch