Need to create custom event trigger (1.7.9)

Started by proxerater on

Topic category: Help with MCreator software

Last seen on 08:33, 15. Jul 2021
Joined Mar 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need to create custom event trigger (1.7.9)

Short question, can you make custom event triggers? I want to make my event trigger "play breaks block" and then select my modded block.

Please help!

 

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As it is your custom block,…
Tue, 07/31/2018 - 08:57

As it is your custom block, all you have to do is override Block#onBlockDestroyedByPlayer() or Block#removedByPlayer() in your blocks class, depending on your needs. I am quite sure that one of them should be accessible from the block creation menu but I may be wrong.
If it was not your block, you would have to make an event handler and subscribe to BlockEvent.BreakEvent.

Last seen on 08:33, 15. Jul 2021
Joined Mar 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks!
Wed, 08/01/2018 - 01:45

thanks!

Last seen on 16:14, 8. Sep 2018
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there any to do the same,…
Sun, 08/05/2018 - 19:19

Is there any to do the same, but to a mob?

What I mean is, a player kills a certain mob that triggers an event?

Thanks