Please help to create an enchantment

Started by idkidk on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please help to create an enchantment

Hello, I'm creating a mod that should have enchantment. It is superimposed on the food and makes it endless, but with a cooldown. This achievement has 5 levels with different cooldown times (1 -- 50 seconds, each subsequent level reduces cooldown by 10 seconds) and it enchants only 1 food from the stack. I've done the enchantment, but I don't know how to do the procedures. I absolutely do not understand how to implement this through a procedure, and then bind it to an enchantment.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try something like this,  …
Fri, 10/17/2025 - 15:38

try something like this,

 

or,

((LivingEntityUseItemEvent.Finish)event).setResultStack(itemstack);