PaperMC/nms-patches/DataWatcher.patch

35 lines
1 KiB
Diff
Raw Normal View History

2016-02-29 22:32:46 +01:00
--- a/net/minecraft/server/DataWatcher.java
+++ b/net/minecraft/server/DataWatcher.java
2016-06-25 03:54:17 +02:00
@@ -70,7 +70,7 @@
2016-02-29 22:32:46 +01:00
}
}
- 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) {
2016-06-25 03:54:17 +02:00
@@ -84,7 +84,7 @@
2016-02-29 22:32:46 +01:00
}
}
- 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);
2016-06-25 03:54:17 +02:00
this.e.writeLock().lock();
2018-07-15 02:00:00 +02:00
@@ -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;
}