From daf31133b56030cb5d117992d386f83a05e72f12 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 18 Nov 2024 13:06:15 +0100 Subject: [PATCH] Make logs less annoying --- patches/server/0009-MC-Utils.patch | 8 ++++---- .../server/1037-Rewrite-dataconverter-system.patch | 6 +++--- .../1038-Moonrise-optimisation-patches.patch | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index f8a3cdbd39..4f57aa7015 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -3915,7 +3915,7 @@ index 0000000000000000000000000000000000000000..97848869df61648fc415e4d39f409f43 +} diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java b/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java new file mode 100644 -index 0000000000000000000000000000000000000000..c125c70a68130be373acc989053a6c0e487be924 +index 0000000000000000000000000000000000000000..632920e04686d8a0fd0a60e87348be1fe7862a3c --- /dev/null +++ b/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java @@ -0,0 +1,101 @@ @@ -3923,15 +3923,15 @@ index 0000000000000000000000000000000000000000..c125c70a68130be373acc989053a6c0e + +import ca.spottedleaf.concurrentutil.executor.thread.PrioritisedThreadPool; +import ca.spottedleaf.moonrise.common.PlatformHooks; ++import com.mojang.logging.LogUtils; +import org.slf4j.Logger; -+import org.slf4j.LoggerFactory; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; + +public final class MoonriseCommon { + -+ private static final Logger LOGGER = LoggerFactory.getLogger(MoonriseCommon.class); ++ private static final Logger LOGGER = LogUtils.getClassLogger(); + + public static final PrioritisedThreadPool WORKER_POOL = new PrioritisedThreadPool( + new Consumer<>() { @@ -5529,7 +5529,7 @@ index f6a3606b972064c4ec78487374e6197c0c447e27..c6ded1ac73ddbc0336000f77c0f99fa2 public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules()))); // Paper - create paper world configs diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0c211366be68e33b24da2b055142626968ed6b0b..32e7c6e6f09e53fe8b5ade22dad8142cd09e0163 100644 +index fd97a0e54ad8487b0c6f242fcb626f0b76f88274..785c7e11f92610be58b624d252d1858658496af7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -309,6 +309,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { diff --git a/patches/server/1037-Rewrite-dataconverter-system.patch b/patches/server/1037-Rewrite-dataconverter-system.patch index e452b9f771..71437e89b2 100644 --- a/patches/server/1037-Rewrite-dataconverter-system.patch +++ b/patches/server/1037-Rewrite-dataconverter-system.patch @@ -9339,7 +9339,7 @@ index 0000000000000000000000000000000000000000..075574f33476882ddc6787e3b8bac864 +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java new file mode 100644 -index 0000000000000000000000000000000000000000..11f5081f0cfb6f0f16689c68836b1f2962a0321c +index 0000000000000000000000000000000000000000..d4d41add3566a0e377fa41eb6d40004b05e2cbbc --- /dev/null +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java @@ -0,0 +1,325 @@ @@ -9352,7 +9352,7 @@ index 0000000000000000000000000000000000000000..11f5081f0cfb6f0f16689c68836b1f29 + +public final class MCTypeRegistry { + -+ private static final Logger LOGGER = LogUtils.getLogger(); ++ private static final Logger LOGGER = LogUtils.getClassLogger(); + + public static final MCDataType LEVEL = new MCDataType("Level"); + public static final MCDataType PLAYER = new MCDataType("Player"); @@ -30384,7 +30384,7 @@ index b54a3741cd3ba615c83c98985cb4b3c4c586ed7a..b148cf247acdd36f856d0495cde4cc5a return nbttagcompound; }); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 08d48cd55cfaf92530cc900f2f119ae3a258eb39..d8d04183fd8bb0bcf2f703ef65b11dbd342473ba 100644 +index 29d5fa49730d2161bb1b024995a533a08c57939b..83020837e29ee627b1081daddb4bdee147b95af3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -523,7 +523,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/1038-Moonrise-optimisation-patches.patch b/patches/server/1038-Moonrise-optimisation-patches.patch index 38803e3d68..09ebd46947 100644 --- a/patches/server/1038-Moonrise-optimisation-patches.patch +++ b/patches/server/1038-Moonrise-optimisation-patches.patch @@ -6785,7 +6785,7 @@ index 0000000000000000000000000000000000000000..7eafc5b7cba23d8dec92ecc1050afe3f \ No newline at end of file diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java new file mode 100644 -index 0000000000000000000000000000000000000000..a0e5fc2eff605e17704f0726d20e79cbb3d88d6d +index 0000000000000000000000000000000000000000..91a6f57f35fc1553159cca138a0619e703b2b014 --- /dev/null +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java @@ -0,0 +1,1455 @@ @@ -6811,6 +6811,7 @@ index 0000000000000000000000000000000000000000..a0e5fc2eff605e17704f0726d20e79cb +import ca.spottedleaf.moonrise.patches.chunk_system.util.ChunkSystemSortedArraySet; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; ++import com.mojang.logging.LogUtils; +import it.unimi.dsi.fastutil.longs.Long2ByteLinkedOpenHashMap; +import it.unimi.dsi.fastutil.longs.Long2ByteMap; +import it.unimi.dsi.fastutil.longs.Long2IntMap; @@ -6832,7 +6833,6 @@ index 0000000000000000000000000000000000000000..a0e5fc2eff605e17704f0726d20e79cb +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.LevelChunk; +import org.slf4j.Logger; -+import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.text.DecimalFormat; +import java.util.ArrayDeque; @@ -6850,7 +6850,7 @@ index 0000000000000000000000000000000000000000..a0e5fc2eff605e17704f0726d20e79cb + +public final class ChunkHolderManager { + -+ private static final Logger LOGGER = LoggerFactory.getLogger(ChunkHolderManager.class); ++ private static final Logger LOGGER = LogUtils.getClassLogger(); + + public static final int FULL_LOADED_TICKET_LEVEL = ChunkLevel.FULL_CHUNK_LEVEL; + public static final int BLOCK_TICKING_TICKET_LEVEL = ChunkLevel.BLOCK_TICKING_LEVEL; @@ -8246,7 +8246,7 @@ index 0000000000000000000000000000000000000000..a0e5fc2eff605e17704f0726d20e79cb +} diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java new file mode 100644 -index 0000000000000000000000000000000000000000..f3c453773e0413276935ca653b60bbe64fa4b169 +index 0000000000000000000000000000000000000000..877e48375ac987169011051108c6c5102f8c0590 --- /dev/null +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java @@ -0,0 +1,1036 @@ @@ -8277,6 +8277,7 @@ index 0000000000000000000000000000000000000000..f3c453773e0413276935ca653b60bbe6 +import ca.spottedleaf.moonrise.patches.chunk_system.util.ParallelSearchRadiusIteration; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; ++import com.mojang.logging.LogUtils; +import net.minecraft.CrashReport; +import net.minecraft.CrashReportCategory; +import net.minecraft.ReportedException; @@ -8299,7 +8300,6 @@ index 0000000000000000000000000000000000000000..f3c453773e0413276935ca653b60bbe6 +import net.minecraft.world.level.chunk.status.ChunkStep; +import net.minecraft.world.phys.Vec3; +import org.slf4j.Logger; -+import org.slf4j.LoggerFactory; +import java.io.File; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; @@ -8315,7 +8315,7 @@ index 0000000000000000000000000000000000000000..f3c453773e0413276935ca653b60bbe6 + +public final class ChunkTaskScheduler { + -+ private static final Logger LOGGER = LoggerFactory.getLogger(ChunkTaskScheduler.class); ++ private static final Logger LOGGER = LogUtils.getClassLogger(); + + public static void init(final boolean useParallelGen) { + for (final PrioritisedThreadPool.ExecutorGroup.ThreadPoolExecutor executor : MoonriseCommon.RADIUS_AWARE_GROUP.getAllExecutors()) { @@ -27556,7 +27556,7 @@ index 32f8186b1502b481c1100f7fdba0339ae3dd34fa..70efc63102b3d3727be376d42f1bef70 return crashreportsystemdetails; } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e2527f3e2b96df539c765ae23c83a09d3298d430..8ceeebb561046933cba0725e15732fa074226884 100644 +index 08a82b7a3456f58b3d0fdbb8e8dbce6972ad1672..dda53c52fab7c02f39451335fe0bfe36852ac994 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -218,7 +218,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;