chronosacaria / MCDungeonsWeapons

Bringing the weapons and tools of Minecraft Dungeons to Minecraft
Other
67 stars 26 forks source link

Made items with InnateEnchantments be enchantable in the enchanting table #230

Closed DaFuqs closed 1 year ago

DaFuqs commented 1 year ago

Added a new method onlyHasInnateEnchantments() that returns if a stack only has the enchants (or lesser) that it has, by it InnateEnchantment definition, or other enchants have been added by other means.

The mixin in ItemStack allows the Enchanting Table (and other mods) to recognise see the stack as enchantable, even if it has its innate enchantments. Normally that method would always return false, if a stack already had enchantments.

chronosacaria commented 1 year ago

Thank you, @DaFuqs!