Skip to content

Commit 3097df8

Browse files
committed
Show scary warning for dev builds
1 parent 54adcfd commit 3097df8

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Xplat/src/main/java/vazkii/botania/client/gui/HUDHandler.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ public static void tryOptifineWarning() {
8181
}
8282
}
8383

84+
private static boolean didDevVersionCheck = false;
85+
86+
public static void checkDevVersionWarning() {
87+
if (!didDevVersionCheck && XplatAbstractions.instance().getBotaniaVersion().contains("SNAPSHOT")) {
88+
Minecraft.getInstance().player.sendSystemMessage(Component.translatable("botaniamisc.dev_build_warning"));
89+
didDevVersionCheck = true;
90+
}
91+
}
92+
8493
public static void onDrawScreenPost(GuiGraphics gui, DeltaTracker partialTicks) {
8594
PoseStack ms = gui.pose();
8695
Minecraft mc = Minecraft.getInstance();
@@ -121,6 +130,7 @@ public static void onDrawScreenPost(GuiGraphics gui, DeltaTracker partialTicks)
121130
boolean alternateRecipeHudPosition = false;
122131
if (PlayerHelper.hasHeldItemClass(mc.player, WandOfTheForestItem.class)) {
123132
tryOptifineWarning();
133+
checkDevVersionWarning();
124134
var hud = ClientXplatAbstractions.INSTANCE.findWandHud(mc.level, bpos, state, tile);
125135
if (hud != null) {
126136
alternateRecipeHudPosition = true;

Xplat/src/main/resources/assets/botania/lang/de_de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"botaniamisc.retainer.retain_all": "Halte ursprünglich angeforderte Anzahl von Gegenständen",
3030
"botaniamisc.retainer.retain_missing": "Halte Anzahl fehlender Gegenstände",
3131
"botaniamisc.optifine_warning": "§4[WARNUNG]§r <Botania>: Optifine erkannt. Bitte sei dir bewusst, dass Optifine eine Menge Probleme mit Botania verursacht, z.B. könnte Mana sich nicht zwischen Blumen und Verbreitern bewegen, oder es werden keine Informationen angezeigt, wenn du den Stab des Waldes hältst. Wir empfehlen Sodium als eine Alternative für die Leistungsverbesserungen von Optifine.",
32+
"botaniamisc.dev_build_warning": "§4[WARNUNG]§r <Botania>: Bitte sei dir bewusst, dass du einen Entwickler-Build dieser Mod benutzt. Dies Art Build könnte schwerwiegende Fehler enthalten, die deine Welt-Dateien beschädigen können. Welten, die mit dieser Version erstellt/aktualisiert wurden, könnten außerdem nicht mit zukünftigen offiziellen Veröffentlichungen von Botania funktionieren. (Hoffentlich hast du ein Backup gemacht, denn die Rückkehr zu einer älteren Version der Welt ist sonst nicht möglich.)",
3233

3334
"botaniamisc.creativePool0": "Kreatives Manabecken, hat unendlich Mana",
3435
"botaniamisc.creativePool1": "Eines Egoisten würdig",

Xplat/src/main/resources/assets/botania/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"botaniamisc.retainer.retain_all": "Retain original number of items requested",
3030
"botaniamisc.retainer.retain_missing": "Retain number of missing items",
3131
"botaniamisc.optifine_warning": "§4[WARNING]§r <Botania>: Optifine detected. Please be aware that Optifine causes a lot of issues with botania, and you might experience issues such as mana not moving between flowers and spreaders, and no information being displayed when you hold a wand and look at a mana pool or spreader. We recommend Sodium as an alternative to Optifine's performance improvements.",
32+
"botaniamisc.dev_build_warning": "§4[WARNING]§r <Botania>: Please be aware that you are using a development build of this mod. This build may contain severe bugs that could damage your world save. Worlds created/upgraded with this version might also not work properly with future official releases of Botania. (Hopefully you made a backup, as world downgrades are otherwise not possible.)",
3233

3334
"botaniamisc.creativePool0": "Creative Mana Pool, has infinite Mana",
3435
"botaniamisc.creativePool1": "Worthy of an Egoist",

0 commit comments

Comments
 (0)