Started by
rmsandegs
on
Topic category: Help with Minecraft modding (Java Edition)
When I select a level 30 enchantment on my custom item, only a couple of my enchantments will have a chance to be put on the item. The link below leads to a sample workspace in which I've managed to recreate the issue. In this example, only enchantments 4 and 5 have a chance of being applied on a level 30 enchant. The rest only appear on lower-level rolls.
https://www.dropbox.com/s/f2hcs4okhq71747/sample%20workspace.zip?dl=0
I don't think we can control how this behaves, there are only basic properties exposed in enchantments, check the generated code for more info. Level 30 is quite high, though
It's just usually best to go for the level 30 enchantment because it has the best chance of giving you more enchantments and for them to be higher level.
I figured out editing getMinEnchantability() and getMaxEnchantability() to something like 0 min/100 max makes them show up in the enchantment table. Is there a way these two fields could be implemented into the interface? Perhaps you could set the min and max via procedures that return a number.
It would also be nice if these fields would pass "enchantmentLevel" as a dependency, as Vanilla enchantments use this to determine the maximum level of a given enchantment the item can receive (i.e a wooden sword can only get up to sharpness 2).
This is the only solution I could find that fixed the issue for me. You were right about complete control being pretty limited, though.