From e5542cfdc32c0b0b53dd3df1dbf2d60597440105 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Sun, 12 Jan 2025 17:49:49 +0100 Subject: [PATCH] Hide unnecessary decorated pot data (#11957) Prevent decorated pots from sending their contents to clients as contents are not needed for rendering. --- .../entity/DecoratedPotBlockEntity.java.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch index 08a08744a..8fc38f243 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch @@ -49,3 +49,28 @@ public static final String TAG_SHERDS = "sherds"; public static final String TAG_ITEM = "item"; public static final int EVENT_POT_WOBBLES = 1; +@@ -41,8 +_,8 @@ + protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { + super.saveAdditional(tag, registries); + this.decorations.save(tag); +- if (!this.trySaveLootTable(tag) && !this.item.isEmpty()) { +- tag.put("item", this.item.save(registries)); ++ if (!this.trySaveLootTable(tag) && !this.item.isEmpty()) { // Paper - diff on change - hide unnecessary update data ++ tag.put("item", this.item.save(registries)); // Paper - diff on change - hide unnecessary update data + } + } + +@@ -66,7 +_,12 @@ + + @Override + public CompoundTag getUpdateTag(HolderLookup.Provider registries) { +- return this.saveCustomOnly(registries); ++ // Paper start - hide unnecessary update data ++ // Like chests, decorated pots should not allow clients to inspect their contents without breaking them. ++ final CompoundTag compoundTag = new CompoundTag(); ++ this.decorations.save(compoundTag); ++ return compoundTag; ++ // Paper end - hide unnecessary update data + } + + public Direction getDirection() {