diff --git a/gradle.properties b/gradle.properties index 0a33490..753dc31 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.2+build.4 loader_version=0.15.6 # Mod Properties -mod_version=1.0.0 +mod_version=1.0.1 maven_group=com.provismet archives_base_name=additional-armoury modid=additional-armoury 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);