Paper/nms-patches/DataWatcher.patch
2018-07-15 10:00:00 +10:00

35 lines
1.0 KiB
Diff

--- a/net/minecraft/server/DataWatcher.java
+++ b/net/minecraft/server/DataWatcher.java
@@ -70,7 +70,7 @@
}
}
- public <T> void register(DataWatcherObject<T> datawatcherobject, T t0) {
+ public <T> void register(DataWatcherObject<T> datawatcherobject, Object t0) { // CraftBukkit T -> Object
int i = datawatcherobject.a();
if (i > 254) {
@@ -84,7 +84,7 @@
}
}
- private <T> void registerObject(DataWatcherObject<T> datawatcherobject, T t0) {
+ private <T> void registerObject(DataWatcherObject<T> datawatcherobject, Object t0) { // CraftBukkit Object
DataWatcher.Item datawatcher_item = new DataWatcher.Item(datawatcherobject, t0);
this.e.writeLock().lock();
@@ -128,6 +128,13 @@
}
+ // CraftBukkit start - add method from above
+ public <T> void markDirty(DataWatcherObject<T> datawatcherobject) {
+ this.b(datawatcherobject).a(true);
+ this.g = true;
+ }
+ // CraftBukkit end
+
public boolean a() {
return this.g;
}