From 54238d99bcb351f78b43930648adfab06cce573f Mon Sep 17 00:00:00 2001 From: Provismet <17149901+Provismet@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:47:57 +0000 Subject: [PATCH 1/2] Fix Mace Durability Bug #2 --- .../AdditionalArmoury/items/MaceItem.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/provismet/AdditionalArmoury/items/MaceItem.java b/src/main/java/com/provismet/AdditionalArmoury/items/MaceItem.java index f61cc8b..c03e93b 100644 --- a/src/main/java/com/provismet/AdditionalArmoury/items/MaceItem.java +++ b/src/main/java/com/provismet/AdditionalArmoury/items/MaceItem.java @@ -59,6 +59,20 @@ public float getWeaponDamage () { return this.attackDamage; } + @Override + public boolean postHit (ItemStack stack, LivingEntity target, LivingEntity attacker) { + stack.damage(1, attacker, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); + return true; + } + + @Override + public boolean postMine (ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) { + if (state.getHardness(world, pos) != 0.0f) { + stack.damage(2, miner, e -> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); + } + return true; + } + @Override public void postCriticalHit (ItemStack itemStack, LivingEntity user, LivingEntity target) { int shredding = EnchantmentHelper.getLevel(AAEnchantments.SHREDDING, itemStack); From 02ff9c7f6d3aba4bf4e9870710953c5fd4ade932 Mon Sep 17 00:00:00 2001 From: Provismet <17149901+Provismet@users.noreply.github.com> Date: Mon, 26 Feb 2024 00:04:30 +0000 Subject: [PATCH 2/2] Bump version number. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9a75262..106a368 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.10 loader_version=0.15.3 # Mod Properties -mod_version=1.0.0 +mod_version=1.0.1 maven_group=com.provismet archives_base_name=additional-armoury modid=additional-armoury