geforkt von Mirrors/Paper
b3a8254758
By: md_5 <git@md-5.net>
26 Zeilen
1.0 KiB
Diff
26 Zeilen
1.0 KiB
Diff
--- a/net/minecraft/network/syncher/DataWatcher.java
|
|
+++ b/net/minecraft/network/syncher/DataWatcher.java
|
|
@@ -141,6 +141,13 @@
|
|
|
|
}
|
|
|
|
+ // CraftBukkit start - add method from above
|
|
+ public <T> void markDirty(DataWatcherObject<T> datawatcherobject) {
|
|
+ this.b(datawatcherobject).a(true);
|
|
+ this.isDirty = true;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public boolean a() {
|
|
return this.isDirty;
|
|
}
|
|
@@ -273,7 +280,7 @@
|
|
if (!Objects.equals(datawatcher_item1.accessor.b(), datawatcher_item.accessor.b())) {
|
|
throw new IllegalStateException(String.format("Invalid entity data item type for field %d on entity %s: old=%s(%s), new=%s(%s)", datawatcher_item.accessor.a(), this.entity, datawatcher_item.value, datawatcher_item.value.getClass(), datawatcher_item1.value, datawatcher_item1.value.getClass()));
|
|
} else {
|
|
- datawatcher_item.a(datawatcher_item1.b());
|
|
+ datawatcher_item.a((T) datawatcher_item1.b()); // CraftBukkit - decompile error
|
|
}
|
|
}
|
|
|