This commit is contained in:
embeddedt 2023-11-02 13:34:15 -04:00
parent 181be3cf80
commit 915de8187e
2 changed files with 7 additions and 7 deletions

View File

@ -101,8 +101,8 @@ public class CachingStructureManager {
private static synchronized CompoundTag getCachedUpgraded(ResourceLocation location, String hash) {
File theFile = getCachePath(location, hash);
try {
return NbtIo.readCompressed(theFile, NbtAccounter.unlimitedHeap());
try(FileInputStream stream = new FileInputStream(theFile)) {
return NbtIo.readCompressed(stream, NbtAccounter.unlimitedHeap());
} catch(FileNotFoundException e) {
return null;
} catch(IOException e) {
@ -113,8 +113,8 @@ public class CachingStructureManager {
private static synchronized void saveCachedUpgraded(ResourceLocation location, String hash, CompoundTag tagToSave) {
File theFile = getCachePath(location, truncateHash(hash));
try {
NbtIo.writeCompressed(tagToSave, theFile);
try(FileOutputStream stream = new FileOutputStream(theFile)) {
NbtIo.writeCompressed(tagToSave, stream);
} catch(IOException e) {
e.printStackTrace();
}

View File

@ -5,7 +5,7 @@ junit_version=5.10.0-M1
mixinextras_version=0.2.0-beta.9
mod_id=modernfix
minecraft_version=23w43a
minecraft_version=23w44a
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=23w43a
supported_minecraft_versions=23w44a
fabric_loader_version=0.14.22
fabric_api_version=0.90.5+1.20.3
fabric_api_version=0.90.6+1.20.3
continuity_version=3.0.0-beta.2+1.19.3