Questions about effects and customization

Started by Hamio on

Topic category: Help with modding (Java Edition)

Last seen on 18:00, 18. Nov 2023
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Questions about effects and customization

Hello, how are you?
I would like to ask two questions about MCREATOR programming.
1st - Is there any method of changing the effects of Vanilla potions?
2nd - I'm thinking about modifying the "Nausea" effect to prevent the player from eating while under this effect. If it is not possible to modify the Vanilla effect, is it possible to create a new effect that does this? If so, could anyone help me with the codes?

Thank you in advance for anyone's contribution.

Last seen on 20:37, 26. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't necessarily need…
Thu, 11/02/2023 - 02:17

You don't necessarily need to create new effects to modify the vanilla effects of the player; you can just make a procedure that runs on player update tick, and checks if they have a certain effect. (In this case, Nausea.) For your specific problem, you could try creating a procedure that triggers 'when player finishes using item,' checks if the item is edible and the player has Nausea, and, if both are true, cancels the trigger. (I'm not sure if this will work for eating, if the trigger is actually cancelable, but the basic idea still stands.)