Fix spawnreason saving
This commit is contained in:
parent
d0ebfbbd15
commit
681bbff110
25 changed files with 79 additions and 69 deletions
|
@ -59,7 +59,7 @@ index 28b81e29be07902ad4d04aeb18bffd49757c3029..bc440f9a239d3935bf6837edf815d4fd
|
|||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cb453b843ecf82454a8ade369d424d5e7bbda4c4..dbca4d858dd3074fc0664bb6b578e94eeeed1298 100644
|
||||
index cb453b843ecf82454a8ade369d424d5e7bbda4c4..92521a46de31b13812d82a844ddc178df2b34919 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -70,7 +70,17 @@ index cb453b843ecf82454a8ade369d424d5e7bbda4c4..dbca4d858dd3074fc0664bb6b578e94e
|
|||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
@@ -2324,6 +2325,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2178,6 +2179,9 @@ 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);
|
||||
@@ -2324,6 +2328,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue