Timed actions

In this page you will learn how to timer stuff to happen in your block, for example:

  • Summoning an item each "x" second

  • Triggering an activator and displaying the cooldown on top of the block

  • Or executing whatever you want and siplaying it on the block.

Method

Variable

  • You first have to create a variable, let's call this timer

    • TYPE: NUMBER because it it will be a TIMER, so it is an integer value.

TITLE

  • Go to Title features and display the variable there using the placeholder %var_<variablename>_int%

LOOP ACTIVATOR

  • Now create a LOOP activator with variableModification timer -1 and placeholderCondition %var_timer% GREATER than 0.

ACTION

  • Here is UP TO YOU, and will depend on your needs, in this case let's make a couple of examples

    • RIGHT CLICK and take an ITEM

      • activator RIGHT CLICK

      • placeholderCondition %var_timer% EQUALS 0

      • command:

        • execute in <<%block_world%>> run summon item %block_x% %block_y%+1 %block_z% {Item:{id:"minecraft:IDOFTHEITEM",Count:1b}}

      • variableModification: timer SET 10

    • Each time the timer goes to 0 summon an item

      • activator LOOP

      • placeholderCondition %var_timer% EQUALS 0

      • command:

        • execute in <<%block_world%>> run summon item %block_x% %block_y%+1 %block_z% {Item:{id:"minecraft:IDOFTHEITEM",Count:1b}}

      • variableModification: timer SET 10

Last updated