aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
diff options
context:
space:
mode:
authorNoah van der Aa <[email protected]>2024-04-30 00:16:07 +0200
committerGitHub <[email protected]>2024-04-30 00:16:07 +0200
commit44ee092878a4a561fd565aa72cb5f2006ee64701 (patch)
tree9c205d66741f572049804538f54837ddb4b1d4d5 /patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
parentfbe3c006751aff00e2940a1e9b99bbf15c2f2a37 (diff)
downloadPaper-44ee092878a4a561fd565aa72cb5f2006ee64701.tar.gz
Paper-44ee092878a4a561fd565aa72cb5f2006ee64701.zip
1.20.6 (#10623)
Diffstat (limited to 'patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch')
-rw-r--r--patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
index 79bacba95c..4e53e16b15 100644
--- a/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
+++ b/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
@@ -5,15 +5,15 @@ Subject: [PATCH] Sanitize sent BlockEntity NBT
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
-index 1970c0fa24764f6bbd0cc360b7d32d7906eaf808..db03254682b827d650160d6f2c1a18cf12c861d7 100644
+index 4f3ba61f13dbe5773034a19e749b7c4f5dc3d291..5d3e739d28d394ed59fe0003245cc55ac62e6087 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
-@@ -23,7 +23,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
- public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, BiFunction<BlockEntity, RegistryAccess, CompoundTag> nbtGetter) {
- RegistryAccess iregistrycustom = blockEntity.getLevel().registryAccess();
+@@ -29,7 +29,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
-- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), (CompoundTag) nbtGetter.apply(blockEntity, iregistrycustom));
-+ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), (CompoundTag) blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity, iregistrycustom))); // Paper - Sanitize sent data
+ public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, BiFunction<BlockEntity, RegistryAccess, CompoundTag> nbtGetter) {
+ RegistryAccess registryAccess = blockEntity.getLevel().registryAccess();
+- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), nbtGetter.apply(blockEntity, registryAccess));
++ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity, registryAccess))); // Paper - Sanitize sent data
}
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) {
@@ -30,10 +30,10 @@ index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index df945a152747bea0452ec18c09d59598903aa91f..a7dfad2696e7145af1355a5db132af14d09a6f30 100644
+index 978125c69b2a9ea465595c7eef10a1aea7ccf26c..30a75492a4b25450c194b4cc44deb665711db5af 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -357,6 +357,14 @@ public abstract class BlockEntity {
+@@ -368,6 +368,14 @@ public abstract class BlockEntity {
}
// CraftBukkit end