From ac1cc484c29e00a21f54d55a7d333695316bb692 Mon Sep 17 00:00:00 2001 From: MrHua269 Date: Sat, 15 Jun 2024 04:17:37 +0000 Subject: [PATCH] Added comments for some config --- .../0005-Add-config-for-unsafe-teleportation.patch | 4 ++-- ...014-Try-fixing-folia-spector-teleportation.patch | 13 +++++++++---- ...sync-if-entity-was-moving-to-another-regio.patch | 12 +++++++++--- ...ixing-folia-off-region-POI-accessing-issue.patch | 11 ++++++++--- ...leportAsync-calling-during-moving-event-be.patch | 8 +++++--- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/patches/server/0005-Add-config-for-unsafe-teleportation.patch b/patches/server/0005-Add-config-for-unsafe-teleportation.patch index 4d0224a..fbf3601 100644 --- a/patches/server/0005-Add-config-for-unsafe-teleportation.patch +++ b/patches/server/0005-Add-config-for-unsafe-teleportation.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add config for unsafe teleportation diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/UnsafeTeleportationConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/UnsafeTeleportationConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..1b0de6f0ccab72c409a63dc1904829008e30328e +index 0000000000000000000000000000000000000000..ea374875f529b30db17e8b8cb07b99a600b722dc --- /dev/null +++ b/src/main/java/me/earthme/luminol/config/modules/fixes/UnsafeTeleportationConfig.java @@ -0,0 +1,20 @@ @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..1b0de6f0ccab72c409a63dc190482900 +import me.earthme.luminol.config.IConfigModule; + +public class UnsafeTeleportationConfig implements IConfigModule { -+ @ConfigInfo(baseName = "enabled", comments = "If you want to use sand duping,please turn on this") ++ @ConfigInfo(baseName = "enabled", comments = "Allow non player entities enter end portals if enabled.If you want to use sand duping,please turn on this") + public static boolean enabled = false; + + @Override diff --git a/patches/server/0014-Try-fixing-folia-spector-teleportation.patch b/patches/server/0014-Try-fixing-folia-spector-teleportation.patch index f571f93..dc9b0be 100644 --- a/patches/server/0014-Try-fixing-folia-spector-teleportation.patch +++ b/patches/server/0014-Try-fixing-folia-spector-teleportation.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Try fixing folia spector teleportation diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaSpectorTeleportationFixConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaSpectorTeleportationFixConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..8487799cdfb776eaca33b57f7c99ae3aeadb890d +index 0000000000000000000000000000000000000000..01f8c6ff3662569be5a4ff998bcd4fbbcb555105 --- /dev/null +++ b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaSpectorTeleportationFixConfig.java -@@ -0,0 +1,20 @@ +@@ -0,0 +1,25 @@ +package me.earthme.luminol.config.modules.fixes; + +import me.earthme.luminol.config.ConfigInfo; @@ -17,7 +17,12 @@ index 0000000000000000000000000000000000000000..8487799cdfb776eaca33b57f7c99ae3a +import me.earthme.luminol.config.IConfigModule; + +public class FoliaSpectorTeleportationFixConfig implements IConfigModule { -+ @ConfigInfo(baseName = "enabled") ++ @ConfigInfo(baseName = "enabled", comments = ++ """ ++ The teleportation of spector players would call absMoveTo directly.\s ++ And when the camera teleported to another region,this would call absMoveTo\s ++ to let the spector player move to another region without any checks, which \s ++ would trigger the async catcher and crash the server""") + public static boolean fixSpectorTeleportFolia = false; + + @Override @@ -31,7 +36,7 @@ index 0000000000000000000000000000000000000000..8487799cdfb776eaca33b57f7c99ae3a + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 11b5155820d38a42e62f68fe0f70fe4daf80f5d1..90f4cc0bd3722400411e6b1aa2d03205a350ee8a 100644 +index db32beabfa7ba17b1c46d36fa1dc27bc20e06feb..20f8c9bfdde62f1572e22319ebb752d12d9d5bac 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -892,6 +892,11 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0015-Teleport-async-if-entity-was-moving-to-another-regio.patch b/patches/server/0015-Teleport-async-if-entity-was-moving-to-another-regio.patch index 71e2516..4d52b18 100644 --- a/patches/server/0015-Teleport-async-if-entity-was-moving-to-another-regio.patch +++ b/patches/server/0015-Teleport-async-if-entity-was-moving-to-another-regio.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Teleport async if entity was moving to another region at once diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaEntityMovingFixConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaEntityMovingFixConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..73d99a105a18231901e691922b0c283adae0cc79 +index 0000000000000000000000000000000000000000..0e51d465db3554ac80d00c6b85cc1f013f3949ba --- /dev/null +++ b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaEntityMovingFixConfig.java -@@ -0,0 +1,22 @@ +@@ -0,0 +1,28 @@ +package me.earthme.luminol.config.modules.fixes; + +import me.earthme.luminol.config.ConfigInfo; @@ -17,7 +17,13 @@ index 0000000000000000000000000000000000000000..73d99a105a18231901e691922b0c283a +import me.earthme.luminol.config.IConfigModule; + +public class FoliaEntityMovingFixConfig implements IConfigModule { -+ @ConfigInfo(baseName = "enabled") ++ @ConfigInfo(baseName = "enabled", comments = ++ """ ++ A simple fix of a issue on folia\s ++ (Some times the entity would\s ++ have a large moment that cross the\s ++ different tick regions and it would\s ++ make the server crashed) but sometimes it might doesn't work""") + public static boolean enabled = false; + @ConfigInfo(baseName = "warn_on_detected") + public static boolean warnOnDetected = true; diff --git a/patches/server/0016-Try-fixing-folia-off-region-POI-accessing-issue.patch b/patches/server/0016-Try-fixing-folia-off-region-POI-accessing-issue.patch index 1045b86..88b3fc7 100644 --- a/patches/server/0016-Try-fixing-folia-off-region-POI-accessing-issue.patch +++ b/patches/server/0016-Try-fixing-folia-off-region-POI-accessing-issue.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Try fixing folia off region POI accessing issue diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaPOIAccessOffRegionFixConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaPOIAccessOffRegionFixConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..343c85ded7e7abc22fac0aaeb7be786e9bd7b39a +index 0000000000000000000000000000000000000000..7812a71f05dd32646037afd22cdabf72bb23b0d1 --- /dev/null +++ b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaPOIAccessOffRegionFixConfig.java -@@ -0,0 +1,20 @@ +@@ -0,0 +1,25 @@ +package me.earthme.luminol.config.modules.fixes; + +import me.earthme.luminol.config.ConfigInfo; @@ -17,7 +17,12 @@ index 0000000000000000000000000000000000000000..343c85ded7e7abc22fac0aaeb7be786e +import me.earthme.luminol.config.IConfigModule; + +public class FoliaPOIAccessOffRegionFixConfig implements IConfigModule { -+ @ConfigInfo(baseName = "enabled") ++ @ConfigInfo(baseName = "enabled", comments = ++ """ ++ The POIManager of folia has something which has not been patched\s ++ for regionized ticking and these would trigger the async catcher\s ++ and make the server crash.If you would like to prevent it and didn't\s ++ mind the side effect(currently unknown), you can enable this""") + public static boolean enabled = false; + + @Override diff --git a/patches/server/0017-Prevent-teleportAsync-calling-during-moving-event-be.patch b/patches/server/0017-Prevent-teleportAsync-calling-during-moving-event-be.patch index 26feb75..055d6fa 100644 --- a/patches/server/0017-Prevent-teleportAsync-calling-during-moving-event-be.patch +++ b/patches/server/0017-Prevent-teleportAsync-calling-during-moving-event-be.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent teleportAsync calling during moving event being diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaTeleportAsyncFixConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaTeleportAsyncFixConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..b8aceab54bb60000e7c56810140271022f5147a2 +index 0000000000000000000000000000000000000000..8f1449545d6d217b46a9ffae705123daefe55b25 --- /dev/null +++ b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaTeleportAsyncFixConfig.java -@@ -0,0 +1,22 @@ +@@ -0,0 +1,24 @@ +package me.earthme.luminol.config.modules.fixes; + +import me.earthme.luminol.config.ConfigInfo; @@ -17,7 +17,9 @@ index 0000000000000000000000000000000000000000..b8aceab54bb60000e7c5681014027102 +import me.earthme.luminol.config.IConfigModule; + +public class FoliaTeleportAsyncFixConfig implements IConfigModule { -+ @ConfigInfo(baseName = "enabled") ++ @ConfigInfo(baseName = "enabled", comments = ++ "A fix which fixed some bugs of teleportAsync " + ++ "that caused by plugins(such as Residence)") + public static boolean enabled = false; + @ConfigInfo(baseName = "throw_on_detected") + public static boolean throwOnDetected = true;