23w42a
This commit is contained in:
parent
cc54b6d67d
commit
231c3f41e5
|
|
@ -5,6 +5,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
|
||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.core.HolderGetter;
|
import net.minecraft.core.HolderGetter;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.nbt.NbtAccounter;
|
||||||
import net.minecraft.nbt.NbtIo;
|
import net.minecraft.nbt.NbtIo;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.util.datafix.DataFixTypes;
|
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 {
|
public static CompoundTag readStructureTag(ResourceLocation location, DataFixer datafixer, InputStream stream) throws IOException {
|
||||||
byte[] structureBytes = toBytes(stream);
|
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)) {
|
if (!currentTag.contains("DataVersion", 99)) {
|
||||||
currentTag.putInt("DataVersion", 500);
|
currentTag.putInt("DataVersion", 500);
|
||||||
}
|
}
|
||||||
|
|
@ -101,7 +102,7 @@ public class CachingStructureManager {
|
||||||
private static synchronized CompoundTag getCachedUpgraded(ResourceLocation location, String hash) {
|
private static synchronized CompoundTag getCachedUpgraded(ResourceLocation location, String hash) {
|
||||||
File theFile = getCachePath(location, hash);
|
File theFile = getCachePath(location, hash);
|
||||||
try {
|
try {
|
||||||
return NbtIo.readCompressed(theFile);
|
return NbtIo.readCompressed(theFile, NbtAccounter.unlimitedHeap());
|
||||||
} catch(FileNotFoundException e) {
|
} catch(FileNotFoundException e) {
|
||||||
return null;
|
return null;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ junit_version=5.10.0-M1
|
||||||
mixinextras_version=0.2.0-beta.9
|
mixinextras_version=0.2.0-beta.9
|
||||||
|
|
||||||
mod_id=modernfix
|
mod_id=modernfix
|
||||||
minecraft_version=1.20.2
|
minecraft_version=23w42a
|
||||||
enabled_platforms=fabric
|
enabled_platforms=fabric
|
||||||
forge_version=1.20.1-47.1.3
|
forge_version=1.20.1-47.1.3
|
||||||
# parchment_version=2023.07.09
|
# parchment_version=2023.07.09
|
||||||
|
|
@ -15,10 +15,10 @@ rei_version=11.0.597
|
||||||
ctm_version=1.20.1-1.1.8+4
|
ctm_version=1.20.1-1.1.8+4
|
||||||
kubejs_version=1902.6.0-build.142
|
kubejs_version=1902.6.0-build.142
|
||||||
rhino_version=1902.2.2-build.268
|
rhino_version=1902.2.2-build.268
|
||||||
supported_minecraft_versions=1.20.2
|
supported_minecraft_versions=23w42a
|
||||||
|
|
||||||
fabric_loader_version=0.14.22
|
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
|
continuity_version=3.0.0-beta.2+1.19.3
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user