Skip to content

Commit b8e8cd3

Browse files
committed
Cancel drawing on GuiOldSaveLoadConfirm
1 parent 016c36c commit b8e8cd3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ show_testing_output = false
1818

1919
# Mod Information
2020
# HIGHLY RECOMMEND complying with SemVer for mod_version: https://semver.org/
21-
mod_version = 1.0.1
21+
mod_version = 1.0.2
2222
root_package = com.clear
2323
mod_id = clearmybackground
2424
mod_name = Clear My Background

src/main/java/com/clear/clearmybackground/mixin/early/GuiScreenMixin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.gui.GuiDownloadTerrain;
77
import net.minecraft.client.gui.GuiScreen;
88
import net.minecraft.client.gui.GuiScreenWorking;
9+
import net.minecraftforge.fml.client.GuiOldSaveLoadConfirm;
910
import org.spongepowered.asm.mixin.Mixin;
1011
import org.spongepowered.asm.mixin.Shadow;
1112
import org.spongepowered.asm.mixin.injection.At;
@@ -29,6 +30,7 @@ public class GuiScreenMixin {
2930
public void drawWorldBackground(int tint, @Nonnull CallbackInfo ci) {
3031
GuiScreen self = (GuiScreen) (Object) this;
3132
if (ClearMyBackground.FluxLoadingLoaded && (self instanceof GuiScreenWorking || self instanceof GuiDownloadTerrain)) return;
33+
if (self instanceof GuiOldSaveLoadConfirm) return;
3234
ClientHelper.renderWorldBackground(this.mc,this.width, this.height);
3335
ci.cancel();
3436
}
@@ -37,6 +39,7 @@ public void drawWorldBackground(int tint, @Nonnull CallbackInfo ci) {
3739
public void drawBackground(int tint, @Nonnull CallbackInfo ci) {
3840
GuiScreen self = (GuiScreen) (Object) this;
3941
if (ClearMyBackground.FluxLoadingLoaded && (self instanceof GuiScreenWorking || self instanceof GuiDownloadTerrain)) return;
42+
if (self instanceof GuiOldSaveLoadConfirm) return;
4043
ClientHelper.renderWorldBackground(this.mc,this.width, this.height);
4144
ci.cancel();
4245
}

0 commit comments

Comments
 (0)