56 lines
4.0 KiB
Diff
56 lines
4.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Simon Gardling <titaniumtown@gmail.com>
|
|
Date: Sun, 26 Dec 2021 15:48:14 -0500
|
|
Subject: [PATCH] Remove unnecessary getLogger()
|
|
|
|
Based off of a Patina Patch: https://github.com/PatinaMC/Patina/blob/921d83ac9506b6364ebac2ec57332da4fd8e6ada/patches/server/0023-Remove-unnecessary-LogManager.getLogger.patch
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 05e521c01a62e800f177cb586609d7a3a51dacc6..5209e0d076099516525f578ddbfe14064e67f235 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -163,7 +163,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
|
@Override
|
|
public synchronized void setSeed(long seed) {
|
|
if (locked) {
|
|
- LogManager.getLogger().error("Ignoring setSeed on Entity.SHARED_RANDOM", new Throwable());
|
|
+ LOGGER.error("Ignoring setSeed on Entity.SHARED_RANDOM", new Throwable()); // JettPack
|
|
} else {
|
|
super.setSeed(seed);
|
|
locked = true;
|
|
@@ -2340,7 +2340,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
|
try {
|
|
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.valueOf(spawnReasonName);
|
|
} catch (Exception ignored) {
|
|
- LogManager.getLogger().error("Unknown SpawnReason " + spawnReasonName + " for " + this);
|
|
+ LOGGER.error("Unknown SpawnReason " + spawnReasonName + " for " + this); // JettPack
|
|
}
|
|
}
|
|
if (spawnReason == null) {
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
|
index 5aeaaae6f15050a2da271fe196d0a234ecafc8a1..ce5b42bcc68e0409c016ef2eae0daed95aa889c5 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
|
@@ -322,7 +322,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
|
public abstract void removeBlockEntity(BlockPos pos);
|
|
|
|
public void markPosForPostprocessing(BlockPos pos) {
|
|
- LogManager.getLogger().warn("Trying to mark a block for PostProcessing @ {}, but this operation is not supported.", pos);
|
|
+ LOGGER.warn("Trying to mark a block for PostProcessing @ {}, but this operation is not supported.", pos); // JettPack
|
|
}
|
|
|
|
public ShortList[] getPostProcessing() {
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
index bffb2915d84be3a1b642788e21c803b54b2db6ea..536ed91c6c5368314dd3efb86b1341113eb1316d 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
@@ -113,7 +113,7 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
// Paper start
|
|
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
|
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
|
+ net.minecraft.server.MinecraftServer.LOGGER.fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // JettPack
|
|
}
|
|
|
|
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|