Event Conditions

NOTE: Event system was replaced with procedures so look for procedure wiki pages instead for MCreator versions above 1.7.9

Basics

If you want to use conditions, you first need to know what this actually is. If condition you select is true at the moment of event triggering, the event will execute. Otherwise not. For example:

isDay[]

If you add this condition to On block added event and set event Explode, the block will explode when placed if you do this while daytime.

Logical operations

You can merge more conditions using OR or AND operations. For OR you use || and for AND &&. Example:

  • isDay[] || isRaining[] <- this condition will be true if daytime will be present OR weather will be rainy
  • isDay[] && isRaining[] <- this will be true if daytime will be present AND weather will be rainy

You can also negate (NOT) your condition usingĀ !:

  • !isDay[] <- this condition will be true while nighttime.


Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.