End Portal Recipe (Fabric)

End Portal Recipe (Fabric)

35.8k Downloads

Breaking tools

Ceifeire opened this issue ยท 4 comments

commented

Information

Minecraft version: 1.16.1
Forge version: 32.0.74
Environment: Multiplayer

Mod name: Tree Harvester
Mod version: 1.3

Description

So I have a mod installed called advanced tools. It makes tools similar to vanilla tools but dont break like vanilla tools when their durability runs out. They enter a broken state and can then be repaired using the material of the tool, IE cobble stone fixes a stone axe. Well sometimes when chopping down trees using the axe from that mod, not entirely sure of the conditions, the axe gets broken like a vanilla tool rather than entering the broken state to be repaired. I reached out to the advanced tool creator and he said to talk to you since he cant look at your mod. He said the way the durability is possibly being removed is causing the issue.

Crash report

no crash report.

commented

A similar thing can occur if you use commands to enchant an Elytra with Thorns III then wear the elytra and get attacked by a mob. When the Elytra reaches 1 durability, it enters a broken state where you have to repair it using XP and either Phantom Membranes or the Mending enchantment in order to be able to use it again. However, if such an elytra is enchanted with Thorns, then worn, then it will actually break when you are attacked by a mob. To reproduce:

  1. /give @p elytra{Enchantments:[{id:"thorns",lvl:3}],Damage:431}
  2. Fly with the elytra until you can no longer fly with it.
  3. Get attacked by a mob.
  4. The elytra breaks.

Alternative reproduction steps (the item used must not be armor except if it is a helmet, carrot on a stick used for example):

  1. /replaceitem entity @p armor.head minecraft:carrot_on_a_stick{Enchantments:[{id:"thorns",lvl:3}],Damage:1}
  2. Stand on any slab. If there's no slab nearby, do /setblock ~ ~ ~ stone_slab. (optional, but recommended)
  3. /setblock ~ ~20 ~ anvil
commented

Ok. But how does that help with this? Or you saying things can happen because it is using the vanilla system? Did I mention that the breaking is random?

commented

In both cases, it's trying to damage the item (which is supposed to lose durability but not break) below the intended minimum durability of 1, which causes the item to break. It should check that the item is at 1 durability, and if that condition is met, then abort the operation and stop dealing durability damage to prevent the item from breaking.

commented

Thanks for opening the issue and using the mod! I've just released version 1.7, which adds compatibility to the advanced tools mod you've used. Took some testing but it works now!

https://www.curseforge.com/minecraft/mc-mods/tree-harvester