mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7b3b593 [ci skip] Update checkout action in workflow (#8510) PaperMC/Paper@36869cc Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) PaperMC/Paper@2432233 Add allow server listing & text filtering client options (#7595) PaperMC/Paper@954e6f0 Fix a bunch more forceDrops for dropping items (#8095) PaperMC/Paper@32d95e9 Track projectile source for fireworks from dispensers (#8044) PaperMC/Paper@0249750 Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) PaperMC/Paper@8acb05d Make CommandSyntaxException implement ComponentMessageThrowable (#8513) PaperMC/Paper@c264018 [ci skip] Undo modification to removed patches in latest commit (#8512) PaperMC/Paper@304ab35 [ci skip] Remove old todo file PaperMC/Paper@8a4b752 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) PaperMC/Paper@b743144 Fix MC-147659 (#8423) PaperMC/Paper@aaf5e39 Deprecate unused VehicleEntityCollisionEvent methods (#8498)
36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <ben@omega24.dev>
|
|
Date: Wed, 13 Jul 2022 16:27:43 -0400
|
|
Subject: [PATCH] Send client custom name of BE
|
|
|
|
|
|
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 d3de829a4ab5f5a127fb026a8cb4ef4ed6b9c394..cb81086c8fe78321b157aa7d107f215c0d8fc410 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
|
|
@@ -206,10 +206,24 @@ public abstract class BlockEntity {
|
|
|
|
@Nullable
|
|
public Packet<ClientGamePacketListener> getUpdatePacket() {
|
|
+ // Purpur start
|
|
+ if (this instanceof net.minecraft.world.Nameable nameable && nameable.hasCustomName()) {
|
|
+ CompoundTag nbt = this.saveWithoutMetadata();
|
|
+ nbt.remove("Items");
|
|
+ return net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket.create(this, $ -> nbt);
|
|
+ }
|
|
+ // Purpur end
|
|
return null;
|
|
}
|
|
|
|
public CompoundTag getUpdateTag() {
|
|
+ // Purpur start
|
|
+ if (this instanceof net.minecraft.world.Nameable nameable && nameable.hasCustomName()) {
|
|
+ CompoundTag nbt = this.saveWithoutMetadata();
|
|
+ nbt.remove("Items");
|
|
+ return nbt;
|
|
+ }
|
|
+ // Purpur end
|
|
return new CompoundTag();
|
|
}
|
|
|