diff options
author | Linnea Gräf <nea@nea.moe> | 2024-01-21 14:06:34 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-01-21 14:06:34 +0100 |
commit | 3e1f75e32253bca3312f478a60d315bec37bc112 (patch) | |
tree | 14260e41bd2d8669d6d3ffa9a9a30d1d9ee2fe6c /src/main/kotlin/moe/nea/firmament/features/inventory | |
parent | 18ebd21cb0f97dea8367e65002e0bf32e5c686e2 (diff) | |
download | firmament-3e1f75e32253bca3312f478a60d315bec37bc112.tar.gz firmament-3e1f75e32253bca3312f478a60d315bec37bc112.tar.bz2 firmament-3e1f75e32253bca3312f478a60d315bec37bc112.zip |
Bump to 1.20.4
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/inventory')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/VirtualInventory.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/VirtualInventory.kt b/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/VirtualInventory.kt index 3c7bedd..102b197 100644 --- a/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/VirtualInventory.kt +++ b/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/VirtualInventory.kt @@ -21,6 +21,7 @@ import net.minecraft.nbt.NbtIo import net.minecraft.nbt.NbtList import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream +import net.minecraft.nbt.NbtSizeTracker @Serializable(with = VirtualInventory.Serializer::class) data class VirtualInventory( @@ -41,7 +42,7 @@ data class VirtualInventory( override fun deserialize(decoder: Decoder): VirtualInventory { val s = decoder.decodeString() - val n = NbtIo.readCompressed(ByteArrayInputStream(s.decodeBase64Bytes())) + val n = NbtIo.readCompressed(ByteArrayInputStream(s.decodeBase64Bytes()), NbtSizeTracker.of(100_000_000)) val items = n.getList(INVENTORY, NbtCompound.COMPOUND_TYPE.toInt()) return VirtualInventory(items.map { ItemStack.fromNbt(it as NbtCompound) }) } |