Prevent Block/Entity data side leak on integrated servers by copying custom data before writing. #8111

This commit is contained in:
OneLemonyBoi authored and GitHub committed 2021-10-04 12:40:58 -07:00
1 parent 79272361f0
commit b2cea78006
2 files changed
+2 -2

No files matched your search

@@ -151,7 +151,7 @@
+ CompoundTag caps = serializeCaps();
+ if (caps != null) p_20241_.m_128365_("ForgeCaps", caps);
+ if (persistentData != null) p_20241_.m_128365_("ForgeData", persistentData);
+ if (persistentData != null) p_20241_.m_128365_("ForgeData", persistentData.m_6426_());
+
this.m_7380_(p_20241_);
if (this.m_20160_()) {
@@ -37,7 +37,7 @@
p_58895_.m_128405_("x", this.f_58858_.m_123341_());
p_58895_.m_128405_("y", this.f_58858_.m_123342_());
p_58895_.m_128405_("z", this.f_58858_.m_123343_());
+ if (this.customTileData != null) p_58895_.m_128365_("ForgeData", this.customTileData);
+ if (this.customTileData != null) p_58895_.m_128365_("ForgeData", this.customTileData.m_6426_());
+ if (getCapabilities() != null) p_58895_.m_128365_("ForgeCaps", serializeCaps());
return p_58895_;
}