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 displaying it on the block.
Method
Variable
- You first have to create a variable, let's call this timer
.png)
.png)
.png)
- TYPE: NUMBER because it it will be a TIMER, so it is an integer value.
.png)
.png)
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 MODIFICATION -1 and placeholderCondition PLAYER_NUMBER %var_timer% SUPERIOR 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
- blockCommands:
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 PLAYER_NUMBER %var_timer% EQUALS 0
- blockCommands:
execute in <<%block\_world%>> run summon item %block\_x% %block\_y%+1 %block\_z% \{Item:\{id:"minecraft:IDOFTHEITEM",Count:1b\\}\}
- variableModification: timer SET 10
-
Example
-
creationType: BASIC_CREATION
name: Timed Block
lore:
- '&b&oDefault lore'
material: STONE
dropType: IN_THE_INVENTORY
usage: -1
canBeMoved: true
config_3: true
config_update: true
titleOptions:
activeTitle: true
title:
- 'Β§6Time: Β§e%var_timer_int%'
titleAdjustement: 0.5
activators:
activator0:
name: '&eActivator'
option: LOOP
usageModification: 0
cancelEvent: false
requiredItems: {}
requiredExecutableItems: {}
requiredMagics: {}
blockCommands: []
blockConditions: {}
worldConditions: {}
placeholdersConditions:
plchCdt0:
type: PLAYER_NUMBER
comparator: SUPERIOR
part1: '%var_timer%'
part2: '0'
cancelEventIfNotValid: false
messageIfNotValid: ''
messageIfNotValidForTarget: ''
stopCheckingOtherConditionsIfNotValid: true
# Reduce the variable (timer)
variablesModification:
varUpdt0:
variableName: timer
type: MODIFICATION
modification: -1.0
delay: 1
delayInTick: false
ownerCommands: []
ownerConditions: {}
activator1:
name: '&eActivator'
option: LOOP
usageModification: 0
cancelEvent: false
requiredItems: {}
requiredExecutableItems: {}
requiredMagics: {}
blockCommands:
- STRIKELIGHTNING
blockConditions:
requiredItems: {}
requiredExecutableItems: {}
worldConditions: {}
placeholdersConditions:
plchCdt0:
type: PLAYER_NUMBER
comparator: EQUALS
part1: '%var_timer%'
part2: '0'
cancelEventIfNotValid: false
messageIfNotValid: ''
messageIfNotValidForTarget: ''
stopCheckingOtherConditionsIfNotValid: true
# Reset the timer
variablesModification:
varUpdt0:
variableName: timer
type: SET
modification: 10.0
delay: 1
delayInTick: false
ownerCommands: []
ownerConditions: {}
variables:
var0:
variableName: timer
type: NUMBER
default: 10.0
isRefreshableClean: true
refreshTagDoNotEdit: Β§δ»Β§δ»Β§θͺ§倩§ηΒ§δΊΊΒ§δΊΊΒ§εΏΒ§ι
Created Oct 26, 2025Last updated Nov 22, 2025 by Ssomar
Edit this page on GitHub.png)
.png)
.png)
.png)
.png)