Skip to content

Commit

Permalink
Started version detector thingy, will be in 1.19.3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
pluto7073 committed Jan 23, 2023
1 parent 1e4043a commit 18b5def
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/ml/pluto7073/plutoscoffee/PlutosCoffee.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
import ml.pluto7073.plutoscoffee.potions.ModPotions;
import ml.pluto7073.plutoscoffee.registry.ModStats;
import net.fabricmc.api.ModInitializer;
import net.minecraft.client.gui.screen.WarningScreen;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class PlutosCoffee implements ModInitializer {

public static final String MOD_ID = "plutoscoffee";
public static final Logger logger = LogManager.getLogger("PlutosCoffeeMod");
public static final int MOD_VERSION = 5;

@Override
public void onInitialize() {
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/ml/pluto7073/plutoscoffee/VersionWarningScreen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package ml.pluto7073.plutoscoffee;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.screen.WarningScreen;
import net.minecraft.text.Text;

@Environment(EnvType.CLIENT)
public class VersionWarningScreen extends WarningScreen {

private static final Text HEADER;
private static final Text MESSAGE;
private static final Text NARRATED;

public VersionWarningScreen() {
super(HEADER, MESSAGE, NARRATED);
}

@Override
protected void initButtons(int yOffset) {

}

static {
HEADER = Text.translatable("plutoscoffee.version.header");
MESSAGE = Text.translatable("plutoscoffee.version.message");
NARRATED = HEADER.copy().append("\n").append(MESSAGE);
}

}

0 comments on commit 18b5def

Please sign in to comment.