Backstabbing should check for #c:knives instead of KnifeItem
Closed this issue ยท 2 comments
Minecraft version
1.20.1
Farmer's Delight version
2.0.13
Fabric Loader version
0.15.7
Fabric API version
any
Description
Ideally, any mod's knives would be able to accept backstabbing, so canEnchant should check for
stack.is(new TagKey(Registries.ITEM, new ResourceLocation("c", "knives"))
It would take a mixin to EnchantmentHelper#getAvailableEnchantmentResults to get any item with #c:knives to be able to be enchanted with Backstabbing at the Enchanting Table.
Steps to reproduce
No response
Mod list
N/A
Logs
No response
Minimal instance
- I have tested this on a minimal instance
Performance and shader mods
- I am using performance or shader mods
This should probably go to the original Forge version, it's also checking for KnifeItem: https://github.com/vectorwing/FarmersDelight/blob/60c612c058385434b8ae3c7277b7d1d4ea3ffd50/src/main/java/vectorwing/farmersdelight/common/registry/ModEnchantments.java#L15
The current implementation in FDRF is actually not using a custom EnchantmentCategory due to the fact that creating it is rather complicated in Fabric. I'll create a PR for a proper custom EnchantmentCategory first, but features from the original Forge version should stayed unchanged until it updates to use the tag.
no longer an issue due to #24