FallingTree

FallingTree

28M Downloads

[Bug] Honing in Tetra mod is not working when using Falling Tree mod

Morasiu opened this issue ยท 6 comments

commented

Describe the bug

When I am sneaking and I have Falling Tree mod installed and set to Sneak enable and chopping to Shift Down, I am chopping logs and my tetra axe is using durability, but it's not honing at all.

See this Issue for more info. I've reported it in Tetra but it looks like it should have to be done on the Falling Tree mod side.

Minecraft version

1.18.2

Forge version

1.18.2 - 40.1.73

Mod version

1.18.2-3.5.3

Relevant log output

No response

commented

Can I have a bit of context of what that honing feature in tetra does? So that I know a bit where to look and what to expect.

commented

Honing is basically tool XP. It is used for levelling up using tools. One of the best features of Tetra mod.

commented

I looked a bit into it but I think I won't be able to solve it "easily".

As mentioned in the issue you made on Tetra side, what is needed is for a method mineBlock to be called on the ItemStack. This is where the honing magic happens. However, that method also is responsible for damaging the tool.

In my case I do not call this method because I want to control how the tool is damaged (based on the config).


This is mostly my vision that is not compatible with how Minecraft is made as I don't break the tool for each breaking action.

What I can try to do is to specifically detect when it's a Tetra tool and apply the honing effect manually. Though that's a bit hacky as I somehow mimic what tetra would do. Would be better if Tetra had an API where one could simple perform something like TetraAPI.hone(itemStack, player, xp, ...).

In the end, in my opinion, it sounds more like mods are incompatible, mostly because I bypass the mineBlock method. Tetra tools probably should be blacklisted to not have issues between the 2 mods.


Still, I tried the hacky way. You can try that build and see if it does anything: https://github.com/RakSrinaNa/FallingTree/actions/runs/3016804768
(mod is in a zip in the artifacts section)

commented

It works! That's amazing

commented

I'll eventually release it officially. However this is quite hacky and if Tetra changes stuff regarding honing it may break my hack.

So in the future you may have to come back to complain it doesn't work anymore ๐Ÿ˜† (as I won't be monitoring Tetra for changes)

commented

Sure. That's incredible you just fixed that for me. Keep up a good work :)