geforkt von Mirrors/Paper
Add option for logging named entity deaths (#6107)
Dieser Commit ist enthalten in:
Ursprung
6a93c5c949
Commit
fa7bf2d3dc
35
patches/server/Config-option-for-named-entity-death-logging.patch
Normale Datei
35
patches/server/Config-option-for-named-entity-death-logging.patch
Normale Datei
@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Malfrador <malfrador@gmail.com>
|
||||||
|
Date: Wed, 7 Jul 2021 12:48:50 +0200
|
||||||
|
Subject: [PATCH] Config option for named entity death logging
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
|
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||||
|
deobfuscateStacktraces = getBoolean("settings.loggers.deobfuscate-stacktraces", deobfuscateStacktraces);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static boolean logNamedEntityDeaths = true;
|
||||||
|
+ private static void namedEntityDeaths() {
|
||||||
|
+ logNamedEntityDeaths = getBoolean("settings.log-named-entity-deaths", logNamedEntityDeaths);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public static int itemValidationDisplayNameLength = 8192;
|
||||||
|
public static int itemValidationLocNameLength = 8192;
|
||||||
|
public static int itemValidationLoreLineLength = 8192;
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||||
|
this.stopSleeping();
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!this.level.isClientSide && this.hasCustomName()) {
|
||||||
|
+ if (com.destroystokyo.paper.PaperConfig.logNamedEntityDeaths && !this.level.isClientSide && this.hasCustomName()) { // Paper - add setting for entity death logging
|
||||||
|
LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString());
|
||||||
|
}
|
||||||
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren