diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/network/syncher/SynchedEntityData.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/network/syncher/SynchedEntityData.java.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/network/syncher/SynchedEntityData.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/network/syncher/SynchedEntityData.java.patch new file mode 100644 index 0000000000..319a688f64 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/network/syncher/SynchedEntityData.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/network/syncher/SynchedEntityData.java ++++ b/net/minecraft/network/syncher/SynchedEntityData.java +@@ -146,6 +148,13 @@ + + } + ++ // CraftBukkit start - add method from above ++ public <T> void markDirty(EntityDataAccessor<T> datawatcherobject) { ++ this.getItem(datawatcherobject).setDirty(true); ++ this.isDirty = true; ++ } ++ // CraftBukkit end ++ + public boolean isDirty() { + return this.isDirty; + } +@@ -235,6 +244,18 @@ + return this.itemsById.isEmpty(); + } + ++ // CraftBukkit start ++ public void refresh(ServerPlayer to) { ++ if (!this.isEmpty()) { ++ List<SynchedEntityData.DataValue<?>> list = this.getNonDefaultValues(); ++ ++ if (list != null) { ++ to.connection.send(new ClientboundSetEntityDataPacket(this.entity.getId(), list)); ++ } ++ } ++ } ++ // CraftBukkit end ++ + public static class DataItem<T> { + + final EntityDataAccessor<T> accessor; |