Fix crash when running outside dev
This commit is contained in:
parent
878d682eee
commit
80e273bf12
|
|
@ -19,7 +19,7 @@ public class LevelSaveMixin implements ILevelSave {
|
||||||
@Shadow @Final private Path levelPath;
|
@Shadow @Final private Path levelPath;
|
||||||
|
|
||||||
public void runWorldPersistenceHooks() {
|
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) -> {
|
((SaveFormatAccessor)saveFormat).invokeReadLevelData(this.levelPath.toFile(), (file, dataFixer) -> {
|
||||||
try {
|
try {
|
||||||
CompoundNBT compoundTag = CompressedStreamTools.readCompressed(file);
|
CompoundNBT compoundTag = CompressedStreamTools.readCompressed(file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user