diff --git a/Spigot-Server-Patches/0463-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0463-Add-Raw-Byte-ItemStack-Serialization.patch index 558d620b5..2c9b37c18 100644 --- a/Spigot-Server-Patches/0463-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/Spigot-Server-Patches/0463-Add-Raw-Byte-ItemStack-Serialization.patch @@ -50,7 +50,7 @@ index 2322c0c8c5aacebb6317eab8ce4245554f6d9d55..3e6f878cdbbf5ebfa7fb390745ead135 DataOutputStream dataoutputstream = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(outputstream))); Throwable throwable = null; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 770375ed4207920e71d2d0799c611c4b3cdbe6f7..549ba4d8068763f41c2307a9c88f0b3f304b17e9 100644 +index 770375ed4207920e71d2d0799c611c4b3cdbe6f7..b58f2ef5ce5f3047bf8fcfc8d80a4aa9774ff711 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -313,6 +313,46 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -90,7 +90,7 @@ index 770375ed4207920e71d2d0799c611c4b3cdbe6f7..549ba4d8068763f41c2307a9c88f0b3f + int dataVersion = compound.getInt("DataVersion"); + + Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!"); -+ Dynamic converted = DataConverterRegistry.getDataFixer().update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, compound), -1, getDataVersion()); ++ Dynamic converted = DataConverterRegistry.getDataFixer().update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, compound), dataVersion, getDataVersion()); + return CraftItemStack.asCraftMirror(net.minecraft.server.ItemStack.fromCompound((NBTTagCompound) converted.getValue())); + } catch (IOException ex) { + com.destroystokyo.paper.util.SneakyThrow.sneaky(ex);