From 85bb51ed78a2f7d89e0528761f8b7ac3bfdb1767 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 1 Sep 2022 20:04:36 +0200 Subject: [PATCH] level < 0 means never show this page --- .../com/minelittlepony/unicopia/container/DynamicContent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java b/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java index 68793e39..91232854 100644 --- a/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java +++ b/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java @@ -132,7 +132,7 @@ public class DynamicContent implements Content { compile(); TextRenderer font = MinecraftClient.getInstance().textRenderer; - boolean needsMoreXp = Pony.of(MinecraftClient.getInstance().player).getLevel().get() < level; + boolean needsMoreXp = level < 0 || Pony.of(MinecraftClient.getInstance().player).getLevel().get() < level; matrices.push(); matrices.translate(bounds.left, bounds.top - 10, mouseY); @@ -144,7 +144,7 @@ public class DynamicContent implements Content { matrices.translate(bounds.left, bounds.top - 10, mouseY); matrices.translate(0, 12, 0); matrices.scale(0.8F, 0.8F, 1); - font.draw(matrices, Text.literal("Level: " + (level + 1)).formatted(Formatting.DARK_GREEN), 0, 0, mouseY); + font.draw(matrices, Text.literal(level < 0 ? "Level: ???" : "Level: " + (level + 1)).formatted(Formatting.DARK_GREEN), 0, 0, mouseY); matrices.pop(); matrices.push();