Allow dimensions to be removed

Fixes https://github.com/neoforged/NeoForge/issues/102
This commit is contained in:
embeddedt 2023-10-31 09:50:01 -04:00
parent b6a47da3b0
commit 482c0ca503

View File

@ -0,0 +1,14 @@
package org.embeddedt.modernfix.forge.mixin.bugfix.removed_dimensions;
import net.minecraft.world.level.storage.LevelStorageSource;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(LevelStorageSource.class)
public class LevelStorageSourceMixin {
@ModifyArg(method = "*", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/DataResult;getOrThrow(ZLjava/util/function/Consumer;)Ljava/lang/Object;", ordinal = 0), index = 0)
private static boolean alwaysAllowPartialDimensions(boolean flag) {
return true;
}
}