From 6c20dcd953f86b5f774abf0857ce9ecf28b44618 Mon Sep 17 00:00:00 2001 From: IMS212 Date: Sat, 29 Jun 2024 07:11:07 -0700 Subject: [PATCH] Fix build on 1.20.1 --- .../iris/mixin/MixinLevelRenderer_SkipRendering.java | 4 ++-- .../java/net/irisshaders/iris/mixin/MixinQuickPlayDev.java | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/irisshaders/iris/mixin/MixinLevelRenderer_SkipRendering.java b/src/main/java/net/irisshaders/iris/mixin/MixinLevelRenderer_SkipRendering.java index 06ac72d386..aac1d5bb5a 100644 --- a/src/main/java/net/irisshaders/iris/mixin/MixinLevelRenderer_SkipRendering.java +++ b/src/main/java/net/irisshaders/iris/mixin/MixinLevelRenderer_SkipRendering.java @@ -65,8 +65,8 @@ private Iterable skipRenderEntities(ClientLevel instance, Operation skipLocalBlockEntities(LevelRenderer instance, Operation> original) { + @WrapOperation(method = "renderLevel", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/LevelRenderer;renderChunksInFrustum:Lit/unimi/dsi/fastutil/objects/ObjectArrayList;")) + private ObjectArrayList skipLocalBlockEntities(LevelRenderer instance, Operation> original) { if (Iris.getPipelineManager().getPipelineNullable() instanceof IrisRenderingPipeline pipeline && pipeline.skipAllRendering()) { return EMPTY_LIST; } else { diff --git a/src/main/java/net/irisshaders/iris/mixin/MixinQuickPlayDev.java b/src/main/java/net/irisshaders/iris/mixin/MixinQuickPlayDev.java index 761e7d394f..a46ee43271 100644 --- a/src/main/java/net/irisshaders/iris/mixin/MixinQuickPlayDev.java +++ b/src/main/java/net/irisshaders/iris/mixin/MixinQuickPlayDev.java @@ -3,10 +3,12 @@ import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.DisconnectedScreen; +import net.minecraft.client.gui.screens.GenericDirtMessageScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.TitleScreen; import net.minecraft.client.gui.screens.worldselection.SelectWorldScreen; import net.minecraft.client.quickplay.QuickPlay; +import net.minecraft.network.chat.Component; import net.minecraft.world.Difficulty; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GameType; @@ -28,9 +30,10 @@ public class MixinQuickPlayDev { if (!minecraft.getLevelSource().levelExists(string)) { minecraft.createWorldOpenFlows().createFreshLevel(string, new LevelSettings(string, GameType.CREATIVE, false, Difficulty.HARD, true, new GameRules(), WorldDataConfiguration.DEFAULT), - WorldOptions.defaultWithRandomSeed(), WorldPresets::createNormalWorldDimensions, Minecraft.getInstance().screen); + WorldOptions.defaultWithRandomSeed(), WorldPresets::createNormalWorldDimensions); } else { - minecraft.createWorldOpenFlows().checkForBackupAndLoad(string, () -> minecraft.setScreen(new TitleScreen())); + minecraft.forceSetScreen(new GenericDirtMessageScreen(Component.translatable("selectWorld.data_read"))); + minecraft.createWorldOpenFlows().loadLevel(new TitleScreen(), string); } } }