diff options
author | Nassim Jahnke <[email protected]> | 2024-01-23 18:01:39 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-01-23 18:06:51 +0100 |
commit | c57d1aa24560ec71331e685e9fd27aa3d9274f69 (patch) | |
tree | b585b2246be85ecc5047b02b704c0a5f59c96dd9 /patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch | |
parent | e66037960b02c7b22bbed75318904c55a4177977 (diff) | |
download | Paper-c57d1aa24560ec71331e685e9fd27aa3d9274f69.tar.gz Paper-c57d1aa24560ec71331e685e9fd27aa3d9274f69.zip |
Move diffs around to compile without later ones applied
Diffstat (limited to 'patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch')
-rw-r--r-- | patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch new file mode 100644 index 0000000000..b80d8e811d --- /dev/null +++ b/patches/server/0965-Broadcast-take-item-packets-with-collector-as-source.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: booky10 <[email protected]> +Date: Sun, 29 Oct 2023 02:36:10 +0100 +Subject: [PATCH] Broadcast take item packets with collector as source + +This fixes players (which can't view the collector) seeing item pickups with themselves as the target. + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index f6592d997a4cfd9d3ca86cd955e3de0a49743bfa..f6eda18a0bcc398538c76bf4ca7c2a611523aa5d 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -3703,7 +3703,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + + public void take(Entity item, int count) { + if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) { +- ((ServerLevel) this.level()).getChunkSource().broadcast(item, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); ++ ((ServerLevel) this.level()).getChunkSource().broadcastAndSend(this, new ClientboundTakeItemEntityPacket(item.getId(), this.getId(), count)); // Paper - broadcast with collector as source + } + + } |