From 231c3f41e59b29ffc59198dbe74508b2672a00d5 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:45:34 -0400 Subject: [PATCH] 23w42a --- .../modernfix/structure/CachingStructureManager.java | 5 +++-- gradle.properties | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/org/embeddedt/modernfix/structure/CachingStructureManager.java b/common/src/main/java/org/embeddedt/modernfix/structure/CachingStructureManager.java index 3b1c2101..d2982686 100644 --- a/common/src/main/java/org/embeddedt/modernfix/structure/CachingStructureManager.java +++ b/common/src/main/java/org/embeddedt/modernfix/structure/CachingStructureManager.java @@ -5,6 +5,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import net.minecraft.SharedConstants; import net.minecraft.core.HolderGetter; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtAccounter; import net.minecraft.nbt.NbtIo; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.datafix.DataFixTypes; @@ -58,7 +59,7 @@ public class CachingStructureManager { public static CompoundTag readStructureTag(ResourceLocation location, DataFixer datafixer, InputStream stream) throws IOException { byte[] structureBytes = toBytes(stream); - CompoundTag currentTag = NbtIo.readCompressed(new ByteArrayInputStream(structureBytes)); + CompoundTag currentTag = NbtIo.readCompressed(new ByteArrayInputStream(structureBytes), NbtAccounter.unlimitedHeap()); if (!currentTag.contains("DataVersion", 99)) { currentTag.putInt("DataVersion", 500); } @@ -101,7 +102,7 @@ public class CachingStructureManager { private static synchronized CompoundTag getCachedUpgraded(ResourceLocation location, String hash) { File theFile = getCachePath(location, hash); try { - return NbtIo.readCompressed(theFile); + return NbtIo.readCompressed(theFile, NbtAccounter.unlimitedHeap()); } catch(FileNotFoundException e) { return null; } catch(IOException e) { diff --git a/gradle.properties b/gradle.properties index 25d70633..0d6bea8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ junit_version=5.10.0-M1 mixinextras_version=0.2.0-beta.9 mod_id=modernfix -minecraft_version=1.20.2 +minecraft_version=23w42a enabled_platforms=fabric forge_version=1.20.1-47.1.3 # parchment_version=2023.07.09 @@ -15,10 +15,10 @@ rei_version=11.0.597 ctm_version=1.20.1-1.1.8+4 kubejs_version=1902.6.0-build.142 rhino_version=1902.2.2-build.268 -supported_minecraft_versions=1.20.2 +supported_minecraft_versions=23w42a fabric_loader_version=0.14.22 -fabric_api_version=0.89.2+1.20.2 +fabric_api_version=0.90.3+1.20.3 continuity_version=3.0.0-beta.2+1.19.3