Skip to content

Commit

Permalink
Fix #341 (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabeHunger54 authored Dec 18, 2022
1 parent 31304c8 commit 2b4f34d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Additions
# Fixes

- Spell recipe UIs now properly work! They show ingredients, reagents, the parts they're made out of, and an affinity breakdown.
- Fixed a critical crash occuring when trying to change the spell group on a spell with only one spell group
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.daemon=false
mod_group=com.github.minecraftschurlimods
mod_id=arsmagicalegacy
mod_name=Ars Magica: Legacy
mod_version=1.2.1
mod_version=1.2.2
mod_author=Minecraftschurli, IchHabeHunger54
mod_credits=Mithion for the original mod
mod_url=https://www.curseforge.com/minecraft/mc-mods/ars-magica-legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public SpellCastResult invoke(ISpell spell, LivingEntity caster, Level level, @N
public void nextShapeGroup(ItemStack stack) {
var helper = ArsMagicaAPI.get().getSpellHelper();
ISpell spell = helper.getSpell(stack);
spell.currentShapeGroupIndex((byte) ((spell.currentShapeGroupIndex() + 1) % spell.shapeGroups().size()));
spell.currentShapeGroupIndex((byte) ((spell.currentShapeGroupIndex() + 1) % spell.shapeGroups().stream().filter(e -> !e.isEmpty()).count()));
helper.setSpell(stack, spell);
}
}

0 comments on commit 2b4f34d

Please sign in to comment.