SPIGOT-4166: Fix Tags being corrupted by early access (and not reflecting reloads)
By: md_5 <git@md-5.net>
This commit is contained in:
14
paper-server/nms-patches/TagRegistry.patch
Normal file
14
paper-server/nms-patches/TagRegistry.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/server/TagRegistry.java
|
||||
+++ b/net/minecraft/server/TagRegistry.java
|
||||
@@ -38,6 +38,11 @@
|
||||
TagsBlock.a((Tags) this.a);
|
||||
TagsItem.a((Tags) this.b);
|
||||
TagsFluid.a((Tags) this.c);
|
||||
+ // CraftBukkit start
|
||||
+ this.a.version++;
|
||||
+ this.b.version++;
|
||||
+ this.c.version++;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) {
|
||||
28
paper-server/nms-patches/TagsServer.patch
Normal file
28
paper-server/nms-patches/TagsServer.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/server/TagsServer.java
|
||||
+++ b/net/minecraft/server/TagsServer.java
|
||||
@@ -11,6 +11,7 @@
|
||||
public class TagsServer<T> extends Tags<T> {
|
||||
|
||||
private final RegistryMaterials<MinecraftKey, T> a;
|
||||
+ public int version; // CraftBukkit
|
||||
|
||||
public TagsServer(RegistryMaterials<MinecraftKey, T> registrymaterials, String s, String s1) {
|
||||
super(registrymaterials::d, registrymaterials::get, s, false, s1);
|
||||
@@ -31,7 +32,7 @@
|
||||
while (iterator1.hasNext()) {
|
||||
Object object = iterator1.next();
|
||||
|
||||
- packetdataserializer.d(this.a.a(object));
|
||||
+ packetdataserializer.d(this.a.a((T) object)); // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +50,7 @@
|
||||
arraylist.add(this.a.getId(packetdataserializer.g()));
|
||||
}
|
||||
|
||||
- this.c().put(minecraftkey, Tag.a.a().a((Collection) arraylist).b(minecraftkey));
|
||||
+ this.c().put(minecraftkey, (Tag<T>) Tag.a.a().a((Collection) arraylist).b(minecraftkey)); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user