diff --git a/patches/server/0004-Lumina-server-config-and-command.patch b/patches/server/0004-Lumina-server-config-and-command.patch index 2505ee5..bcc1e32 100644 --- a/patches/server/0004-Lumina-server-config-and-command.patch +++ b/patches/server/0004-Lumina-server-config-and-command.patch @@ -431,20 +431,18 @@ index 0000000000000000000000000000000000000000..4a50bf4aae9cb4c20e160e0739aa1db4 +} diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Fix.java b/src/main/java/org/leavesmc/lumina/config/modules/Fix.java new file mode 100644 -index 0000000000000000000000000000000000000000..3c084fbef60b6c560c8f0648acf57413ae6b60c5 +index 0000000000000000000000000000000000000000..9ce750c78fdd04d62f97ed590226650079ca77bf --- /dev/null +++ b/src/main/java/org/leavesmc/lumina/config/modules/Fix.java -@@ -0,0 +1,13 @@ +@@ -0,0 +1,11 @@ +package org.leavesmc.lumina.config.modules; + -+import org.leavesmc.lumina.config.modules.fix.FoliaEntityMovingFixConfig; -+import org.leavesmc.lumina.config.modules.fix.FoliaTeleportAsyncFixConfig; ++import org.leavesmc.lumina.config.modules.fix.FixFoliaTeleportAsyncConfig; +import org.spongepowered.configurate.objectmapping.ConfigSerializable; + +@ConfigSerializable +public class Fix { -+ public FoliaEntityMovingFixConfig fixEntityMoving = new FoliaEntityMovingFixConfig(); -+ public FoliaTeleportAsyncFixConfig fixTeleportAsync = new FoliaTeleportAsyncFixConfig(); ++ public FixFoliaTeleportAsyncConfig fixFoliaTeleportAsync = new FixFoliaTeleportAsyncConfig(); + public boolean fixFoliaSpectorTeleport = true; + public boolean fixFoliaPoiAccessOffRegion = true; +} @@ -509,35 +507,18 @@ index 0000000000000000000000000000000000000000..6b93c0bf96b2a1b779ab12b2b65245fd + public boolean enableCarpetProtocol = false; + public LeavesBladerenProtocolConfig leavesBladerenProtocol = new LeavesBladerenProtocolConfig(); +} -diff --git a/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaEntityMovingFixConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaEntityMovingFixConfig.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4f8d731b897c8550d7a2b034146d4b99c0a3de45 ---- /dev/null -+++ b/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaEntityMovingFixConfig.java -@@ -0,0 +1,10 @@ -+package org.leavesmc.lumina.config.modules.fix; -+ -+import org.spongepowered.configurate.objectmapping.ConfigSerializable; -+import org.spongepowered.configurate.objectmapping.meta.Setting; -+ -+@ConfigSerializable -+public class FoliaEntityMovingFixConfig { -+ public boolean enabled = false; -+ public boolean warnOnDetected = true; -+} -diff --git a/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaTeleportAsyncFixConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaTeleportAsyncFixConfig.java +diff --git a/src/main/java/org/leavesmc/lumina/config/modules/fix/FixFoliaTeleportAsyncConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/fix/FixFoliaTeleportAsyncConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..9552e998a723693f700e0a26542691791a59f9e5 +index 0000000000000000000000000000000000000000..b043bf36de0604028cb7bdd166d000d2dec76360 --- /dev/null -+++ b/src/main/java/org/leavesmc/lumina/config/modules/fix/FoliaTeleportAsyncFixConfig.java -@@ -0,0 +1,10 @@ ++++ b/src/main/java/org/leavesmc/lumina/config/modules/fix/FixFoliaTeleportAsyncConfig.java +@@ -0,0 +1,9 @@ +package org.leavesmc.lumina.config.modules.fix; + +import org.spongepowered.configurate.objectmapping.ConfigSerializable; -+import org.spongepowered.configurate.objectmapping.meta.Setting; + +@ConfigSerializable -+public class FoliaTeleportAsyncFixConfig { ++public class FixFoliaTeleportAsyncConfig { + public boolean enabled = false; + public boolean throwOnDetected = true; +} diff --git a/patches/server/0009-Prevent-teleportAsync-calling-during-moving-event-be.patch b/patches/server/0009-Prevent-teleportAsync-calling-during-moving-event-be.patch index 7647796..9b0f344 100644 --- a/patches/server/0009-Prevent-teleportAsync-calling-during-moving-event-be.patch +++ b/patches/server/0009-Prevent-teleportAsync-calling-during-moving-event-be.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleportAsync calling during moving event being diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index fdd745062f1516338cf91489d9e64f706912b470..053801f728638d70f45e711922f8f101a40d098c 100644 +index 29f8946dc609056c28ed2cf819e25feb086b2d9a..3c95ea6fdab99e414270fd5ed960c539b7ada265 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -346,6 +346,10 @@ public class ServerPlayer extends Player { @@ -44,7 +44,7 @@ index 2ae2527bbe5a08af98eb6405a8403c2199052f19..7ddb7d5aa1047eb8151aef01d5db694d // If the event is cancelled we move the player back to their old location. if (event.isCancelled()) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bfc6c269d96201e8001b6575d4cb59cd70d1d7bc..d50fef64e608a4cb7aa06e5037474061bb1d02e4 100644 +index bfc6c269d96201e8001b6575d4cb59cd70d1d7bc..676feaa5670d703429a987ff274ccfa755d64183 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -4038,6 +4038,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -52,9 +52,9 @@ index bfc6c269d96201e8001b6575d4cb59cd70d1d7bc..d50fef64e608a4cb7aa06e5037474061 io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot teleport entity async"); + //Luminol start - Prevent teleportAsync calling during moving event being handled -+ if (this instanceof ServerPlayer player && org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixTeleportAsync.enabled){ ++ if (this instanceof ServerPlayer player && org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixFoliaTeleportAsync.enabled){ + if (player.handlingMoveEvent){ -+ if (org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixTeleportAsync.throwOnDetected){ ++ if (org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixFoliaTeleportAsync.throwOnDetected){ + throw new IllegalStateException("Player " + player.getScoreboardName() + " is trying to teleport to " + pos + " during move event handling!"); + } + MinecraftServer.LOGGER.warn("Player {} is trying to teleport to {} during move event handling!",player.getScoreboardName(),pos);