diff options
author | Xander de Keijzer <[email protected]> | 2023-10-10 22:24:35 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-10 22:24:35 +0200 |
commit | 72f7945e774906d9fb39acb26a377983d116a33a (patch) | |
tree | c6807a3baf9d05e06320fd60f6e726068fdbf4db | |
parent | e87240b6741483c3719b86afe51939e86a64a2fa (diff) | |
download | Paper-72f7945e774906d9fb39acb26a377983d116a33a.tar.gz Paper-72f7945e774906d9fb39acb26a377983d116a33a.zip |
Fix painting loosing art on face change (#9798)
-rw-r--r-- | patches/server/0894-Properly-resend-entities.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/patches/server/0894-Properly-resend-entities.patch b/patches/server/0894-Properly-resend-entities.patch index 766b75ba5e..09f2b948e9 100644 --- a/patches/server/0894-Properly-resend-entities.patch +++ b/patches/server/0894-Properly-resend-entities.patch @@ -121,3 +121,39 @@ index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a return Optional.of(InteractionResult.FAIL); } entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F); + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +index 315d8260e196709ed9084272aa640f11e327c0a8..f7ebddd35ff5a60a81034fd7de035ebba83e9517 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +@@ -1299,7 +1299,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { + return; + } + +- entityTracker.broadcast(this.getHandle().getAddEntityPacket()); ++ // Paper start, resend possibly desynced entity instead of add entity packet ++ for (ServerPlayerConnection playerConnection : entityTracker.seenBy) { ++ this.getHandle().getEntityData().resendPossiblyDesyncedEntity(playerConnection.getPlayer()); ++ } ++ // Paper end + } + + private static PermissibleBase getPermissibleBase() { +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +index 4dbe8af49fcb4d2c2f517083c013d83f64225b4b..58489a6a34e66cd6fc0d0e28141a3ebc32ac0e05 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +@@ -39,9 +39,11 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { + protected void update() { + super.update(); + ++ // Paper start, don't mark as dirty as this is handled in super.update() + // mark dirty, so that the client gets updated with item and rotation +- this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ITEM); +- this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ROTATION); ++ //this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ITEM); ++ //this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ROTATION); ++ // Paper end + + // update redstone + if (!this.getHandle().generation) { |