Open Technici4n opened 1 year ago
EnchantmentTarget
is а really big pain. Maybe replace it with tags?
Any progress with Intrinsically enchanted items?
this api is mostly OBE. in 1.21+ you can supply a prefilled DataComponentTypes.ENCHANTMENT component in the item settings
this api is mostly OBE. in 1.21+ you can supply a prefilled DataComponentTypes.ENCHANTMENT component in the item settings
You mean stack.getDefaultComponents().get(DataComponentTypes.ENCHANTMENTS)
? That is enough for many cases, but it would be better if there is an API to allow ComponentChanges
to modify intrinsic enchantments (stack-aware).
We need some features related to enchantments. This issue exists to collect them all in the same place, to ensure a cohesive design. If you have more suggestions please add a comment.
Creating new enchantments
We need control over which items can be enchanted in an anvil (override
isAcceptableItem
) and in an enchantment table (problematic, involvesEnchantmentTarget
).Adding items to existing enchantments
Sometimes the enchantment does not allow an item. The item should be able to override this check.
Intrinsically enchanted items
Some items should behave as if they were enchanted for gameplay reasons, for example an electric tool with a mode to enable silk touch. Using the vanilla enchantment system is problematic as it can cause xp dupe glitched with the grindstone, among other things.
Misc hooks