code doesn't compile properly on block tick

Started by pantemezed on

Topic category: Troubleshooting, bugs, and solutions

Joined Jan 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
code doesn't compile properly on block tick

(not sure if the image is loading or not but just in case, here's the code)

event trigger
or when (global trigger) [no additional trigger]
if: [ [get energy of block at x: <[x] y: <[y] z: <[x] on side <[any direction] ] >= 20]
do: | if: [ [random integer between min 1 and max 120 included] = 119]
    | do: [add [random integer between 0 and max 3 included] <[cobblestone] to block at x: <[x] y: <[y] z: <[z] if it ha inventory]
    |	  [extract 20 energy from block at x: <[x] y: <[y] z: <[z] from side <[any direction] if it has energy storage]

i tried my best replicating it, so sorry if it's confusing

(on tick update)