From 2a0c00bf8739adcc391ac267e27e1cc9828a6489 Mon Sep 17 00:00:00 2001 From: CammiePone Date: Fri, 10 Jan 2025 03:19:00 -0800 Subject: [PATCH] disabled components wont show in screen anymore --- .../client/gui/screens/SpellcraftScreen.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/cammiescorner/arcanuscontinuum/client/gui/screens/SpellcraftScreen.java b/src/main/java/dev/cammiescorner/arcanuscontinuum/client/gui/screens/SpellcraftScreen.java index d2b5b9f1..cf014028 100644 --- a/src/main/java/dev/cammiescorner/arcanuscontinuum/client/gui/screens/SpellcraftScreen.java +++ b/src/main/java/dev/cammiescorner/arcanuscontinuum/client/gui/screens/SpellcraftScreen.java @@ -64,8 +64,8 @@ protected void init() { leftPos = (width - 256) / 2; topPos = (height - 180) / 2; inventoryLabelY = -10000; - spellShapes = Arcanus.SPELL_COMPONENTS.stream().filter(component -> !ArcanusSpellComponents.EMPTY.is(component) && ArcanusComponents.getWizardLevel(Minecraft.getInstance().player) >= component.getMinLevel() && component instanceof SpellShape).toList(); - spellEffects = Arcanus.SPELL_COMPONENTS.stream().filter(component -> !ArcanusSpellComponents.EMPTY.is(component) && ArcanusComponents.getWizardLevel(Minecraft.getInstance().player) >= component.getMinLevel() && component instanceof SpellEffect).toList(); + spellShapes = Arcanus.SPELL_COMPONENTS.stream().filter(component -> !ArcanusSpellComponents.EMPTY.is(component) && component.isEnabled() && ArcanusComponents.getWizardLevel(Minecraft.getInstance().player) >= component.getMinLevel() && component instanceof SpellShape).toList(); + spellEffects = Arcanus.SPELL_COMPONENTS.stream().filter(component -> !ArcanusSpellComponents.EMPTY.is(component) && component.isEnabled() && ArcanusComponents.getWizardLevel(Minecraft.getInstance().player) >= component.getMinLevel() && component instanceof SpellEffect).toList(); if(minecraft != null) { for(SpellComponent component : spellShapes) @@ -386,7 +386,7 @@ private void drawWidgets(GuiGraphics gui, int mouseX, int mouseY, float delta) { gui.drawString(font, " / ", 128 - font.width(" / ") / 2, 11, 0x555555, false); gui.drawString(font, maxSpellComponentCount, 138 - font.width(maxSpellComponentCount) / 2, 11, componentCounterColour, false); - MutableComponent weight = Component.translatable("spell_book.arcanuscontinuum.weight" + getWeight().toString().toLowerCase(Locale.ROOT)).withStyle(ChatFormatting.DARK_GREEN); + MutableComponent weight = Component.translatable("spell_book.arcanuscontinuum.weight." + getWeight().toString().toLowerCase(Locale.ROOT)).withStyle(ChatFormatting.DARK_GREEN); MutableComponent mana = Component.literal(Arcanus.format(getManaCost())).withStyle(ChatFormatting.BLUE); MutableComponent coolDown = Component.literal(Arcanus.format(getCoolDown() / 20D)).append(Component.translatable("spell_book.arcanuscontinuum.seconds")).withStyle(ChatFormatting.RED);