can (item) be enchanted with (enchant) level (int)

Started by ghostlysander on

Topic category: Feature requests and ideas for MCreator

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can (item) be enchanted with (enchant) level (int)

I have been working on a mod that reworks enchanting, however the MCreator "enchant (item) with (enchant)" ignores if said item would normally be able to be enchanter by said enchant. That is what I expected the procedure to do and it is usefull like that, however. I have solved the item type problem with procedures, but I can't check an item for conflicting enchants.

Obviously I can hardcode the vanilla enchants, but I do aim for mod compatibility.
How i do that is by:
1. making a test enchant
2. "enchant (item) with (test enchant)"
3. Look in the generated code
4. copy the procedures code into a custom code procedure
5. change the "mod:test_enchant" to the text variable (enchant)

I don't actually know how to code though, so my capabilities end here.

What I wish the "can (item) be enchanted with (enchant) level (int)" procedure can do is the following: 
Return true if all of the following are true
1. (item) is the correct tag for (enchant);
2. (item) is enchanted with (enchant) for a lower level than (int), or not enchanted with (enchant);
3. (item) does not have any conflicting enchants with (enchant).

What would allow me to get rid of my custom code:
1. Create an "(enchant)" list procedure in the place of the enchant lists in the current enchant procedures and
2. Create an "(text) registry name to enchant" procedure.

I really hope that at least something like the "can (item) be enchanted with (enchant) level (int)" procedure gets added, because I really want to finish my mod.