Skip to content

Commit

Permalink
Merge pull request #5 from Provismet/1.20
Browse files Browse the repository at this point in the history
Forward port dagger patch to 1.20.2
  • Loading branch information
Provismet authored May 3, 2024
2 parents 8503fba + e1ff67d commit 8b360cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div align="center">

# Additional Armoury
[![](https://img.shields.io/jitpack/version/com.github.Provismet/Additional-Armoury?style=flat-square&logo=jitpack&color=F6F6F6)](https://jitpack.io/#Provismet/Additional-Armoury)
[![](https://img.shields.io/modrinth/dt/DxlUSaq8?style=flat-square&logo=modrinth&color=F6F6F6)](https://modrinth.com/mod/additional-armoury)
[![](https://img.shields.io/curseforge/dt/973673?style=flat-square&logo=curseforge&color=F6F6F6)](https://www.curseforge.com/minecraft/mc-mods/additional-armoury)

<img src="https://github.com/Provismet/Additional-Armoury/assets/17149901/bd703705-6811-473c-ad05-b328420ba668" alt="Combat+" width=250px>

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.2+build.4
loader_version=0.15.6

# Mod Properties
mod_version=1.0.1
mod_version=1.0.2
maven_group=com.provismet
archives_base_name=additional-armoury
modid=additional-armoury
Expand All @@ -18,4 +18,4 @@ modid=additional-armoury
fabric_version=0.91.6+1.20.2
fabric_asm_version=v2.3
combatplus_version=1.0.0-mc1.20.1
lilylib_version=1.1.3-mc1.20
lilylib_version=1.1.3-mc1.20
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ public void postChargedHit (ItemStack stack, LivingEntity user, LivingEntity tar
);
}
this.spawnInkParticles(newTarget, 3, stack);
++damage;
}
damage += 2;
}

boolean hasAdhesive = EnchantmentHelper.getLevel(AAEnchantments.ADHESIVE, stack) > 0;
if (hasAdhesive) {
stack.damage(damage, user, p -> {
stack.damage(damage * 2, user, p -> {
if (p.getStackInHand(Hand.MAIN_HAND) == stack) p.sendToolBreakStatus(Hand.MAIN_HAND);
else p.sendToolBreakStatus(Hand.OFF_HAND);
});
}
else if (user instanceof PlayerEntity player && !player.isCreative() && potion != Potions.EMPTY && this.decrementCurrentPotionUses(stack, damage * 2) <= 0) {
else if (user instanceof PlayerEntity player && !player.isCreative() && potion != Potions.EMPTY && this.decrementCurrentPotionUses(stack, damage) <= 0) {
PotionUtil.setPotion(stack, Potions.EMPTY);
stack.removeSubNbt(PotionUtil.CUSTOM_POTION_EFFECTS_KEY);
}
Expand Down

0 comments on commit 8b360cb

Please sign in to comment.