From 1cfe913c930261525354436400dcf8816e52358d Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 23 Feb 2024 23:13:37 +0100 Subject: [PATCH] Fix spawnreason saving --- patches/server/Entity-getEntitySpawnReason.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/patches/server/Entity-getEntitySpawnReason.patch b/patches/server/Entity-getEntitySpawnReason.patch index 00e631591e..6ea9bc5b1a 100644 --- a/patches/server/Entity-getEntitySpawnReason.patch +++ b/patches/server/Entity-getEntitySpawnReason.patch @@ -70,6 +70,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; +@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S + } + nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); + } ++ if (spawnReason != null) { ++ nbttagcompound.putString("Paper.SpawnReason", spawnReason.name()); ++ } + // Save entity's from mob spawner status + if (spawnedViaMobSpawner) { + nbttagcompound.putBoolean("Paper.FromMobSpawner", true); @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S }