Begin remigrate to Shiroha
uhm
This commit is contained in:
+11
-11
@@ -13,11 +13,11 @@ index aa575f3b76ef70ffb9f0410e7e5cfe7af384bfbd..a00b086962b68d6f86cfb55eee6f61af
|
||||
|
||||
private void globalTick(final long tickCount) {
|
||||
++this.tickCount;
|
||||
+ // Camellia start - Add a config to enable tick command
|
||||
+ // Shiroha start - Add a config to enable tick command
|
||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
||||
+ MinecraftServer.getServer().tickRateManager().tick();
|
||||
+ }
|
||||
+ // Camellia end - Add a config to enable tick command
|
||||
+ // Shiroha end - Add a config to enable tick command
|
||||
// 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
|
||||
@@ -26,7 +26,7 @@ index aa575f3b76ef70ffb9f0410e7e5cfe7af384bfbd..a00b086962b68d6f86cfb55eee6f61af
|
||||
|
||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||
- if (world.tickTime) {
|
||||
+ if ((!moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Camellia - Add a config to enable tick command
|
||||
+ if ((!moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Shiroha - Add a config to enable tick command
|
||||
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
||||
}
|
||||
}
|
||||
@@ -38,11 +38,11 @@ index 913161732b0affa70fb114dd4087a6102b611cba..ccd86db7b384d99d290869a155792b49
|
||||
try {
|
||||
// next start isn't updated until the end of this tick
|
||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||
+ // Camellia start - Add a config to enable tick command
|
||||
+ // Shiroha start - Add a config to enable tick command
|
||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
||||
+ MinecraftServer.getServer().tickRateManager().endTickWork();
|
||||
+ }
|
||||
+ // Camellia end - Add a config to enable tick command
|
||||
+ // Shiroha end - Add a config to enable tick command
|
||||
} catch (final Throwable thr) {
|
||||
this.scheduler.regionFailed(this, false, thr);
|
||||
// regionFailed will schedule a shutdown, so we should avoid letting this region tick further
|
||||
@@ -55,11 +55,11 @@ index 6b91eab354d8e7c93bf148bfc1f5a611f8ffcf86..d971cc9669aca1005c026133e7e7e7f9
|
||||
TellRawCommand.register(this.dispatcher, context);
|
||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||
- //TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ // Camellia start - Add a config to enable tick command
|
||||
+ // Shiroha start - Add a config to enable tick command
|
||||
+ if (moe.monnairealms.camellia.config.modules.experiment.CommandConfig.tick) {
|
||||
+ TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ }
|
||||
+ // Camellia end - Add a config to enable tick command
|
||||
+ // Shiroha end - Add a config to enable tick command
|
||||
TimeCommand.register(this.dispatcher, context);
|
||||
TitleCommand.register(this.dispatcher, context);
|
||||
//TriggerCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
@@ -72,7 +72,7 @@ index e8d6a67143f3f0b4813e51bb273498bc404899b9..12ff74e46d39d3bf6f025cc59a27ba89
|
||||
.requires(Commands.hasPermission(Commands.LEVEL_ADMINS))
|
||||
.then(Commands.literal("query").executes(c -> tickQuery(c.getSource())))
|
||||
- .then(
|
||||
+/* .then( // Camellia - Add config to enable tick command - limit unsupported functions
|
||||
+/* .then( // Shiroha - Add config to enable tick command - limit unsupported functions
|
||||
Commands.literal("rate")
|
||||
.then(
|
||||
Commands.argument("rate", FloatArgumentType.floatArg(1.0F, 10000.0F))
|
||||
@@ -80,7 +80,7 @@ index e8d6a67143f3f0b4813e51bb273498bc404899b9..12ff74e46d39d3bf6f025cc59a27ba89
|
||||
.executes(c -> setTickingRate(c.getSource(), FloatArgumentType.getFloat(c, "rate")))
|
||||
)
|
||||
- )
|
||||
+ )*/ // Camellia - Add config to enable tick command - limit unsupported functions
|
||||
+ )*/ // Shiroha - Add config to enable tick command - limit unsupported functions
|
||||
.then(
|
||||
Commands.literal("step")
|
||||
.executes(c -> step(c.getSource(), 1))
|
||||
@@ -89,7 +89,7 @@ index e8d6a67143f3f0b4813e51bb273498bc404899b9..12ff74e46d39d3bf6f025cc59a27ba89
|
||||
)
|
||||
)
|
||||
- .then(
|
||||
+/* .then( // Camellia - Add config to enable tick command - limit unsupported functions
|
||||
+/* .then( // Shiroha - Add config to enable tick command - limit unsupported functions
|
||||
Commands.literal("sprint")
|
||||
.then(Commands.literal("stop").executes(c -> stopSprinting(c.getSource())))
|
||||
.then(
|
||||
@@ -98,7 +98,7 @@ index e8d6a67143f3f0b4813e51bb273498bc404899b9..12ff74e46d39d3bf6f025cc59a27ba89
|
||||
.executes(c -> sprint(c.getSource(), IntegerArgumentType.getInteger(c, "time")))
|
||||
)
|
||||
- )
|
||||
+ )*/ // Camellia - Add config to enable tick command - limit unsupported functions
|
||||
+ )*/ // Shiroha - Add config to enable tick command - limit unsupported functions
|
||||
.then(Commands.literal("unfreeze").executes(c -> setFreeze(c.getSource(), false)))
|
||||
.then(Commands.literal("freeze").executes(c -> setFreeze(c.getSource(), true)))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user