-
-
Save thedead2/69d2422725bfe69f1274f6034153d2e1 to your computer and use it in GitHub Desktop.
Erroring class BasicInputScreen extends Screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.thedead2.customadvancements.generator.gui; | |
import com.mojang.blaze3d.vertex.PoseStack; | |
import de.thedead2.customadvancements.generator.AdvancementGenerator; | |
import net.minecraft.client.GameNarrator; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.gui.screens.Screen; | |
import org.jetbrains.annotations.NotNull; | |
public class BasicInputScreen extends Screen { | |
protected final Screen parent; | |
protected final Minecraft minecraft; | |
protected final AdvancementGenerator generator; | |
protected BasicInputScreen(Screen parent, Minecraft minecraft, AdvancementGenerator generator) { | |
super(GameNarrator.NO_TITLE); | |
this.parent = parent; | |
this.minecraft = minecraft; | |
this.generator = generator; | |
} | |
@Override | |
public void init() { | |
} | |
@Override | |
public void render(@NotNull PoseStack poseStack, int mouseX, int mouseY, float partialTick) { | |
this.renderDirtBackground(0); | |
super.render(poseStack, mouseX, mouseY, partialTick); | |
} | |
@Override | |
public void onClose() { | |
if(parent != null){ | |
assert minecraft != null; | |
this.minecraft.setScreen(parent); | |
} | |
else { | |
super.onClose(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment