Alpha-s-Stuff / TinkersConstruct

Tinker a little, build a little, tinker a little more...
MIT License
85 stars 29 forks source link

[1.20.1] `#fabric:needs_tool_level_x` tags are not honored properly #81

Closed KonSola5 closed 6 months ago

KonSola5 commented 11 months ago

Minecraft Version

1.20.1

Fabric/Quilt Version

0.14.23

Fabric/Quilt API Version

0.89.3+1.20.1

Hephaestus Version

1.20.1-3.6.3.232

Describe your issue

On vanilla tools, #fabric:needs_tool_level_x tags work fine, aka:

However, this is completely ignored by Hephaestus tools, these are effective against blocks tagged like above.

(Shown by using Hephaestus tools and vanilla tools on Mythic Metals blocks - Unobtainium Block needs tool level 4, and Metallurgium Block needs tool level 5).

https://github.com/Alpha-s-Stuff/TinkersConstruct/assets/125081901/fe236780-436e-4ec3-9191-20d7c733c859

Crash Report

No response

Other mods

Mod showcased: mythicmetals-0.18.2+1.20

Tried reproducing with just Tinkers?

No

Performance Enchancers

Sodium

Searched for known issues?

Checked pinned issues, Searched open issues, Searched closed issues, Checked the FAQ

KonSola5 commented 9 months ago

Just noticed, that the bug is in the Porting Lib.

https://github.com/Fabricators-of-Create/Porting-Lib/blob/f47f7d727241a08694bfccd144edfb185e2f27c6/base/src/main/java/io/github/fabricators_of_create/porting_lib/util/TagUtil.java#L38

The method only honors NEEDS_NETHERITE_TOOL, not realizing that Fabric has a convention for higher tiers.

When mining, as there's no tag c:needs_netherite_tool, it assumes that the block is mineable.