Fix crash when running outside dev

This commit is contained in:
embeddedt 2023-01-03 21:50:39 -05:00
parent 878d682eee
commit 80e273bf12
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -19,7 +19,7 @@ public class LevelSaveMixin implements ILevelSave {
@Shadow @Final private Path levelPath;
public void runWorldPersistenceHooks() {
SaveFormat saveFormat = ObfuscationReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getInstance(), "levelSource");
SaveFormat saveFormat = ObfuscationReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getInstance(), "field_71469_aa");
((SaveFormatAccessor)saveFormat).invokeReadLevelData(this.levelPath.toFile(), (file, dataFixer) -> {
try {
CompoundNBT compoundTag = CompressedStreamTools.readCompressed(file);