Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 5762f11

Browse files
BillyGalbreathgranny
authored andcommitted
Log skipped entity's position
1 parent 231fdb5 commit 5762f11

2 files changed

Lines changed: 20 additions & 27 deletions

File tree

patches/server/0267-Log-skipped-entity-s-position.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

purpur-server/minecraft-patches/sources/net/minecraft/world/entity/EntityType.java.patch

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
public static ResourceLocation getKey(EntityType<?> entityType) {
1818
return BuiltInRegistries.ENTITY_TYPE.getKey(entityType);
1919
}
20-
@@ -1311,6 +_,16 @@
21-
public MobCategory getCategory() {
20+
@@ -1312,6 +_,16 @@
2221
return this.category;
2322
}
24-
+
23+
2524
+ // Purpur start - PlayerSetSpawnerTypeWithEggEvent
2625
+ public String getName() {
2726
+ return BuiltInRegistries.ENTITY_TYPE.getKey(this).getPath();
@@ -31,6 +30,23 @@
3130
+ return getDescription().getString();
3231
+ }
3332
+ // Purpur end - PlayerSetSpawnerTypeWithEggEvent
34-
33+
+
3534
public String getDescriptionId() {
3635
return this.descriptionId;
36+
}
37+
@@ -1370,7 +_,14 @@
38+
entity.load(tag);
39+
},
40+
// Paper end - Don't fire sync event during generation
41+
- () -> LOGGER.warn("Skipping Entity with id {}", tag.getString("id"))
42+
+ // Purpur start - log skipped entity's position
43+
+ () -> {LOGGER.warn("Skipping Entity with id {}", tag.getString("id"));
44+
+ try {
45+
+ ListTag pos = tag.getList("Pos", 6);
46+
+ EntityType.LOGGER.warn("Location: {} {},{},{}", level.getWorld().getName(), pos.getDouble(0), pos.getDouble(1), pos.getDouble(2));
47+
+ } catch (Throwable ignore) {}
48+
+ }
49+
+ // Purpur end - log skipped entity's position
50+
);
51+
}
52+

0 commit comments

Comments
 (0)