Skip to content

Commit

Permalink
Merge branch '1.19.2' into 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Feb 29, 2024
2 parents 9bff7f8 + 9eb791d commit d96bad9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions LATEST_CHANGES.MD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- Fixed Projectiles not being able to go through portals
- Fixed client crash caused by upgrading curio items on a dedicated server
- Fixed mismatched Russian translations between versions
- Fixed tooltip index operation potentially being out of bounds with other mod's editing the tooltip at the same time
- Fixed Arrow Volley spell's sub-arrows not keeping track of the original caster

### API
-
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void tick() {
var spawn = this.position().add(orth.scale(distance));
arrow.setPos(spawn);
arrow.shoot(motion.add(Utils.getRandomVec3(.04f)));
arrow.setOwner(this.getOwner());
level.addFreshEntity(arrow);
MagicManager.spawnParticles(level, ParticleTypes.FIREWORK, spawn.x, spawn.y, spawn.z, 2, .1, .1, .1, .05, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static void imbuedWeaponTooltips(ItemTooltipEvent event) {
//Keybind notification
additionalLines.add(Component.literal(" ").append(Component.translatable("tooltip.irons_spellbooks.press_to_cast_active", Component.keybind("key.use")).withStyle(ChatFormatting.GOLD)));
int i = event.getFlags().isAdvanced() ? TooltipsUtils.indexOfAdvancedText(lines, stack) : lines.size();
lines.addAll(i, additionalLines);
lines.addAll(i < 0 ? lines.size() : i, additionalLines);
}
} else if (ISpellContainer.isSpellContainer(stack) && !(stack.getItem() instanceof SpellBook)) {
var spellContainer = ISpellContainer.get(stack);
Expand All @@ -195,7 +195,7 @@ public static void imbuedWeaponTooltips(ItemTooltipEvent event) {
});
//Add header to sword tooltip
additionalLines.add(1, Component.translatable("tooltip.irons_spellbooks.imbued_tooltip").withStyle(ChatFormatting.GRAY));
lines.addAll(i, additionalLines);
lines.addAll(i < 0 ? lines.size() : i, additionalLines);
}
// if (spellContainer.getActiveSpellCount() < spellContainer.getMaxSpellCount()) {
// var component = Component.translatable("tooltip.irons_spellbooks.can_be_imbued", spellContainer.getActiveSpellCount(), spellContainer.getMaxSpellCount());
Expand Down

0 comments on commit d96bad9

Please sign in to comment.