diff --git a/README.md b/README.md index 5f92c9be..445f65d8 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,4 @@ Thanks to these projects below. Leaf just mix some of their patches together. If - [Carpet Fixes](https://github.com/fxmorin/carpet-fixes) - [VMP](https://github.com/RelativityMC/VMP-fabric) - [Slice](https://github.com/Cryptite/Slice) +- [Parchment](https://github.com/ProjectEdenGG/Parchment) diff --git a/patches/server/0037-Parchment-Make-FixLight-use-action-bar.patch b/patches/server/0037-Parchment-Make-FixLight-use-action-bar.patch new file mode 100644 index 00000000..0cf90485 --- /dev/null +++ b/patches/server/0037-Parchment-Make-FixLight-use-action-bar.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Blast-MC +Date: Thu, 25 Aug 2022 20:32:01 -0400 +Subject: [PATCH] Parchment: Make FixLight use action bar + +Original license: GPLv3 +Original project: https://github.com/ProjectEdenGG/Parchment + +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 0f180d11774f6dec2667b3a3f6a63d1127bac869..246c87d4d9b0e9acaee30da3a0008ffb3070faa1 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) (carpetfixes.helpers.FastMath.round(100.0 * (double) (relitChunks[0]) / (double) pending[0])) + "%") // Mirai ++ 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) (carpetfixes.helpers.FastMath.round(100.0 * (double) (relitChunks[0]) / (double) pending[0])) + "%)", YELLOW) + )); + }, + (final int totalRelit) -> { + final long end = System.nanoTime(); + final long diff = carpetfixes.helpers.FastMath.round(1.0e-6 * (end - start)); // Mirai + 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();