Pass triggered event with it's type to execute()

Started by Azzier on

Topic category: Help with MCreator software

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pass triggered event with it's type to execute()

Hello, 

I am adding some global triggers to mcreator and I got curious if there's any way to pass triggered event with it's type to `execute()`. I need this to add some more advanced methods. 

I tried to create new variable `event`, but for it has `Object` type:

`(@Nullable Event event, Object event2)`

 

I wanted it to be at least:

`(@Nullable Event event, PlayerXpEvent.XpChange event2)`

Where PlayerXpEvent.XpChange will be changing, depending on global trigger.

 

The best way it'd be to change Event to PlayerXpEvent.XpChange but I understand that, it's built in mcreator procedures. 

 

I wanted to add `set` methods with new global triggers but, I don't know if its possible without passing right event. Im still learning blockly >.<

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The best would be to change …
Fri, 05/20/2022 - 17:05

The best would be to change `Event event` to `PlayerXpEvent.XpChange event`

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, i bypassed it by…
Sun, 05/22/2022 - 12:42

Okay, i bypassed it by creating new private static field xd