Skip to content

Commit

Permalink
Rename some config
Browse files Browse the repository at this point in the history
  • Loading branch information
MC-XiaoHei authored Jul 23, 2024
1 parent 46d3787 commit 913fb0b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
47 changes: 22 additions & 25 deletions patches/server/0004-Lumina-server-config-and-command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ index 0000000000000000000000000000000000000000..3879e94473e6e8499a53d9c89fb6fab7
\ No newline at end of file
diff --git a/src/main/java/org/leavesmc/lumina/config/ConfigModule.java b/src/main/java/org/leavesmc/lumina/config/ConfigModule.java
new file mode 100644
index 0000000000000000000000000000000000000000..a4700c541d425a25d0e26e8ef82dcf47b45647c3
index 0000000000000000000000000000000000000000..25e77db19cd365441216b82544fa0f4b59b5c04c
--- /dev/null
+++ b/src/main/java/org/leavesmc/lumina/config/ConfigModule.java
@@ -0,0 +1,16 @@
+package org.leavesmc.lumina.config;
+
+import org.leavesmc.lumina.config.modules.Fix;
+import org.leavesmc.lumina.config.modules.Gameplay;
+import org.leavesmc.lumina.config.modules.Protocol;
+import org.leavesmc.lumina.config.modules.Misc;
+import org.leavesmc.lumina.config.modules.Performance;
+import org.spongepowered.configurate.objectmapping.ConfigSerializable;
Expand All @@ -296,7 +296,7 @@ index 0000000000000000000000000000000000000000..a4700c541d425a25d0e26e8ef82dcf47
+public class ConfigModule {
+ public String configVersion = "1";
+ public Fix fix = new Fix();
+ public Gameplay gameplay = new Gameplay();
+ public Protocol protocol = new Protocol();
+ public Performance performance = new Performance();
+ public Misc misc = new Misc();
+}
Expand Down Expand Up @@ -431,10 +431,10 @@ 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..fd4173a1873871f5cc560fb0eb2a16554cd687c8
index 0000000000000000000000000000000000000000..3c084fbef60b6c560c8f0648acf57413ae6b60c5
--- /dev/null
+++ b/src/main/java/org/leavesmc/lumina/config/modules/Fix.java
@@ -0,0 +1,16 @@
@@ -0,0 +1,13 @@
+package org.leavesmc.lumina.config.modules;
+
+import org.leavesmc.lumina.config.modules.fix.FoliaEntityMovingFixConfig;
Expand All @@ -445,27 +445,8 @@ index 0000000000000000000000000000000000000000..fd4173a1873871f5cc560fb0eb2a1655
+public class Fix {
+ public FoliaEntityMovingFixConfig fixEntityMoving = new FoliaEntityMovingFixConfig();
+ public FoliaTeleportAsyncFixConfig fixTeleportAsync = new FoliaTeleportAsyncFixConfig();
+ public boolean fixSpectorTeleportFolia = true;
+ public boolean enableUnsafeTeleportation = true;
+ public boolean useVanillaRandomSourceForPlayers = true;
+ public boolean fixFoliaSpectorTeleport = true;
+ public boolean fixFoliaPoiAccessOffRegion = true;
+ public boolean enableVoidTrading = true;
+}
diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Gameplay.java b/src/main/java/org/leavesmc/lumina/config/modules/Gameplay.java
new file mode 100644
index 0000000000000000000000000000000000000000..b4eba642ebdcb1dadab0b1085ac94b4cc14682ac
--- /dev/null
+++ b/src/main/java/org/leavesmc/lumina/config/modules/Gameplay.java
@@ -0,0 +1,10 @@
+package org.leavesmc.lumina.config.modules;
+
+import org.leavesmc.lumina.config.modules.gameplay.LeavesBladerenProtocolConfig;
+import org.spongepowered.configurate.objectmapping.ConfigSerializable;
+
+@ConfigSerializable
+public class Gameplay {
+ public boolean enableCarpetProtocol = false;
+ public LeavesBladerenProtocolConfig leavesBladerenProtocol = new LeavesBladerenProtocolConfig();
+}
diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Misc.java b/src/main/java/org/leavesmc/lumina/config/modules/Misc.java
new file mode 100644
Expand Down Expand Up @@ -512,6 +493,22 @@ index 0000000000000000000000000000000000000000..ce1b53b29e5a1b515ecbd7f99804d795
+ public boolean allowLoadChunksToActiveClimbingEntities = false;
+ public boolean optimizeSuffocation = false;
+}
diff --git a/src/main/java/org/leavesmc/lumina/config/modules/Protocol.java b/src/main/java/org/leavesmc/lumina/config/modules/Protocol.java
new file mode 100644
index 0000000000000000000000000000000000000000..6b93c0bf96b2a1b779ab12b2b65245fd410a7190
--- /dev/null
+++ b/src/main/java/org/leavesmc/lumina/config/modules/Protocol.java
@@ -0,0 +1,10 @@
+package org.leavesmc.lumina.config.modules;
+
+import org.leavesmc.lumina.config.modules.gameplay.LeavesBladerenProtocolConfig;
+import org.spongepowered.configurate.objectmapping.ConfigSerializable;
+
+@ConfigSerializable
+public class Protocol {
+ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Subject: [PATCH] Luminol Try fixing folia spector teleportation


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8ee61c2415455f8d4ff1ae687753117a40eb687b..fdd745062f1516338cf91489d9e64f706912b470 100644
index 8ee61c2415455f8d4ff1ae687753117a40eb687b..29f8946dc609056c28ed2cf819e25feb086b2d9a 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 {
}

Entity entity = this.getCamera();
+ //Luminol start - Fix folia spector teleportation
+ if (!io.papermc.paper.util.TickThread.isTickThreadFor(entity) && org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixSpectorTeleportFolia){
+ if (!io.papermc.paper.util.TickThread.isTickThreadFor(entity) && org.leavesmc.lumina.config.LuminaConfig.configModule.fix.fixFoliaSpectorTeleport){
+ this.setCamera(this);
+ }
+ //Luminol end
Expand Down

0 comments on commit 913fb0b

Please sign in to comment.