Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@0bf8790 Fix client lag spikes due to client light recalc PaperMC/Paper@aabf676 Prevent unloading worlds with pending player logins PaperMC/Paper@eff22eb Ensure players are removed from pendingLogin PaperMC/Paper@046466f Re-arrange most chunk system patches to front (#8338) PaperMC/Paper@e8c2c3b Fix World#refreshChunk not working for chunks in no-tick range PaperMC/Paper@09904fd Re-add legacy getChunkAtAsynchronously to ChunkProviderServer PaperMC/Paper@36a5f15 Allow preventing BlockDestroyEvent from dropping items (#8349) PaperMC/Paper@e51401e Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8347) PaperMC/Paper@51183af Fix console completer/highlighter having invalid source stack (#8346) PaperMC/Paper@ef0e5a6 Updated Upstream (Bukkit/CraftBukkit/Spigot) PaperMC/Paper@178f035 Restore no-crash behaviour when read-only config file(s) (#8318) PaperMC/Paper@267dd18 Stop large look changes from crashing the server (#8326) PaperMC/Paper@36f0c1b Rebuild patches PaperMC/Paper@751d092 Properly close section storage managed files (#8364) PaperMC/Paper@f5f84ff Add custom destroyerIdentity parameter to the sendBlockBreak function (#5840) PaperMC/Paper@05f6a5c Limit size of Authenticator Cache Thread Pool (#8360) PaperMC/Paper@ef670eb EndDragonFight killed statuses should be false for newly created worlds (#8354) PaperMC/Paper@b826065 fire EntityChangeBlockEvent in more places (#6371) PaperMC/Paper@34777cd Missing eating regain reason (#8244) PaperMC/Paper@dbda887 Missing some effect cause (#8307) PaperMC/Paper@63cb747 Added byte array serialization/deserialization for PersistentDataContainers (#7505) PaperMC/Paper@ea777c3 Add a consumer parameter to ProjectileSource#launchProjectile (#8374) PaperMC/Paper@470c638 Configurable chat thread limit (#7878) PaperMC/Paper@dbc2d60 Make WorldCreator#keepSpawnLoaded return the WorldCreator (Fixes #8321) (#8371) PaperMC/Paper@f8742e2 Also load resources from LibraryLoader (#8335) PaperMC/Paper@f7e6809 Fix Pathfinding After World Has Changed (#8068) PaperMC/Paper@ad3dffe Respect preventMovingIntoUnloadedChunks for optimized collision checking (#8259) PaperMC/Paper@8db45c4 Copper clear on lightning strike calls EntityChangeBlockEvent (#8126) PaperMC/Paper@9e614e6 Fix ground pathfinding (#7683) PaperMC/Paper@339e85d Updated Upstream (CraftBukkit) (#8376) PaperMC/Paper@980c1d1 Updated Upstream (Bukkit/CraftBukkit) (#8378) PaperMC/Paper@8681503 Call EntityChangeBlockEvent for frogs egg (#8136) PaperMC/Paper@ec0c550 Call BlockPhysicsEvent more often (#8264) PaperMC/Paper@f528f53 Correct javadocs on PlayerArmorStandManipulateEvent (#7719) PaperMC/Paper@3996e6e Updated Upstream (Bukkit/CraftBukkit/Spigot) PaperMC/Paper@d332623 Avoid potential place where the world map could be modified after its iterator is created (#8315) PaperMC/Paper@6736f39 Fix mangled patch PaperMC/Paper@4d52f1d Add method isTickingWorlds to Bukkit (#8316) PaperMC/Paper@62680d5 Avoid item meta usage for itemstack enchantment getter (#8373) PaperMC/Paper@b4c025b Fix player desync on dimension change (#8253) PaperMC/Paper@6d63005 Fix setEggCount method from TurtleLayEggEvent (#8385) PaperMC/Paper@abe53a7 Fix typos in isTickingWorlds API javadocs (#8382) PaperMC/Paper@01a1387 Rewrite chunk system (#8177) PaperMC/Paper@b58c0cf Update snekyaml
45 lines
2.6 KiB
Diff
45 lines
2.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Blast-MC <cjblanton2@gmail.com>
|
|
Date: Thu, 25 Aug 2022 20:32:01 -0400
|
|
Subject: [PATCH] Make FixLight use action bar
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
|
index 450bd95218852174cfbc88d4517e17daee5ffd5f..794842cb3dfa0732ccecf625b97dbc6c311a8a18 100644
|
|
--- a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
|
+++ b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
|
@@ -24,6 +24,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.BLUE;
|
|
import static net.kyori.adventure.text.format.NamedTextColor.DARK_AQUA;
|
|
import static net.kyori.adventure.text.format.NamedTextColor.GREEN;
|
|
import static net.kyori.adventure.text.format.NamedTextColor.RED;
|
|
+import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
|
|
|
|
@DefaultQualifier(NonNull.class)
|
|
public final class FixLightCommand implements PaperSubcommand {
|
|
@@ -93,17 +94,20 @@ public final class FixLightCommand implements PaperSubcommand {
|
|
lightengine.relight(chunks,
|
|
(final ChunkPos chunkPos) -> {
|
|
++relitChunks[0];
|
|
- sender.getBukkitEntity().sendMessage(text().color(DARK_AQUA).append(
|
|
- text("Relit chunk ", BLUE), text(chunkPos.toString()),
|
|
- text(", progress: ", BLUE), text((int) (Math.round(100.0 * (double) (relitChunks[0]) / (double) pending[0])) + "%")
|
|
+ sender.getBukkitEntity().sendActionBar(text().color(DARK_AQUA).append(
|
|
+ text("Relighting Chunks: ", DARK_AQUA), text(chunkPos.toString()),
|
|
+ text(" " + relitChunks[0], YELLOW),
|
|
+ text("/", DARK_AQUA),
|
|
+ text(pending[0] + " ", YELLOW),
|
|
+ text("(" + (int) (Math.round(100.0 * (double) (relitChunks[0]) / (double) pending[0])) + "%)", YELLOW)
|
|
));
|
|
},
|
|
(final int totalRelit) -> {
|
|
final long end = System.nanoTime();
|
|
final long diff = Math.round(1.0e-6 * (end - start));
|
|
sender.getBukkitEntity().sendMessage(text().color(DARK_AQUA).append(
|
|
- text("Relit ", BLUE), text(totalRelit),
|
|
- text(" chunks. Took ", BLUE), text(diff + "ms")
|
|
+ text("Relit ", DARK_AQUA), text(totalRelit, YELLOW),
|
|
+ text(" chunks. Took ", DARK_AQUA), text(diff + "ms", YELLOW)
|
|
));
|
|
if (done != null) {
|
|
done.run();
|