Skip to content

Commit

Permalink
disabled components wont show in screen anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Jan 10, 2025
1 parent 59e6697 commit 2a0c00b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 2a0c00b

Please sign in to comment.