Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -6,20 +6,20 @@
+ // CraftBukkit start - add method from above
+ public <T> void markDirty(DataWatcherObject<T> datawatcherobject) {
+ this.b(datawatcherobject).a(true);
+ this.getItem(datawatcherobject).setDirty(true);
+ this.isDirty = true;
+ }
+ // CraftBukkit end
+
public boolean a() {
public boolean isDirty() {
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()));
if (!Objects.equals(datawatcher_item1.accessor.getSerializer(), datawatcher_item.accessor.getSerializer())) {
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.getId(), 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
- datawatcher_item.setValue(datawatcher_item1.getValue());
+ datawatcher_item.setValue((T) datawatcher_item1.getValue()); // CraftBukkit - decompile error
}
}