mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
support block state mutation of already placed block entity in BlockStateListPopulator
As seen in https://github.com/PaperMC/Paper/issues/12645, the BlockStateListPopulator always destroy block entity data when the block state change. However this is something that should be supported so plugin can retrieve block entity data of captured blocks. Additionally only create snapshots at the end of the capture so we don't need to refresh block entity data for decorator like the beehive, this is possible since multiple capture at the same position is not supported and will overwrite the previous data anyway.
This commit is contained in:
@@ -2352,10 +2352,10 @@ index f9c96bbdc54e68b9216b7f8662bfae03012d2866..34b7769663e235b93c6388ab0c92c00f
|
||||
@Override
|
||||
public void onCreated(Entity entity) {
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index b799d9cc54c45920a7c48d5302454c9cec3ab7c2..e4b9a564aad3d9b673808caa18265b06592ceab8 100644
|
||||
index f286dd9996590e5d448ca809c34b6f640203e274..c41df4b1fff1f65532256e835dc30fadbb4f8c8b 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -2100,6 +2100,17 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -2093,6 +2093,17 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user