Log skipped entity's position

This commit is contained in:
BillyGalbreath
2025-01-12 17:00:01 -08:00
committed by granny
parent 231fdb5e15
commit 5762f11db9
2 changed files with 20 additions and 27 deletions

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Thu, 24 Nov 2022 11:00:37 -0600
Subject: [PATCH] Log skipped entity's position
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
index 20a7fe2995db717f394fc3041435a95dbfee2ff7..2203410d3eac6362e949315b0ec15c270bdb5cb8 100644
--- a/net/minecraft/world/entity/EntityType.java
+++ b/net/minecraft/world/entity/EntityType.java
@@ -692,6 +692,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
entity.load(nbt);
}, () -> {
EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
+ // Purpur start - log skipped entity's position
+ try {
+ ListTag pos = nbt.getList("Pos", 6);
+ EntityType.LOGGER.warn("Location: {} {},{},{}", world.getWorld().getName(), pos.getDouble(0), pos.getDouble(1), pos.getDouble(2));
+ } catch (Throwable ignore) {}
+ // Purpur end
});
}