Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fd3b32108 | |||
| b8f43b47e6 | |||
| 5f718d45a1 |
@@ -1,3 +1,5 @@
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.json.JsonOutput
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
@@ -105,3 +107,37 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sort all JSON language files under the lang directory by key in ASCII order
|
||||
val langDir = layout.projectDirectory.dir("lophine-server/src/main/resources/assets/lophine/lang")
|
||||
tasks.register("sortLangKeys") {
|
||||
group = "lophine"
|
||||
description = "Sort all JSON language files by key in ASCII (ordinal) order"
|
||||
notCompatibleWithConfigurationCache("Inline task action references build script class")
|
||||
inputs.dir(langDir).optional()
|
||||
outputs.dir(langDir)
|
||||
doLast {
|
||||
val dir = langDir.asFile
|
||||
if (!dir.isDirectory) {
|
||||
logger.warn("Lang directory not found: $dir")
|
||||
return@doLast
|
||||
}
|
||||
val jsonFiles = dir.listFiles { f -> f.extension == "json" }?.sortedBy { it.name } ?: emptyList()
|
||||
if (jsonFiles.isEmpty()) {
|
||||
logger.lifecycle("No .json files found in: $dir")
|
||||
return@doLast
|
||||
}
|
||||
val slurper = JsonSlurper()
|
||||
for (file in jsonFiles) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val data = slurper.parse(file) as Map<String, Any?>
|
||||
val sorted = data.toSortedMap()
|
||||
val json = JsonOutput.toJson(sorted)
|
||||
// Pretty print with 2-space indent
|
||||
val pretty = JsonOutput.prettyPrint(json)
|
||||
file.writeText(pretty + "\n", charset = Charsets.UTF_8)
|
||||
logger.lifecycle("Processed: ${file.name} (${sorted.size} keys)")
|
||||
}
|
||||
logger.lifecycle("Done.")
|
||||
}
|
||||
}
|
||||
|
||||
+96
-16
@@ -3,10 +3,10 @@ From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Fri, 5 Jun 2026 15:09:29 +0800
|
||||
Subject: [PATCH] Add config to enable tick command
|
||||
|
||||
only freeze/unfreeze/step/query can run when enabled
|
||||
only freeze/unfreeze/step/query/rate can run when enabled
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..276349d778c2e6f0b1081eec4851bad5d25db237 100644
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e83122ccfdbd1 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -239,6 +239,11 @@ public final class RegionizedServer {
|
||||
@@ -21,7 +21,22 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..276349d778c2e6f0b1081eec4851bad5
|
||||
// expire invalid click command callbacks
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.ADVENTURE_CLICK_MANAGER.handleQueue((int)this.tickCount); // Paper // Folia - region threading - moved to global tick
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.DIALOG_CLICK_MANAGER.handleQueue((int)this.tickCount); // Paper // Folia - region threading - moved to global tick
|
||||
@@ -415,7 +420,7 @@ public final class RegionizedServer {
|
||||
@@ -265,6 +270,14 @@ public final class RegionizedServer {
|
||||
this.globalTick(world, tickCount);
|
||||
}
|
||||
|
||||
+ // Lophine start - Add a config to enable tick command
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) {
|
||||
+ net.minecraft.server.ServerTickRateManager rateManager = MinecraftServer.getServer().tickRateManager();
|
||||
+ rateManager.reduceSprintTicks();
|
||||
+ rateManager.endTickWork();
|
||||
+ }
|
||||
+ // Lophine end - Add a config to enable tick command
|
||||
+
|
||||
// tick connections
|
||||
this.tickConnections();
|
||||
|
||||
@@ -415,7 +428,7 @@ public final class RegionizedServer {
|
||||
}
|
||||
|
||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||
@@ -31,10 +46,48 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..276349d778c2e6f0b1081eec4851bad5
|
||||
}
|
||||
}
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..5f4f80c1d4003254fd840f71d86908603b57bfa2 100644
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533d9d5bc1b 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
@@ -559,6 +559,11 @@ public final class TickRegionScheduler {
|
||||
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
- public static final int TICK_RATE = 20;
|
||||
- public static final long TIME_BETWEEN_TICKS = 1_000_000_000L / TICK_RATE; // ns
|
||||
+ public static float TICK_RATE = 20; // Lophine - Add tick command support
|
||||
+ public static long TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE); // ns // Lophine - Add tick command support
|
||||
// Folia start - watchdog
|
||||
public static final FoliaWatchdogThread WATCHDOG_THREAD = new FoliaWatchdogThread();
|
||||
static {
|
||||
@@ -509,8 +509,24 @@ public final class TickRegionScheduler {
|
||||
final long cpuStart = MEASURE_CPU_TIME ? THREAD_MX_BEAN.getCurrentThreadCpuTime() : 0L;
|
||||
final long tickStart = System.nanoTime();
|
||||
|
||||
- // use max(), don't assume that tickStart >= scheduledStart
|
||||
- final long tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ // Lophine start - Add a config to enable tick command
|
||||
+ final long tickCount;
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) {
|
||||
+ net.minecraft.server.ServerTickRateManager rateManager = MinecraftServer.getServer().tickRateManager();
|
||||
+ if (rateManager.isSprinting() && rateManager.checkShouldSprintThisTick()) {
|
||||
+ TICK_RATE = net.minecraft.server.commands.TickCommand.MAX_TICKRATE;
|
||||
+ TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE);
|
||||
+ tickCount = 1;
|
||||
+ } else {
|
||||
+ TICK_RATE = rateManager.tickrate();
|
||||
+ TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE);
|
||||
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ }
|
||||
+ } else {
|
||||
+ // use max(), don't assume that tickStart >= scheduledStart
|
||||
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ }
|
||||
+ // Lophine end - Add a config to enable tick command
|
||||
|
||||
if (!this.tryMarkTicking()) {
|
||||
if (!this.cancelled.get()) {
|
||||
@@ -559,6 +575,11 @@ public final class TickRegionScheduler {
|
||||
try {
|
||||
// next start isn't updated until the end of this tick
|
||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||
@@ -63,27 +116,54 @@ index 6823c41c08ca1a1baf9257fc861ae97bbcbe3a50..0fa14f60310b063f419620539fd40898
|
||||
TimeCommand.register(this.dispatcher, context);
|
||||
TitleCommand.register(this.dispatcher, context);
|
||||
//TriggerCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
diff --git a/net/minecraft/server/ServerTickRateManager.java b/net/minecraft/server/ServerTickRateManager.java
|
||||
index eeb2f88723b37bb3cada04bf3098dd46f0ed7316..8432d0ce22ddc9c9bfa98901e403697f40e53c99 100644
|
||||
--- a/net/minecraft/server/ServerTickRateManager.java
|
||||
+++ b/net/minecraft/server/ServerTickRateManager.java
|
||||
@@ -110,7 +110,7 @@ public class ServerTickRateManager extends TickRateManager {
|
||||
return false;
|
||||
} else if (this.remainingSprintTicks > 0L) {
|
||||
this.sprintTickStartTime = System.nanoTime();
|
||||
- this.remainingSprintTicks--;
|
||||
+ // this.remainingSprintTicks--; // Luminol - Add tick command support
|
||||
return true;
|
||||
} else {
|
||||
this.finishTickSprint();
|
||||
@@ -118,6 +118,12 @@ public class ServerTickRateManager extends TickRateManager {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Lophine start - Add tick command support
|
||||
+ public void reduceSprintTicks() {
|
||||
+ this.remainingSprintTicks--;
|
||||
+ }
|
||||
+ // Lophine end - Add tick command support
|
||||
+
|
||||
public void endTickWork() {
|
||||
this.sprintTimeSpend = this.sprintTimeSpend + (System.nanoTime() - this.sprintTickStartTime);
|
||||
}
|
||||
diff --git a/net/minecraft/server/commands/TickCommand.java b/net/minecraft/server/commands/TickCommand.java
|
||||
index e8d6a67143f3f0b4813e51bb273498bc404899b9..64b685b219b930a1bb7f85db9947f4d1ca9df093 100644
|
||||
index e8d6a67143f3f0b4813e51bb273498bc404899b9..4421658e4061299dea2ff72a77506214cc9045d8 100644
|
||||
--- a/net/minecraft/server/commands/TickCommand.java
|
||||
+++ b/net/minecraft/server/commands/TickCommand.java
|
||||
@@ -23,14 +23,14 @@ public class TickCommand {
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.server.ServerTickRateManager;
|
||||
import net.minecraft.util.TimeUtil;
|
||||
|
||||
public class TickCommand {
|
||||
- private static final float MAX_TICKRATE = 10000.0F;
|
||||
+ public static final float MAX_TICKRATE = 10000.0F; // Lophine - Add tick command support
|
||||
private static final String DEFAULT_TICKRATE = String.valueOf(20);
|
||||
|
||||
public static void register(final CommandDispatcher<CommandSourceStack> dispatcher) {
|
||||
@@ -23,7 +23,7 @@ public class TickCommand {
|
||||
Commands.literal("tick")
|
||||
.requires(Commands.hasPermission(Commands.LEVEL_ADMINS))
|
||||
.then(Commands.literal("query").executes(c -> tickQuery(c.getSource())))
|
||||
- .then(
|
||||
+/* .then(
|
||||
+ .then( // Lophine - Add tick rate support
|
||||
Commands.literal("rate")
|
||||
.then(
|
||||
Commands.argument("rate", FloatArgumentType.floatArg(1.0F, 10000.0F))
|
||||
.suggests((c, b) -> SharedSuggestionProvider.suggest(new String[]{DEFAULT_TICKRATE}, b))
|
||||
.executes(c -> setTickingRate(c.getSource(), FloatArgumentType.getFloat(c, "rate")))
|
||||
)
|
||||
- )
|
||||
+ )*/
|
||||
.then(
|
||||
Commands.literal("step")
|
||||
.executes(c -> step(c.getSource(), 1))
|
||||
@@ -41,7 +41,7 @@ public class TickCommand {
|
||||
.executes(c -> step(c.getSource(), IntegerArgumentType.getInteger(c, "time")))
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Server I18n
|
||||
|
||||
|
||||
diff --git a/net/minecraft/locale/Language.java b/net/minecraft/locale/Language.java
|
||||
index 47cd33bce908744e64356b585853d6a8ecf82443..bb4011d3c6a1d2a5aa66e68fe719cd5eea2c0dd2 100644
|
||||
index 47cd33bce908744e64356b585853d6a8ecf82443..9e6f89ac7cf730bfc3c15d5a4f648c550cf72e22 100644
|
||||
--- a/net/minecraft/locale/Language.java
|
||||
+++ b/net/minecraft/locale/Language.java
|
||||
@@ -37,6 +37,7 @@ public abstract class Language {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable save-all command
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index 276349d778c2e6f0b1081eec4851bad5d25db237..79ef1e69ec364beec69b37c6850c038cdba73b4c 100644
|
||||
index a2db29aa47a4b7213d4956f02f6e83122ccfdbd1..6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -265,6 +265,8 @@ public final class RegionizedServer {
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Wed, 21 Jan 2026 21:28:21 +0800
|
||||
Subject: [PATCH] Add tick rate support
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index 79ef1e69ec364beec69b37c6850c038cdba73b4c..6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -272,6 +272,14 @@ public final class RegionizedServer {
|
||||
this.globalTick(world, tickCount);
|
||||
}
|
||||
|
||||
+ // Lophine start - Add a config to enable tick command
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) {
|
||||
+ net.minecraft.server.ServerTickRateManager rateManager = MinecraftServer.getServer().tickRateManager();
|
||||
+ rateManager.reduceSprintTicks();
|
||||
+ rateManager.endTickWork();
|
||||
+ }
|
||||
+ // Lophine end - Add a config to enable tick command
|
||||
+
|
||||
// tick connections
|
||||
this.tickConnections();
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
index 5f4f80c1d4003254fd840f71d86908603b57bfa2..57a35d7a801621fc461e896eb2bba533d9d5bc1b 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
- public static final int TICK_RATE = 20;
|
||||
- public static final long TIME_BETWEEN_TICKS = 1_000_000_000L / TICK_RATE; // ns
|
||||
+ public static float TICK_RATE = 20; // Lophine - Add tick command support
|
||||
+ public static long TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE); // ns // Lophine - Add tick command support
|
||||
// Folia start - watchdog
|
||||
public static final FoliaWatchdogThread WATCHDOG_THREAD = new FoliaWatchdogThread();
|
||||
static {
|
||||
@@ -509,8 +509,24 @@ public final class TickRegionScheduler {
|
||||
final long cpuStart = MEASURE_CPU_TIME ? THREAD_MX_BEAN.getCurrentThreadCpuTime() : 0L;
|
||||
final long tickStart = System.nanoTime();
|
||||
|
||||
- // use max(), don't assume that tickStart >= scheduledStart
|
||||
- final long tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ // Lophine start - Add a config to enable tick command
|
||||
+ final long tickCount;
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) {
|
||||
+ net.minecraft.server.ServerTickRateManager rateManager = MinecraftServer.getServer().tickRateManager();
|
||||
+ if (rateManager.isSprinting() && rateManager.checkShouldSprintThisTick()) {
|
||||
+ TICK_RATE = net.minecraft.server.commands.TickCommand.MAX_TICKRATE;
|
||||
+ TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE);
|
||||
+ tickCount = 1;
|
||||
+ } else {
|
||||
+ TICK_RATE = rateManager.tickrate();
|
||||
+ TIME_BETWEEN_TICKS = (long) (1_000_000_000L / TICK_RATE);
|
||||
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ }
|
||||
+ } else {
|
||||
+ // use max(), don't assume that tickStart >= scheduledStart
|
||||
+ tickCount = Math.max(1L, this.tickSchedule.getPeriodsAhead(TIME_BETWEEN_TICKS, tickStart));
|
||||
+ }
|
||||
+ // Lophine end - Add a config to enable tick command
|
||||
|
||||
if (!this.tryMarkTicking()) {
|
||||
if (!this.cancelled.get()) {
|
||||
diff --git a/net/minecraft/server/ServerTickRateManager.java b/net/minecraft/server/ServerTickRateManager.java
|
||||
index eeb2f88723b37bb3cada04bf3098dd46f0ed7316..8432d0ce22ddc9c9bfa98901e403697f40e53c99 100644
|
||||
--- a/net/minecraft/server/ServerTickRateManager.java
|
||||
+++ b/net/minecraft/server/ServerTickRateManager.java
|
||||
@@ -110,7 +110,7 @@ public class ServerTickRateManager extends TickRateManager {
|
||||
return false;
|
||||
} else if (this.remainingSprintTicks > 0L) {
|
||||
this.sprintTickStartTime = System.nanoTime();
|
||||
- this.remainingSprintTicks--;
|
||||
+ // this.remainingSprintTicks--; // Luminol - Add tick command support
|
||||
return true;
|
||||
} else {
|
||||
this.finishTickSprint();
|
||||
@@ -118,6 +118,12 @@ public class ServerTickRateManager extends TickRateManager {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Lophine start - Add tick command support
|
||||
+ public void reduceSprintTicks() {
|
||||
+ this.remainingSprintTicks--;
|
||||
+ }
|
||||
+ // Lophine end - Add tick command support
|
||||
+
|
||||
public void endTickWork() {
|
||||
this.sprintTimeSpend = this.sprintTimeSpend + (System.nanoTime() - this.sprintTickStartTime);
|
||||
}
|
||||
diff --git a/net/minecraft/server/commands/TickCommand.java b/net/minecraft/server/commands/TickCommand.java
|
||||
index 64b685b219b930a1bb7f85db9947f4d1ca9df093..4421658e4061299dea2ff72a77506214cc9045d8 100644
|
||||
--- a/net/minecraft/server/commands/TickCommand.java
|
||||
+++ b/net/minecraft/server/commands/TickCommand.java
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.server.ServerTickRateManager;
|
||||
import net.minecraft.util.TimeUtil;
|
||||
|
||||
public class TickCommand {
|
||||
- private static final float MAX_TICKRATE = 10000.0F;
|
||||
+ public static final float MAX_TICKRATE = 10000.0F; // Lophine - Add tick command support
|
||||
private static final String DEFAULT_TICKRATE = String.valueOf(20);
|
||||
|
||||
public static void register(final CommandDispatcher<CommandSourceStack> dispatcher) {
|
||||
@@ -23,14 +23,14 @@ public class TickCommand {
|
||||
Commands.literal("tick")
|
||||
.requires(Commands.hasPermission(Commands.LEVEL_ADMINS))
|
||||
.then(Commands.literal("query").executes(c -> tickQuery(c.getSource())))
|
||||
-/* .then(
|
||||
+ .then( // Lophine - Add tick rate support
|
||||
Commands.literal("rate")
|
||||
.then(
|
||||
Commands.argument("rate", FloatArgumentType.floatArg(1.0F, 10000.0F))
|
||||
.suggests((c, b) -> SharedSuggestionProvider.suggest(new String[]{DEFAULT_TICKRATE}, b))
|
||||
.executes(c -> setTickingRate(c.getSource(), FloatArgumentType.getFloat(c, "rate")))
|
||||
)
|
||||
- )*/
|
||||
+ )
|
||||
.then(
|
||||
Commands.literal("step")
|
||||
.executes(c -> step(c.getSource(), 1))
|
||||
+12
-31
@@ -11,58 +11,39 @@ import org.leavesmc.leaves.command.bot.BotCommand;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@ConfigClassInfo(
|
||||
category = EnumConfigCategory.ROOT,
|
||||
name = "fakeplayer",
|
||||
directory = {"carpet"},
|
||||
comments = """
|
||||
Carpet fakeplayer compatibility mapped onto Lophine fakeplayers.
|
||||
commandPlayer is currently backed by Lophine's /bot command surface."""
|
||||
)
|
||||
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "fakeplayer", directory = {"carpet"})
|
||||
public class FakePlayerCompatConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "commandPlayer", comments = """
|
||||
Enable /player command.(not remapped)
|
||||
If you want to enable bot command, please see lophine global config.""")
|
||||
@ConfigInfo(name = "commandPlayer")
|
||||
public static boolean commandPlayer = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerResident", comments = """
|
||||
Keep fakeplayers resident across unload and restart.""")
|
||||
@ConfigInfo(name = "fakePlayerResident")
|
||||
public static boolean fakePlayerResident = false;
|
||||
|
||||
@ConfigInfo(name = "openFakePlayerInventory", comments = """
|
||||
Allow opening fakeplayer inventories.""")
|
||||
@ConfigInfo(name = "openFakePlayerInventory")
|
||||
public static boolean openFakePlayerInventory = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerTicksLikeRealPlayer", comments = """
|
||||
Tick fakeplayers in the network phase to better match real player timing.""")
|
||||
@ConfigInfo(name = "fakePlayerTicksLikeRealPlayer")
|
||||
public static boolean fakePlayerTicksLikeRealPlayer = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerDefaultSurvivalMode", comments = """
|
||||
Force newly created fakeplayers to start in survival instead of the server default gamemode.""")
|
||||
@ConfigInfo(name = "fakePlayerDefaultSurvivalMode")
|
||||
public static boolean fakePlayerDefaultSurvivalMode = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerInteractLikeClient", comments = """
|
||||
Make fakeplayer entity interaction follow client-side fallback behavior more closely.""")
|
||||
@ConfigInfo(name = "fakePlayerInteractLikeClient")
|
||||
public static boolean fakePlayerInteractLikeClient = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerAutoReplaceTool", comments = """
|
||||
Toggle automatic tool replacement for fakeplayers.""")
|
||||
@ConfigInfo(name = "fakePlayerAutoReplaceTool")
|
||||
public static boolean fakePlayerAutoReplaceTool = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerAutoReplenishment", comments = """
|
||||
Toggle automatic stack replenishment for fakeplayers.""")
|
||||
@ConfigInfo(name = "fakePlayerAutoReplenishment")
|
||||
public static boolean fakePlayerAutoReplenishment = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerAutoReplenishmentFormShulkerBox", comments = """
|
||||
Let fakeplayer replenishment pull matching items out of shulker boxes in the inventory.""")
|
||||
@ConfigInfo(name = "fakePlayerAutoReplenishmentFormShulkerBox")
|
||||
public static boolean fakePlayerAutoReplenishmentFormShulkerBox = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerAutoFish", comments = """
|
||||
Let fakeplayers holding a fishing rod automatically cast and reel it in.""")
|
||||
@ConfigInfo(name = "fakePlayerAutoFish")
|
||||
public static boolean fakePlayerAutoFish = false;
|
||||
|
||||
@ConfigInfo(name = "fakePlayerReloadAction", comments = """
|
||||
Persist queued fakeplayer actions across save and reload.""")
|
||||
@ConfigInfo(name = "fakePlayerReloadAction")
|
||||
public static boolean fakePlayerReloadAction = false;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+57
-131
@@ -8,248 +8,174 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ConfigClassInfo(
|
||||
category = EnumConfigCategory.ROOT,
|
||||
name = "general",
|
||||
directory = {"carpet"},
|
||||
comments = """
|
||||
Carpet/AMS/TIS/Org compatibility rules backed by existing Lophine features.
|
||||
Only rules that already have a working server-side implementation are exposed here."""
|
||||
)
|
||||
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "general", directory = {"carpet"})
|
||||
public class GeneralCompatConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "language", comments = """
|
||||
Carpet language value.
|
||||
ATTENTION: This config will not update in Lophine global now!""")
|
||||
@ConfigInfo(name = "language")
|
||||
public static String language = "en_us";
|
||||
|
||||
@ConfigInfo(name = "amsUpdateSuppressionCrashFix", comments = """
|
||||
Update suppression crash protection.""")
|
||||
@ConfigInfo(name = "amsUpdateSuppressionCrashFix")
|
||||
public static boolean amsUpdateSuppressionCrashFix = false;
|
||||
|
||||
@ConfigInfo(name = "yeetUpdateSuppressionCrash", comments = """
|
||||
Update suppression crash yeeting.""")
|
||||
@ConfigInfo(name = "yeetUpdateSuppressionCrash")
|
||||
public static boolean yeetUpdateSuppressionCrash = false;
|
||||
|
||||
@ConfigInfo(name = "dustTrapdoorReintroduced", comments = """
|
||||
Should the pre-1.20 mechanism be reintroduced:
|
||||
Redstone dust does not connect to adjacent redstone dust on trapdoors that are open
|
||||
Pre-1.20.2 mechanism: Redstone dust, redstone repeaters,
|
||||
and redstone comparators do not check for attachment when receiving status updates from below.""")
|
||||
@ConfigInfo(name = "dustTrapdoorReintroduced")
|
||||
public static boolean dustTrapdoorReintroduced = false;
|
||||
|
||||
@ConfigInfo(name = "shulkerBoxCCEReintroduced", comments = """
|
||||
Use ClassCastException for update suppression.""")
|
||||
@ConfigInfo(name = "shulkerBoxCCEReintroduced")
|
||||
public static boolean shulkerBoxCCEReintroduced = false;
|
||||
|
||||
@ConfigInfo(name = "instantBlockUpdaterReintroduced", comments = """
|
||||
Instant block updater.""")
|
||||
@ConfigInfo(name = "instantBlockUpdaterReintroduced")
|
||||
public static boolean instantBlockUpdaterReintroduced = false;
|
||||
|
||||
@ConfigInfo(name = "commandTick", comments = """
|
||||
Enable the tick command support.""")
|
||||
@ConfigInfo(name = "commandTick")
|
||||
public static boolean commandTick = false;
|
||||
|
||||
@ConfigInfo(name = "creativeNoClip", comments = """
|
||||
Whether to enable creative fly no clip.
|
||||
When enabled, players in creative mode will not collide with blocks while flying.
|
||||
This allows them to pass through blocks without obstruction.""")
|
||||
@ConfigInfo(name = "creativeNoClip")
|
||||
public static boolean creativeNoClip = false;
|
||||
|
||||
@ConfigInfo(name = "optimizedDragonRespawn", comments = """
|
||||
Enable optimized dragon respawn.""")
|
||||
@ConfigInfo(name = "optimizedDragonRespawn")
|
||||
public static boolean optimizedDragonRespawn = false;
|
||||
|
||||
@ConfigInfo(name = "antiSpamDisabled", comments = """
|
||||
Disable the server-side chat and creative-drop spam throttles used by vanilla/Spigot.""")
|
||||
@ConfigInfo(name = "antiSpamDisabled")
|
||||
public static boolean antiSpamDisabled = false;
|
||||
|
||||
@ConfigInfo(name = "blockPlacementIgnoreEntity", comments = """
|
||||
Allow creative players to place blocks without entity collision checks.""")
|
||||
@ConfigInfo(name = "blockPlacementIgnoreEntity")
|
||||
public static boolean blockPlacementIgnoreEntity = false;
|
||||
|
||||
@ConfigInfo(name = "creativeOpenContainerForcibly", comments = """
|
||||
Allow creative players to forcibly open blocked chests, ender chests and shulker boxes.""")
|
||||
@ConfigInfo(name = "creativeOpenContainerForcibly")
|
||||
public static boolean creativeOpenContainerForcibly = false;
|
||||
|
||||
@ConfigInfo(name = "creativeOneHitKill", comments = """
|
||||
Allow creative players to instantly kill attackable non-creative, non-spectator entities.
|
||||
Sneaking expands the effect into a small area attack.""")
|
||||
@ConfigInfo(name = "creativeOneHitKill")
|
||||
public static boolean creativeOneHitKill = false;
|
||||
|
||||
@ConfigInfo(name = "observerNoDetection", comments = """
|
||||
Disable observer detection pulses entirely.""")
|
||||
@ConfigInfo(name = "observerNoDetection")
|
||||
public static boolean observerNoDetection = false;
|
||||
|
||||
@ConfigInfo(name = "bambooModelNoOffset", comments = """
|
||||
Remove the random horizontal model offset from bamboo and bamboo saplings.""")
|
||||
@ConfigInfo(name = "bambooModelNoOffset")
|
||||
public static boolean bambooModelNoOffset = false;
|
||||
|
||||
@ConfigInfo(name = "creativeNoItemCooldown", comments = """
|
||||
Skip item cooldown application for creative players.""")
|
||||
@ConfigInfo(name = "creativeNoItemCooldown")
|
||||
public static boolean creativeNoItemCooldown = false;
|
||||
|
||||
@ConfigInfo(name = "ctrlQCraftingFix", comments = """
|
||||
Compatibility flag for the upstream result-slot Ctrl+Q crafting fix already present in the current menu code.""")
|
||||
@ConfigInfo(name = "ctrlQCraftingFix")
|
||||
public static boolean ctrlQCraftingFix = false;
|
||||
|
||||
@ConfigInfo(name = "carpetAlwaysSetDefault", comments = """
|
||||
Compatibility flag for Lophine's config loader, which already writes default values into the compat config during preload.""")
|
||||
@ConfigInfo(name = "carpetAlwaysSetDefault")
|
||||
public static boolean carpetAlwaysSetDefault = false;
|
||||
|
||||
@ConfigInfo(name = "placementRotationFix", comments = """
|
||||
Use the player's main body rotation for placement direction checks instead of interpolated head yaw.""")
|
||||
@ConfigInfo(name = "placementRotationFix")
|
||||
public static boolean placementRotationFix = false;
|
||||
|
||||
@ConfigInfo(name = "tntDoNotUpdate", comments = """
|
||||
Prevent TNT from checking redstone power when first placed.""")
|
||||
@ConfigInfo(name = "tntDoNotUpdate")
|
||||
public static boolean tntDoNotUpdate = false;
|
||||
|
||||
@ConfigInfo(name = "totallyNoBlockUpdate", comments = """
|
||||
Suppress neighbor and shape updates globally for block changes.""")
|
||||
@ConfigInfo(name = "totallyNoBlockUpdate")
|
||||
public static boolean totallyNoBlockUpdate = false;
|
||||
|
||||
@ConfigInfo(name = "tiscmNetworkProtocol", comments = """
|
||||
Enable the native Carpet TIS Addition network channel on `tiscm:network/v1`.""")
|
||||
@ConfigInfo(name = "tiscmNetworkProtocol")
|
||||
public static boolean tiscmNetworkProtocol = false;
|
||||
|
||||
@ConfigInfo(name = "hopperNoItemCost", comments = """
|
||||
Restore the transferred stack into a hopper when a wool block is placed on top of it.""")
|
||||
@ConfigInfo(name = "hopperNoItemCost")
|
||||
public static boolean hopperNoItemCost = false;
|
||||
|
||||
@ConfigInfo(name = "explosionNoBlockDamage", comments = """
|
||||
Let explosions damage entities without breaking blocks.""")
|
||||
@ConfigInfo(name = "explosionNoBlockDamage")
|
||||
public static boolean explosionNoBlockDamage = false;
|
||||
|
||||
@ConfigInfo(name = "noCreeperBlockBreaking", comments = """
|
||||
Disables creeper explosion block breaking.""")
|
||||
@ConfigInfo(name = "noCreeperBlockBreaking")
|
||||
public static boolean noCreeperBlockBreaking = false;
|
||||
|
||||
@ConfigInfo(name = "noGhastBlockBreaking", comments = """
|
||||
Disables ghast fireball explosion block breaking.""")
|
||||
@ConfigInfo(name = "noGhastBlockBreaking")
|
||||
public static boolean noGhastBlockBreaking = false;
|
||||
|
||||
@ConfigInfo(name = "disableBlazeFire", comments = """
|
||||
Disables fire made from blaze fireballs.""")
|
||||
@ConfigInfo(name = "disableBlazeFire")
|
||||
public static boolean disableBlazeFire = false;
|
||||
|
||||
@ConfigInfo(name = "disableGhastFire", comments = """
|
||||
Disables fire made from ghast fireballs.""")
|
||||
@ConfigInfo(name = "disableGhastFire")
|
||||
public static boolean disableGhastFire = false;
|
||||
|
||||
@ConfigInfo(name = "optimizedTNTHighPriority", comments = """
|
||||
Compatibility flag for the already optimized server explosion path carried by the current runtime.""")
|
||||
@ConfigInfo(name = "optimizedTNTHighPriority")
|
||||
public static boolean optimizedTNTHighPriority = false;
|
||||
|
||||
@ConfigInfo(name = "tntPrimerMomentumRemoved", comments = """
|
||||
Remove the random horizontal launch momentum from newly primed TNT.""")
|
||||
@ConfigInfo(name = "tntPrimerMomentumRemoved")
|
||||
public static boolean tntPrimerMomentumRemoved = false;
|
||||
|
||||
@ConfigInfo(name = "tntIgnoreRedstoneSignal", comments = """
|
||||
Ignore redstone power when deciding whether TNT should auto-prime.""")
|
||||
@ConfigInfo(name = "tntIgnoreRedstoneSignal")
|
||||
public static boolean tntIgnoreRedstoneSignal = false;
|
||||
|
||||
@ConfigInfo(name = "tntDupingFix", comments = """
|
||||
Toggle the piston desync path used by vanilla TNT duplication setups.""")
|
||||
@ConfigInfo(name = "tntDupingFix")
|
||||
public static boolean tntDupingFix = false;
|
||||
|
||||
@ConfigInfo(name = "interactionUpdates", comments = """
|
||||
Control whether player interaction block changes emit normal block updates.
|
||||
Set to false to suppress neighbor and shape updates during block use and breaking.""")
|
||||
@ConfigInfo(name = "interactionUpdates")
|
||||
public static boolean interactionUpdates = true;
|
||||
|
||||
@ConfigInfo(name = "xpNoCooldown", comments = """
|
||||
Allow players to absorb multiple experience orbs in the same tick without pickup delay.""")
|
||||
@ConfigInfo(name = "xpNoCooldown")
|
||||
public static boolean xpNoCooldown = false;
|
||||
|
||||
@ConfigInfo(name = "powerfulExpMending", comments = """
|
||||
Let picked-up experience repair all damaged mending items in the player's inventory, not only equipped gear.""")
|
||||
@ConfigInfo(name = "powerfulExpMending")
|
||||
public static boolean powerfulExpMending = false;
|
||||
|
||||
@ConfigInfo(name = "clientSettingsLostOnRespawnFix", comments = """
|
||||
Reapply the player's last known client settings after respawn.""")
|
||||
@ConfigInfo(name = "clientSettingsLostOnRespawnFix")
|
||||
public static boolean clientSettingsLostOnRespawnFix = false;
|
||||
|
||||
@ConfigInfo(name = "sensibleEnderman", comments = """
|
||||
Restrict enderman block pickup to pumpkins and melons only.""")
|
||||
@ConfigInfo(name = "sensibleEnderman")
|
||||
public static boolean sensibleEnderman = false;
|
||||
|
||||
@ConfigInfo(name = "entityInstantDeathRemoval", comments = """
|
||||
Remove the normal 20gt delay before dead living entities are discarded.""")
|
||||
@ConfigInfo(name = "entityInstantDeathRemoval")
|
||||
public static boolean entityInstantDeathRemoval = false;
|
||||
|
||||
@ConfigInfo(name = "farmlandTrampledDisabled", comments = """
|
||||
Prevent farmland from turning into dirt when entities land on it.""")
|
||||
@ConfigInfo(name = "farmlandTrampledDisabled")
|
||||
public static boolean farmlandTrampledDisabled = false;
|
||||
|
||||
@ConfigInfo(name = "shulkerGolem", comments = """
|
||||
Allow a carved pumpkin on top of a shulker box to summon a shulker.""")
|
||||
@ConfigInfo(name = "shulkerGolem")
|
||||
public static boolean shulkerGolem = false;
|
||||
|
||||
@ConfigInfo(name = "preventEndSpikeRespawn", comments = """
|
||||
Skip obsidian spike regeneration during dragon respawn.""")
|
||||
@ConfigInfo(name = "preventEndSpikeRespawn")
|
||||
public static boolean preventEndSpikeRespawn = false;
|
||||
|
||||
@ConfigInfo(name = "yeetOutOfOrderChatKick", comments = """
|
||||
Ignore out-of-order secure chat chain checks instead of invalidating the chat session.""")
|
||||
@ConfigInfo(name = "yeetOutOfOrderChatKick")
|
||||
public static boolean yeetOutOfOrderChatKick = false;
|
||||
|
||||
@ConfigInfo(name = "betterCraftableBoneBlock", comments = """
|
||||
Add the AMS alternate bone block recipe that yields 3 bone blocks from 9 bones.""")
|
||||
@ConfigInfo(name = "betterCraftableBoneBlock")
|
||||
public static boolean betterCraftableBoneBlock = false;
|
||||
|
||||
@ConfigInfo(name = "betterCraftableDispenser", comments = """
|
||||
Add the AMS alternate dispenser recipes using a dropper.""")
|
||||
@ConfigInfo(name = "betterCraftableDispenser")
|
||||
public static boolean betterCraftableDispenser = false;
|
||||
|
||||
@ConfigInfo(name = "viewDistance", comments = """
|
||||
Override the dedicated server's startup view distance with the Carpet-compatible value.""")
|
||||
@ConfigInfo(name = "viewDistance")
|
||||
public static int viewDistance = 12;
|
||||
|
||||
@ConfigInfo(name = "tickCommandPermission", comments = """
|
||||
Override the `/tick` command permission level.
|
||||
Accepts values in the range 0..4, where 2 matches old Carpet behavior and 3 keeps vanilla.""")
|
||||
@ConfigInfo(name = "tickCommandPermission")
|
||||
public static int tickCommandPermission = 3;
|
||||
|
||||
@ConfigInfo(name = "tickFreezeCommandToggleable", comments = """
|
||||
Make `/tick freeze` toggle back to running when executed while the server is already frozen.""")
|
||||
@ConfigInfo(name = "tickFreezeCommandToggleable")
|
||||
public static boolean tickFreezeCommandToggleable = false;
|
||||
|
||||
@ConfigInfo(name = "syncServerMsptMetricsData", comments = """
|
||||
Broadcast live MSPT samples through the native TISCM protocol channel.""")
|
||||
@ConfigInfo(name = "syncServerMsptMetricsData")
|
||||
public static boolean syncServerMsptMetricsData = false;
|
||||
|
||||
@ConfigInfo(name = "simpleInGameCalculator", comments = """
|
||||
Evaluate chat messages prefixed with `=` as a simple calculator expression and reply privately.""")
|
||||
@ConfigInfo(name = "simpleInGameCalculator")
|
||||
public static boolean simpleInGameCalculator = false;
|
||||
|
||||
@ConfigInfo(name = "microTiming", comments = """
|
||||
Compatibility flag for the built-in region profiler and timing instrumentation carried by Folia/Moonrise.""")
|
||||
@ConfigInfo(name = "microTiming")
|
||||
public static boolean microTiming = false;
|
||||
|
||||
@ConfigInfo(name = "fastRedstoneDust", comments = """
|
||||
Route redstone dust updates through the Alternate Current fast-update backend.""")
|
||||
@ConfigInfo(name = "fastRedstoneDust")
|
||||
public static boolean fastRedstoneDust = false;
|
||||
|
||||
@ConfigInfo(name = "lagFreeSpawning", comments = """
|
||||
Use the lightweight collision and precooked-mob spawning path for natural spawning checks.""")
|
||||
@ConfigInfo(name = "lagFreeSpawning")
|
||||
public static boolean lagFreeSpawning = false;
|
||||
|
||||
@ConfigInfo(name = "optimizedFastEntityMovement", comments = """
|
||||
Compatibility flag for the always-on Moonrise/Paper fast entity movement collision pipeline.""")
|
||||
@ConfigInfo(name = "optimizedFastEntityMovement")
|
||||
public static boolean optimizedFastEntityMovement = false;
|
||||
|
||||
@ConfigInfo(name = "optimizedHardHitBoxEntityCollision", comments = """
|
||||
Compatibility flag for the always-on Moonrise/Paper hard-hitbox entity collision optimizations.""")
|
||||
@ConfigInfo(name = "optimizedHardHitBoxEntityCollision")
|
||||
public static boolean optimizedHardHitBoxEntityCollision = false;
|
||||
|
||||
@ConfigInfo(name = "tntFuseDuration", comments = """
|
||||
Override the default primed TNT fuse duration in ticks.
|
||||
Accepts values in the range 0..32767.""")
|
||||
@ConfigInfo(name = "tntFuseDuration")
|
||||
public static int tntFuseDuration = 80;
|
||||
|
||||
@ConfigInfo(name = "defaultLoggers", comments = """
|
||||
Carpet-style default logger subscriptions for players.
|
||||
Examples: ["tps", "mob_caps", "counter white"]""")
|
||||
@ConfigInfo(name = "defaultLoggers")
|
||||
public static List<String> defaultLoggers = List.of();
|
||||
|
||||
public static boolean mergedUpdateSuppressionCrashEnabled() {
|
||||
|
||||
+1
-3
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.REMOVED, name = "removed_config")
|
||||
public class RemovedConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "removed", comments =
|
||||
"""
|
||||
RemovedConfig redirect to here, no any function.""")
|
||||
@ConfigInfo(name = "removed")
|
||||
public static boolean enabled = true;
|
||||
}
|
||||
+3
-12
@@ -11,21 +11,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@ConfigClassInfo(
|
||||
category = EnumConfigCategory.ROOT,
|
||||
name = "hopper_counter",
|
||||
directory = {"carpet"},
|
||||
comments = """
|
||||
Hopper counter functions."""
|
||||
)
|
||||
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "hopper_counter", directory = {"carpet"})
|
||||
public class WoolHopperCounterConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "hopperCounters", comments = """
|
||||
Enable the existing wool hopper counter implementation.""")
|
||||
@ConfigInfo(name = "hopperCounters")
|
||||
public static boolean hopperCounters = false;
|
||||
|
||||
@ConfigInfo(name = "hopperCountersUnlimitedSpeed", comments = """
|
||||
Remove the hopper transfer speed limit for counters.
|
||||
Only effective when hopperCounters is enabled.""")
|
||||
@ConfigInfo(name = "hopperCountersUnlimitedSpeed")
|
||||
public static boolean hopperCountersUnlimitedSpeed = false;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+6
-17
@@ -7,32 +7,21 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "command")
|
||||
public class CommandConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "trigger_command_enabled", comments =
|
||||
"""
|
||||
Allow to use trigger command""")
|
||||
@ConfigInfo(name = "trigger_command_enabled")
|
||||
public static boolean trigger = false;
|
||||
|
||||
@ConfigInfo(name = "function_command_enabled", comments =
|
||||
"""
|
||||
Allow to use function command""")
|
||||
@ConfigInfo(name = "function_command_enabled")
|
||||
public static boolean function = false;
|
||||
|
||||
@ConfigInfo(name = "scoreboard_command_enabled", comments =
|
||||
"""
|
||||
Allow to use scoreboard command""")
|
||||
@ConfigInfo(name = "scoreboard_command_enabled")
|
||||
public static boolean scoreboard = false;
|
||||
|
||||
@ConfigInfo(name = "enabled", directory = {"save_all_command"}, comments =
|
||||
"""
|
||||
Allow to use save-all command""")
|
||||
@ConfigInfo(name = "enabled", directory = {"save_all_command"})
|
||||
public static boolean saveAll = false;
|
||||
|
||||
@ConfigInfo(name = "log_all_process", directory = {"save_all_command"}, comments =
|
||||
"""
|
||||
Log all process of save-all command to console""")
|
||||
@ConfigInfo(name = "log_all_process", directory = {"save_all_command"})
|
||||
public static boolean logAllProcess = false;
|
||||
|
||||
@ConfigInfo(name = "save_all_command_timeout", directory = {"save_all_command"}, comments = """
|
||||
Maximum seconds to save before the chunk report it is timeout.""")
|
||||
@ConfigInfo(name = "save_all_command_timeout", directory = {"save_all_command"})
|
||||
public static long saveAllTimeout = 30;
|
||||
}
|
||||
+1
-3
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "entity_damage_source_trace")
|
||||
public class EntityDamageSourceTraceConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments =
|
||||
"""
|
||||
Allow trace damage source cross different Region Scheduler.""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
+1
-7
@@ -13,13 +13,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
@ConfigClassInfo(name = "global_entities_counter", category = EnumConfigCategory.EXPERIMENT)
|
||||
public class GlobalEntitiesCounter implements IConfigModule {
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "version", comments = """
|
||||
DISABLED
|
||||
DEFAULT_SYNC: Enable global entities counter origin version with sync counter module.
|
||||
DEFAULT_ASYNC: Enable global entities counter origin version with async counter module.
|
||||
PRECISE: Enable precise mob cap calculation with incremental counting. Replaces the periodic full-scan with event-driven real-time updates.
|
||||
|
||||
You need to set per-player-mob-spawns to false on paper-world-defaults.yml or paper-world.yml""")
|
||||
@ConfigInfo(name = "version")
|
||||
public static GlobalEntitiesCounterType type = GlobalEntitiesCounterType.DISABLED;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "update-suppression-crash-fix")
|
||||
public class UpdateSuppressionCrashFixConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Should crash caused by update suppression be prevented?""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = true;
|
||||
}
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "vanilla-like-experience")
|
||||
public class VanillaLikeExperienceConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Restore a more vanilla-like technical gameplay experience by bypassing some Paper safety and behavior changes.""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
|
||||
+3
-9
@@ -11,22 +11,16 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
public class ContainerExpansionConfig implements IConfigModule {
|
||||
@HotReloadUnsupported
|
||||
@CommandSuggestions(suggest = {"1", "2", "3", "4", "5", "6"})
|
||||
@ConfigInfo(name = "barrel_rows", comments =
|
||||
"""
|
||||
range: 1~6""")
|
||||
@ConfigInfo(name = "barrel_rows")
|
||||
public static int barrelRows = 3;
|
||||
|
||||
@HotReloadUnsupported
|
||||
@CommandSuggestions(suggest = {"1", "2", "3", "4", "5", "6"})
|
||||
@ConfigInfo(name = "enderchest_rows", comments =
|
||||
"""
|
||||
range: 1~6""")
|
||||
@ConfigInfo(name = "enderchest_rows")
|
||||
public static int enderchestRows = 3;
|
||||
|
||||
@CommandSuggestions(suggest = {"1", "2", "32", "64"})
|
||||
@ConfigInfo(name = "shulker_stackable_count", directory = {"shulker_box"}, comments =
|
||||
"""
|
||||
range: 1~64""")
|
||||
@ConfigInfo(name = "shulker_stackable_count", directory = {"shulker_box"})
|
||||
public static int shulkerCount = 1;
|
||||
|
||||
@ConfigInfo(name = "same_nbt_shulker_stackable", directory = {"shulker_box"})
|
||||
|
||||
+16
-33
@@ -16,69 +16,52 @@ import java.util.Set;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "fakeplayer")
|
||||
public class FakeplayerConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enable", comments = """
|
||||
Enable fakeplayer functionality (/bot command)""")
|
||||
@ConfigInfo(name = "enable")
|
||||
public static boolean enable = true;
|
||||
|
||||
@ConfigInfo(name = "unable-fakeplayer-names", comments = """
|
||||
List of names that cannot be used for fakeplayers""")
|
||||
@ConfigInfo(name = "unable-fakeplayer-names")
|
||||
public static List<String> unableNames = List.of("player-name");
|
||||
|
||||
@ConfigInfo(name = "limit", comments = """
|
||||
Maximum number of fakeplayers allowed""")
|
||||
@ConfigInfo(name = "limit")
|
||||
public static int limit = 10;
|
||||
|
||||
@ConfigInfo(name = "prefix", comments = """
|
||||
Prefix for fakeplayer names""")
|
||||
@ConfigInfo(name = "prefix")
|
||||
public static String prefix = "";
|
||||
|
||||
@ConfigInfo(name = "suffix", comments = """
|
||||
Suffix for fakeplayer names""")
|
||||
@ConfigInfo(name = "suffix")
|
||||
public static String suffix = "";
|
||||
|
||||
@ConfigInfo(name = "regen-amount", comments = """
|
||||
Regeneration amount for fakeplayers""")
|
||||
@ConfigInfo(name = "regen-amount")
|
||||
public static double regenAmount = 0.0;
|
||||
|
||||
@ConfigInfo(name = "open-action-gui", comments = """
|
||||
Allow opening fakeplayer action gui,
|
||||
need sneak to open if you enabled inventory open gui""")
|
||||
@ConfigInfo(name = "open-action-gui")
|
||||
public static boolean canOpenActionGui = false;
|
||||
|
||||
@ConfigInfo(name = "use-action", comments = """
|
||||
Allow fakeplayers to use actions""")
|
||||
@ConfigInfo(name = "use-action")
|
||||
public static boolean canUseAction = true;
|
||||
|
||||
@ConfigInfo(name = "modify-config", comments = """
|
||||
Allow modifying fakeplayer config""")
|
||||
@ConfigInfo(name = "modify-config")
|
||||
public static boolean canModifyConfig = false;
|
||||
|
||||
@ConfigInfo(name = "manual-save-and-load", comments = """
|
||||
Allow manual save and load of fakeplayers""")
|
||||
@ConfigInfo(name = "manual-save-and-load")
|
||||
public static boolean canManualSaveAndLoad = false;
|
||||
|
||||
@ConfigInfo(name = "cache-skin", comments = """
|
||||
Use skin cache for fakeplayers""")
|
||||
@ConfigInfo(name = "cache-skin")
|
||||
public static boolean useSkinCache = false;
|
||||
|
||||
@ConfigInfo(name = "always-send-data", comments = """
|
||||
Always send data for fakeplayers""")
|
||||
@ConfigInfo(name = "always-send-data")
|
||||
public static boolean canSendDataAlways = true;
|
||||
|
||||
@ConfigInfo(name = "skip-sleep-check", comments = """
|
||||
Skip sleep check for fakeplayers""")
|
||||
@ConfigInfo(name = "skip-sleep-check")
|
||||
public static boolean canSkipSleep = false;
|
||||
|
||||
@ConfigInfo(name = "spawn-phantom", comments = """
|
||||
Allow phantoms to spawn for fakeplayers""")
|
||||
@ConfigInfo(name = "spawn-phantom")
|
||||
public static boolean canSpawnPhantom = false;
|
||||
|
||||
@ConfigInfo(name = "simulation-distance", comments = """
|
||||
Simulation distance for fakeplayers (-1 for default)""")
|
||||
@ConfigInfo(name = "simulation-distance")
|
||||
public static int simulationDistance = -1;
|
||||
|
||||
@ConfigInfo(name = "enable-locator-bar", comments = """
|
||||
Enable locator bar for fakeplayers""")
|
||||
@ConfigInfo(name = "enable-locator-bar")
|
||||
public static boolean enableLocatorBar = false;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+5
-11
@@ -9,18 +9,12 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "language")
|
||||
public class LanguageConfig implements IConfigModule {
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "lang", comments = """
|
||||
Please use the key from https://minecraft.wiki/w/Language
|
||||
Sample of format: en_us zh_cn zh_hk zh_tw
|
||||
ATTENTION: If you want to edit language for carpet system,
|
||||
please edit it in carpet config file.""")
|
||||
@ConfigInfo(name = "lang")
|
||||
public static String lang = "en_us";
|
||||
|
||||
@ConfigInfo(name = "full_blocking_load", comments = """
|
||||
Whether to allow blocking server loading when loading localized language.
|
||||
If you want only use your localized language to shown in your terminal,
|
||||
you need to enable it.
|
||||
|
||||
WARNING: This may slow down the startup speed!""")
|
||||
@ConfigInfo(name = "full_blocking_load")
|
||||
public static boolean full_blocking_load = false;
|
||||
|
||||
@ConfigInfo(name = "allow_auto_reset_comments")
|
||||
public static boolean allowAutoResetComments = true;
|
||||
}
|
||||
+1
-3
@@ -22,8 +22,6 @@ public class OldFeatureConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "old_raid_behavior")
|
||||
public static boolean oldRaidBehavior = false;
|
||||
|
||||
@ConfigInfo(name = "villager-void-trade", comments =
|
||||
"""
|
||||
Allow villager void trade.""")
|
||||
@ConfigInfo(name = "villager-void-trade")
|
||||
public static boolean villagerVoidTrade = false;
|
||||
}
|
||||
+1
-3
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "redstone")
|
||||
public class RedStoneConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "shears_rotate", comments =
|
||||
"""
|
||||
Allows you to use the Shears to right-click to rotate the block.""")
|
||||
@ConfigInfo(name = "shears_rotate")
|
||||
public static boolean shears = false;
|
||||
}
|
||||
+2
-4
@@ -18,13 +18,11 @@ public class ReplayAPIConfig implements IConfigModule {
|
||||
public static boolean enableCache = true;
|
||||
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "cache-photographer-time", comments = """
|
||||
Time to cache photographer profile(in seconds)""")
|
||||
@ConfigInfo(name = "cache-photographer-time")
|
||||
public static int cachePhotographerTime = 3600;
|
||||
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "cache-photographer-size", comments = """
|
||||
Maximum size of cache photographer profile""")
|
||||
@ConfigInfo(name = "cache-photographer-size")
|
||||
public static int cachePhotographerSize = 100;
|
||||
|
||||
@Override
|
||||
|
||||
+1
-6
@@ -8,12 +8,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "alternative_block_placement", directory = {"protocol"})
|
||||
public class AlternativeBlockPlacementProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Specify the precise placement protocol type
|
||||
NONE Disable precise placement protocol
|
||||
CARPET Precise placement protocol version 2
|
||||
CARPET_FIX Enhanced precise placement protocol version 2 (requires MasaGadget installed on client)
|
||||
LITEMATICA Precise placement protocol version 3""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static EnumAlternativePlaceType alternativeBlockPlacement = EnumAlternativePlaceType.NONE;
|
||||
|
||||
public static boolean needIgnoreDistance() {
|
||||
|
||||
+2
-4
@@ -7,10 +7,8 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "appleskin", directory = {"protocol"})
|
||||
public class AppleSkinProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable AppleSkin protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
@ConfigInfo(name = "sync-tick-interval", comments = """
|
||||
Set AppleSkin Synchronization Frequency (Unit: Game Ticks)""")
|
||||
@ConfigInfo(name = "sync-tick-interval")
|
||||
public static int syncTickInterval = 20;
|
||||
}
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "bbor", directory = {"protocol"})
|
||||
public class BBORProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable BBOR protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "jade", directory = {"protocol"})
|
||||
public class JadeProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable Jade protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
|
||||
+2
-14
@@ -1,12 +1,10 @@
|
||||
package fun.bm.lophine.config.modules.function.protocol;
|
||||
|
||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
import fun.bm.lophine.carpet.CarpetCompatSync;
|
||||
import fun.bm.lophine.enums.PcaPlayerEntityType;
|
||||
import me.earthme.luminol.config.IConfigModule;
|
||||
import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||
import me.earthme.luminol.config.flags.TransformedConfig;
|
||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.leavesmc.leaves.protocol.PcaSyncProtocol;
|
||||
@@ -17,19 +15,10 @@ import java.util.Set;
|
||||
public class PcaSyncProtocolConfig implements IConfigModule {
|
||||
private static boolean lastEnabled = false;
|
||||
|
||||
@TransformedConfig(name = "pca-sync-protocol", directory = {"protocol"})
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable PCA sync protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
|
||||
@TransformedConfig(name = "pca-sync-player-entity", directory = {"protocol"})
|
||||
@ConfigInfo(name = "sync-player-entity", comments = """
|
||||
Controls which player entities can be watched through the PCA sync protocol.
|
||||
NOBODY: never sync player entities
|
||||
BOT: only sync Lophine fake players
|
||||
OPS: sync fake players and allow operators to sync real players
|
||||
OPS_AND_SELF: sync fake players, operators, and a player's own entity
|
||||
EVERYONE: allow all player entities""")
|
||||
@ConfigInfo(name = "sync-player-entity")
|
||||
public static PcaPlayerEntityType syncPlayerEntity = PcaPlayerEntityType.OPS;
|
||||
|
||||
@Override
|
||||
@@ -38,6 +27,5 @@ public class PcaSyncProtocolConfig implements IConfigModule {
|
||||
PcaSyncProtocol.onConfigModify(enabled);
|
||||
lastEnabled = enabled;
|
||||
}
|
||||
CarpetCompatSync.apply();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "rei", directory = {"protocol"})
|
||||
public class REIServerProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable Roughly Enough Items protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,6 +39,6 @@ public class ServuxProtocolConfig implements IConfigModule {
|
||||
public static int litematicsMaxNbtSize = 2097152;
|
||||
|
||||
@CommandSuggestions(suggest = {"-1", "1200"})
|
||||
@ConfigInfo(name = "litematics-print-max-delay-ticks", directory = {"litematics"}, comments = "The max delay ticks for printing litematics, -1 to disable")
|
||||
@ConfigInfo(name = "litematics-print-max-delay-ticks", directory = {"litematics"})
|
||||
public static int maxDelay = 1200;
|
||||
}
|
||||
|
||||
+3
-6
@@ -12,14 +12,11 @@ import java.util.Set;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "syncmatica", directory = {"protocol"})
|
||||
public class SyncmaticaProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable Syncmatica protocol support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
@ConfigInfo(name = "useQuota", comments = """
|
||||
Is there a limit on the size of projection files?""")
|
||||
@ConfigInfo(name = "useQuota")
|
||||
public static boolean useQuota = false;
|
||||
@ConfigInfo(name = "quota-Limit", comments = """
|
||||
Maximum Projection File Size (in bytes)""")
|
||||
@ConfigInfo(name = "quota-Limit")
|
||||
public static int quotaLimit = 40000000;
|
||||
|
||||
public void onLoaded(CommentedFileConfig configInstance, @Nullable Set<Exception> e) {
|
||||
|
||||
+1
-2
@@ -9,8 +9,7 @@ import java.util.Random;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "xaero-map", directory = {"protocol"})
|
||||
public class XaeroMapProtocolConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Enable Xaero World Map Protocol Support""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
@ConfigInfo(name = "xaeroMapServerID")
|
||||
public static int xaeroMapServerID = new Random().nextInt();
|
||||
|
||||
+2
-4
@@ -7,11 +7,9 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "disable-check")
|
||||
public class DisableCheckConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "disable-op-move-check", comments = """
|
||||
Disable the check for the operator's move check""")
|
||||
@ConfigInfo(name = "disable-op-move-check")
|
||||
public static boolean disableOpMoveCheck = false;
|
||||
|
||||
@ConfigInfo(name = "disable-op-fly-check", comments = """
|
||||
Disable the check for the operator's fly check""")
|
||||
@ConfigInfo(name = "disable-op-fly-check")
|
||||
public static boolean disableOpFlyCheck = false;
|
||||
}
|
||||
|
||||
+1
-5
@@ -7,10 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "item-entity")
|
||||
public class ItemEntityConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "follow-tick-sequence-merge", comments = """
|
||||
Due to Paper's modification of the merge radius,
|
||||
when the merge radius is large and stacks containing many items get stuck in an unexpected position,
|
||||
individual items may never reach their destination.
|
||||
This configuration option is added to fix this behavior.""")
|
||||
@ConfigInfo(name = "follow-tick-sequence-merge")
|
||||
public static boolean followTickSequenceMerge = false;
|
||||
}
|
||||
|
||||
+1
-3
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.REMOVED, name = "removed_config")
|
||||
public class RemovedConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "removed", comments =
|
||||
"""
|
||||
RemovedConfig redirect to here, no any function.""")
|
||||
@ConfigInfo(name = "removed")
|
||||
public static boolean enabled = true;
|
||||
}
|
||||
@@ -271,6 +271,7 @@ public class ServerI18nUtil {
|
||||
private static void loadLophineI18n(BiConsumer<String, String> bi) {
|
||||
if (Language.class.getResource(lophineLangPath) != null) {
|
||||
Language.parseTranslations(bi, lophineLangPath);
|
||||
if (LanguageConfig.allowAutoResetComments) ConfigManager.reloadComments();
|
||||
} else {
|
||||
loadLophineI18nDefault(bi);
|
||||
}
|
||||
@@ -297,6 +298,12 @@ public class ServerI18nUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLocalizedComment(String key) {
|
||||
String current = Language.getInstance().getOrDefault(key, "");
|
||||
if (!current.isBlank()) return current;
|
||||
return Language.DEFAULT_INSTANCE.getOrDefault(key, "");
|
||||
}
|
||||
|
||||
private static class UnsupportedLanguageException extends Exception {
|
||||
}
|
||||
|
||||
|
||||
@@ -152,4 +152,13 @@ public class ConfigManager {
|
||||
toReload.forEach(ConfigsInstance::saveConfigs);
|
||||
needTransformedConfigs.clear(); // free space when all done
|
||||
}
|
||||
|
||||
public static void reloadComments() {
|
||||
CompletableFuture<?>[] futures = configfiles.values().stream()
|
||||
.map(config -> CompletableFuture.runAsync(() -> {
|
||||
config.reload(false, false);
|
||||
}))
|
||||
.toArray(CompletableFuture[]::new);
|
||||
CompletableFuture.allOf(futures).join();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package me.earthme.luminol.config;
|
||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import fun.bm.lophine.utils.ServerI18nUtil;
|
||||
import io.papermc.paper.threadedregions.RegionizedServer;
|
||||
import me.earthme.luminol.api.config.ConfigDataPair;
|
||||
import me.earthme.luminol.api.config.LuminolConfigsInstance;
|
||||
@@ -343,7 +344,7 @@ public class ConfigsInstance implements LuminolConfigsInstance {
|
||||
private void handleClassLevelComments(ConfigClassInfo configClassInfo, String fullConfigBasePath) {
|
||||
final String comment = configFileInstance.getComment(fullConfigBasePath);
|
||||
if (comment == null || comment.isBlank()) {
|
||||
String comments0 = configClassInfo.comments();
|
||||
String comments0 = ServerI18nUtil.getLocalizedComment(name + "." + fullConfigBasePath + ".comment");
|
||||
if (!comments0.isBlank()) {
|
||||
configFileInstance.setComment(fullConfigBasePath, comments0);
|
||||
}
|
||||
@@ -440,7 +441,7 @@ public class ConfigsInstance implements LuminolConfigsInstance {
|
||||
}
|
||||
|
||||
// Add default value with comments
|
||||
final String comments = configInfo.comments();
|
||||
final String comments = ServerI18nUtil.getLocalizedComment(name + "." + fullConfigKeyName + ".comment");
|
||||
if (!comments.isBlank()) {
|
||||
configFileInstance.setComment(fullConfigKeyName, comments);
|
||||
}
|
||||
@@ -485,7 +486,7 @@ public class ConfigsInstance implements LuminolConfigsInstance {
|
||||
removeConfig(oldConfigKeyName, transformedConfig.directory());
|
||||
}
|
||||
|
||||
final String comments = configInfo.comments();
|
||||
final String comments = ServerI18nUtil.getLocalizedComment(name + "." + fullConfigKeyName + ".comment");
|
||||
if (!comments.isBlank()) {
|
||||
configFileInstance.setComment(fullConfigKeyName, comments);
|
||||
}
|
||||
@@ -526,7 +527,7 @@ public class ConfigsInstance implements LuminolConfigsInstance {
|
||||
|
||||
// Handle comments
|
||||
if (!keepComments) {
|
||||
final String comments = configInfo.comments();
|
||||
final String comments = ServerI18nUtil.getLocalizedComment(name + "." + fullConfigKeyName + ".comment");
|
||||
configFileInstance.setComment(fullConfigKeyName, comments);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,4 @@ public @interface ConfigClassInfo {
|
||||
String name();
|
||||
|
||||
String[] directory() default {};
|
||||
|
||||
String comments() default "";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,5 @@ public @interface ConfigInfo {
|
||||
|
||||
String[] directory() default {};
|
||||
|
||||
String comments() default "";
|
||||
|
||||
boolean allowAutoReset() default true;
|
||||
}
|
||||
+2
-9
@@ -11,16 +11,9 @@ public class CommandConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enable_data_command")
|
||||
@HotReloadUnsupported
|
||||
public static boolean data = false;
|
||||
@ConfigInfo(name = "enable_command_block", comments = """
|
||||
Force to enable command blocks.
|
||||
ATTENTION: WOULD CAUSE SERVER CRASHING AS SOME THREADING ISSUE!!!
|
||||
DO NOT ENABLE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
""")
|
||||
@ConfigInfo(name = "enable_command_block")
|
||||
public static boolean commandBlock = false;
|
||||
@ConfigInfo(name = "enable_waypoints_and_waypoint_command", comments = """
|
||||
Enable waypoint and waypoint command.
|
||||
WARN: Still under testing
|
||||
""")
|
||||
@ConfigInfo(name = "enable_waypoints_and_waypoint_command")
|
||||
@HotReloadUnsupported
|
||||
public static boolean waypointsAndWaypointCommand = false;
|
||||
}
|
||||
|
||||
+1
-6
@@ -7,11 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_async_catchers")
|
||||
public class DisableAsyncCatcherConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Disable async catcher to prevent some crashes caused by some plugins which supports folia but has issuable logics.
|
||||
ATTENTION: Would cause region deadlock when getChunkAt was incorrectly called!
|
||||
See: https://github.com/PaperMC/Folia/issues/280 which is resolved in folia(https://github.com/PaperMC/Folia/commit/2e7bc0721af95196c85500c7bb136aeea0bc12ce)
|
||||
DO NOT ENABLE UNLESS YOU KNOW WHAT YOU ARE DOING!!!
|
||||
""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
+1
-4
@@ -7,9 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "disable_entity_exception_catchers")
|
||||
public class DisableEntityCatchConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
If this config enabled, the server will crash directly when entity ticking has some errors instead of removing the entity to keep server running.
|
||||
It could prevent entity disappearing but may cause more server crashes.
|
||||
DO NOT ENABLE UNLESS YOU KNOW WHAT YOU ARE DOING!!!""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
+1
-8
@@ -10,13 +10,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "collision_behavior")
|
||||
public class CollisionBehaviorConfig implements IConfigModule {
|
||||
@CommandSuggestions(suggest = {"VANILLA", "BLOCK_SHAPE_VANILLA", "PAPER"})
|
||||
@ConfigInfo(name = "mode", comments =
|
||||
"""
|
||||
Decides which collision logics will be used(Moonrise and Paper modified this for optimization but would also break some vanilla behaviours at the same time).
|
||||
Would be useful for fixing improper behaviours of some huge redstone machines
|
||||
Available Value:
|
||||
VANILLA
|
||||
BLOCK_SHAPE_VANILLA
|
||||
PAPER""")
|
||||
@ConfigInfo(name = "mode")
|
||||
public static EnumCollisionBehaviorMode behaviorMode = EnumCollisionBehaviorMode.BLOCK_SHAPE_VANILLA;
|
||||
}
|
||||
+1
-7
@@ -7,13 +7,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "fix_high_velocity_issue")
|
||||
public class FoliaEntityMovingFixConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments =
|
||||
"""
|
||||
A simple fix of an issue on folia\s
|
||||
(Sometimes 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""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "warn_on_detected")
|
||||
|
||||
+4
-4
@@ -5,14 +5,14 @@ import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "force_cleanup_drop_non_owned_entity_memory_module", comments = "This config is a temporary fix for those incorrect owned data in the memory of each mob, for more you can see https://github.com/PaperMC/Folia/issues/203")
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "force_cleanup_drop_non_owned_entity_memory_module")
|
||||
public class ForceCleanupEntityBrainMemoryConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled_for_entity", comments = "When enabled, the entity's brain will clean the memory which is typed of entity and not belong to current tickregion")
|
||||
@ConfigInfo(name = "enabled_for_entity")
|
||||
public static boolean enabledForEntity = false;
|
||||
|
||||
@ConfigInfo(name = "enabled_for_block_pos", comments = "When enabled, the entity's brain will clean the memory which is typed of block_pos and not belong to current tickregion")
|
||||
@ConfigInfo(name = "enabled_for_block_pos")
|
||||
public static boolean enabledForBlockPos = false;
|
||||
|
||||
@ConfigInfo(name = "enabled_for_position_tracker", comments = "When enabled, the entity's brain will clean the memory which is typed of position_tracker and not belong to current tickregion")
|
||||
@ConfigInfo(name = "enabled_for_position_tracker")
|
||||
public static boolean enabledForPositionTracker = false;
|
||||
}
|
||||
+1
-3
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "item_multitask")
|
||||
public class ItemMultitaskConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Prevent the server from interrupting the state of items
|
||||
during block interactions or hotbar slot changes.""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
|
||||
+1
-4
@@ -6,9 +6,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "long_command_support")
|
||||
public class LongCommandSupportConfig {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Some long commands can be run through the dialog command,
|
||||
but paper has prohibited it.
|
||||
Enable this to fix this problem.""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = true;
|
||||
}
|
||||
|
||||
+1
-4
@@ -7,9 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(name = "poi_range_fixes", category = EnumConfigCategory.FIXES)
|
||||
public class POIRangeFixes implements IConfigModule {
|
||||
@ConfigInfo(name = "do_not_compete_poi_if_unloaded", comments = """
|
||||
Do not compete POI if it's unloaded
|
||||
Related with https://github.com/PaperMC/Folia/issues/292
|
||||
""")
|
||||
@ConfigInfo(name = "do_not_compete_poi_if_unloaded")
|
||||
public static boolean doNotCompetePOIIfUnloaded = false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "pathfinding_fixes")
|
||||
public class PathfindingFixesConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "break_down_pathfinding_when_out_of_region", comments = "Recompute path or stop pathfinding when it's touching the blocks out of current tick region")
|
||||
@ConfigInfo(name = "break_down_pathfinding_when_out_of_region")
|
||||
public static boolean breakDownPathfindingWhenOutOfRegion = false;
|
||||
@ConfigInfo(name = "do_not_pathfind_to_not_owned_targets", comments = "Skip pathfinding target when it's out of current tick region")
|
||||
@ConfigInfo(name = "do_not_pathfind_to_not_owned_targets")
|
||||
public static boolean doNotPathfindToNotOwnedTargets = false;
|
||||
}
|
||||
|
||||
+1
-4
@@ -7,10 +7,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "prevent_incorrect_teleport_async_calls_during_move_event")
|
||||
public class PreventIncorrectTeleportAsyncConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
When enabled, the server would reject some incorrect teleportAsync calls during move events.
|
||||
And this will reduce the crashes which caused by plugins(Residence etc.)
|
||||
But you should notice that it might break the compatibility with some plugins.""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "throw_when_caught")
|
||||
|
||||
+1
-4
@@ -7,9 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "allow_unsafe_teleportation")
|
||||
public class UnsafeTeleportationConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Allow non player entities enter end portals if enabled.
|
||||
If you want to use sand duping,please turn on this.
|
||||
Warning: This would cause some unsafe issues, you could learn more on : https://github.com/PaperMC/Folia/issues/297""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
}
|
||||
+1
-1
@@ -7,6 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "use_vanilla_random_source")
|
||||
public class VanillaRandomSourceConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enable_for_player_entity", comments = "Related with RNG cracks")
|
||||
@ConfigInfo(name = "enable_for_player_entity")
|
||||
public static boolean useLegacyRandomSourceForPlayers = false;
|
||||
}
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class MembarConfig implements IConfigModule {
|
||||
public static List<String> memColors = List.of("<gradient:#55ff55:#00aa00><text></gradient>", "<gradient:#ffff55:#ffaa00><text></gradient>", "<gradient:#ff5555:#aa0000><text></gradient>", "<gradient:#55ff55:#00aa00><text></gradient>");
|
||||
@ConfigInfo(name = "update_interval_ticks")
|
||||
public static int updateInterval = 15;
|
||||
@ConfigInfo(name = "display", comments = "Available displays: BOSS_BAR, ACTION_BAR, TAB_LIST")
|
||||
@ConfigInfo(name = "display")
|
||||
public static EnumStatusBarDisplay display = EnumStatusBarDisplay.BOSS_BAR;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+3
-15
@@ -12,27 +12,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ConfigClassInfo(name = "portal_rate_limit", category = EnumConfigCategory.FUNCTION)
|
||||
public class PortalRateLimiterConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enable", comments = "Whether or not to limit the portal rate when entity goes into portals")
|
||||
@ConfigInfo(name = "enable")
|
||||
@HotReloadUnsupported
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "maximum_portal_teleports_per_tick", comments = """
|
||||
Decides how much portal teleportation should be handled within a tick in a single tick region,when exceed,
|
||||
the portal teleportation will be pushed into the next tick
|
||||
|
||||
Note: set to -1 to use custom expressions""")
|
||||
@ConfigInfo(name = "maximum_portal_teleports_per_tick")
|
||||
@HotReloadUnsupported
|
||||
public static int maxPortalTeleportsPerTick = 200;
|
||||
|
||||
@ConfigInfo(name = "maximum_portal_teleports_per_tick_expression", comments = """
|
||||
If the fixed limit is not enough for use, you could define your own expression to dynamically limit the
|
||||
portal rate.
|
||||
|
||||
Available variables(all is of current tickregion): e (ticking_entity_count)
|
||||
c (ticking_chunk_count)
|
||||
p (player_count)
|
||||
Example: 50 * (1 + sqrt(x/1000) + c/200 + p/5)
|
||||
""")
|
||||
@ConfigInfo(name = "maximum_portal_teleports_per_tick_expression")
|
||||
@HotReloadUnsupported
|
||||
public static String maxPortalTeleportsExpression = "50 * (1 + sqrt(e/1000) + c/200 + p/5)";
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class RegionBarConfig implements IConfigModule {
|
||||
public static List<String> utilColors = List.of("<gradient:#55ff55:#00aa00><text></gradient>", "<gradient:#ffff55:#ffaa00><text></gradient>", "<gradient:#ff5555:#aa0000><text></gradient>", "<gradient:#55ff55:#00aa00><text></gradient>");
|
||||
@ConfigInfo(name = "update_interval_ticks")
|
||||
public static int updateInterval = 15;
|
||||
@ConfigInfo(name = "display", comments = "Available displays: BOSS_BAR, ACTION_BAR, TAB_LIST")
|
||||
@ConfigInfo(name = "display")
|
||||
public static EnumStatusBarDisplay display = EnumStatusBarDisplay.BOSS_BAR;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+7
-7
@@ -19,25 +19,25 @@ import java.util.Set;
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "region_format")
|
||||
public class RegionFormatConfig implements IConfigModule {
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "format", allowAutoReset = false, comments = "Available choices: MCA, B_LINEAR, LINEAR_V2")
|
||||
@ConfigInfo(name = "format", allowAutoReset = false)
|
||||
public static EnumRegionFormat regionFormat = EnumRegionFormat.MCA;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "linear_compression_level", comments = "Decides the compression level of the region file(Only works for LINEAR_V2 and B_LINEAR)")
|
||||
@ConfigInfo(name = "linear_compression_level")
|
||||
public static int linearCompressionLevel = 1;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "linear_io_thread_count", comments = "Decides the worker thread count of linear(Only works for LINEAR_V2)")
|
||||
@ConfigInfo(name = "linear_io_thread_count")
|
||||
public static int linearIoThreadCount = 6;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "linear_io_flush_delay_ms", comments = "Decides when it will be flushed to the region file when it has been marked to save for n(default is 100) milliseconds(Only works for LINEAR_V2)")
|
||||
@ConfigInfo(name = "linear_io_flush_delay_ms")
|
||||
public static int linearIoFlushDelayMs = 100;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "blinear_io_flush_delay_ms", comments = "Decides when it will be flushed to the region file when there has been no write operations for n(default is 3000) milliseconds(Only works for B_LINEAR)")
|
||||
@ConfigInfo(name = "blinear_io_flush_delay_ms")
|
||||
public static int blinearIoFlushDelayMs = 3000;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "blinear_io_thread_count", comments = "Decides the worker thread count of buffered linear(Only works for B_LINEAR)")
|
||||
@ConfigInfo(name = "blinear_io_thread_count")
|
||||
public static int blinearIoThreadCount = 6;
|
||||
@HotReloadUnsupported
|
||||
@ConfigInfo(name = "linear_use_virtual_thread", comments = "Decides if it could use virtual threads for linear format(Only works for LINEAR_V2)")
|
||||
@ConfigInfo(name = "linear_use_virtual_thread")
|
||||
public static boolean linearUseVirtualThread = true;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+3
-13
@@ -11,25 +11,15 @@ import java.util.Base64;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "secure_seed")
|
||||
public class SecureSeedConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = """
|
||||
Once you enable secure seed, all ores and structures are generated with 1024-bit seed
|
||||
instead of using 64-bit seed in vanilla, making traditional seed cracking impossible.
|
||||
Note: If you use V1 it will be vulnerable to terrain elevation attacks.
|
||||
***** WARN: You need keep it enabled if your old world are also using secure seed! Or it will kill your save *****""")
|
||||
@ConfigInfo(name = "enabled")
|
||||
@HotReloadUnsupported
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "version", comments = """
|
||||
Version 1: Blake2b (insecure, reversible with a GPU/ASIC cluster in minutes with enough entropy)
|
||||
Version 2: Blake3 with salt key derivation (recommended, irreversible)
|
||||
***** WARN: Switching versions will cause chunk errors! *****""")
|
||||
@ConfigInfo(name = "version")
|
||||
@HotReloadUnsupported
|
||||
public static int version = 1;
|
||||
|
||||
@ConfigInfo(name = "salt", comments = """
|
||||
Auto-generated 256-bit salt for V2 cryptographic operations.
|
||||
Generated once on first startup - DO NOT SHARE THIS OR MODIFY (MODIFYING THIS WILL CAUSE CHUNK ERRORS)!
|
||||
Used with Blake3 keyed hash to make seed irreversible.""")
|
||||
@ConfigInfo(name = "salt")
|
||||
@HotReloadUnsupported
|
||||
public static String salt = generateSalt();
|
||||
|
||||
|
||||
+3
-3
@@ -32,11 +32,11 @@ public class TpsBarConfig implements IConfigModule {
|
||||
public static List<String> chunkHotColors = List.of("<gradient:#55ff55:#00aa00><text></gradient>", "<gradient:#ffff55:#ffaa00><text></gradient>", "<gradient:#ff5555:#aa0000><text></gradient>", "<gradient:#55ff55:#00aa00><text></gradient>");
|
||||
@ConfigInfo(name = "update_interval_ticks")
|
||||
public static int updateInterval = 15;
|
||||
@ConfigInfo(name = "precision_of_tps_value", comments = "Example(if tps is 20.00000000)(value -> result): 2 -> 20.00, 1 -> 20.0")
|
||||
@ConfigInfo(name = "precision_of_tps_value")
|
||||
public static int precisionOfTPS = 2;
|
||||
@ConfigInfo(name = "precision_of_mspt_value", comments = "Example(if mspt is 20.00000000)(value -> result): 2 -> 20.00, 1 -> 20.0")
|
||||
@ConfigInfo(name = "precision_of_mspt_value")
|
||||
public static int precisionOfMSPT = 2;
|
||||
@ConfigInfo(name = "display", comments = "Available displays: BOSS_BAR, ACTION_BAR, TAB_LIST")
|
||||
@ConfigInfo(name = "display")
|
||||
public static EnumStatusBarDisplay display = EnumStatusBarDisplay.BOSS_BAR;
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+1
-6
@@ -11,11 +11,6 @@ public class TripwireBehaviorConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "behavior_mode", comments =
|
||||
"""
|
||||
Available Value:
|
||||
VANILLA20
|
||||
VANILLA21
|
||||
MIXED""")
|
||||
@ConfigInfo(name = "behavior_mode")
|
||||
public static EnumTripwireBehavior behaviorMode = EnumTripwireBehavior.VANILLA21;
|
||||
}
|
||||
+5
-16
@@ -12,29 +12,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ConfigClassInfo(
|
||||
category = EnumConfigCategory.MISC,
|
||||
name = "auto_update",
|
||||
comments = """
|
||||
Checks GitHub Releases for newer version's jars on a schedule.
|
||||
Downloads are staged under auto_update/lophine and written to auto_update/core.path,
|
||||
which Hyacinthusclip can consume on the next restart.
|
||||
If target_jar_path is set, server will also try to replace that launcher jar directly."""
|
||||
)
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "auto_update")
|
||||
public class AutoUpdateConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled", comments = "Whether the server should check for updates automatically.")
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = false;
|
||||
|
||||
@ConfigInfo(name = "check_times", comments = "List of daily check times in HH:mm, based on the server's local time zone.")
|
||||
@ConfigInfo(name = "check_times")
|
||||
public static List<String> checkTimes = List.of("06:00");
|
||||
|
||||
@ConfigInfo(name = "allow_prerelease", comments = "Whether prerelease GitHub releases are allowed when selecting an update.")
|
||||
@ConfigInfo(name = "allow_prerelease")
|
||||
public static boolean allowPrerelease = false;
|
||||
|
||||
@ConfigInfo(name = "target_jar_path", comments = """
|
||||
Optional launcher jar path to replace after a successful download.
|
||||
Leave this blank to keep the downloaded jar staged in auto_update/lophine
|
||||
and let Hyacinthusclip switch to it through auto_update/core.path on restart.""")
|
||||
@ConfigInfo(name = "target_jar_path")
|
||||
public static String targetJarPath = "";
|
||||
|
||||
@DoNotLoad
|
||||
|
||||
+3
-5
@@ -7,12 +7,10 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "disable_warning")
|
||||
public class DisableWarningConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "disable_heightmap_warning", comments =
|
||||
"""
|
||||
Disable heightmap-check's warning""")
|
||||
@ConfigInfo(name = "disable_heightmap_warning")
|
||||
public static boolean disableHeightmapWarning = false;
|
||||
@ConfigInfo(name = "disable_offline_mode_warning", comments = "Disable offline warns popped in the log when starting the server")
|
||||
@ConfigInfo(name = "disable_offline_mode_warning")
|
||||
public static boolean disableOfflineModeWarning = false;
|
||||
@ConfigInfo(name = "disable_moved_wrongly_threshold_warning", comments = "Disable wrongly move warns and checks")
|
||||
@ConfigInfo(name = "disable_moved_wrongly_threshold_warning")
|
||||
public static boolean disableMovedWronglyThresholdWarning = false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "folia_watchdog")
|
||||
public class FoliaWatchogConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "tick_region_time_out_ms", comments = "Decides the interval of the watchdog prints the threads dumps of tickregions in stuck")
|
||||
@ConfigInfo(name = "tick_region_time_out_ms")
|
||||
public static int tickRegionTimeOutMs = 5000;
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package me.earthme.luminol.config.modules.misc;
|
||||
|
||||
import me.earthme.luminol.config.IConfigModule;
|
||||
import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "mojang_out_of_order_chat_check")
|
||||
public class InorderChatConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "enabled")
|
||||
public static boolean enabled = true;
|
||||
}
|
||||
+1
-4
@@ -5,10 +5,7 @@ import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "force_disable_packet_limiter_of_paper", comments =
|
||||
"Force and fully disable all packet limiters of Paper, which is used to prevent from kicking by using some quick crafting mods but \n" +
|
||||
"has negative impacts on security"
|
||||
)
|
||||
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "force_disable_packet_limiter_of_paper")
|
||||
public class PaperPacketLimiterConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "force_disable")
|
||||
public static boolean forceDisable = false;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user