Dirt and Grass

Started by Alpineer on

Topic category: Help with MCreator software

Last seen on 04:13, 2. Jan 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dirt and Grass

I'm trying to make a procedure that turns dirt into grass if y+1 has air, and grass into dirt if y+1 has a block.

Event trigger - triggered by external call or when (global trigger): No additional trigger
  if ( (Get NBT number tag "Soil" of block at x: (x) y: (y) z: (z) if it has tile entity) > 0)
    do
      (Set NBT number tag "Soil" of block at x: (x) y: (y) z: (z) to ( (Get NBT Number Tag "Soil" of block at x: (x) y: (y) z: (z) if it has tile entity) - 100) if it has tile entity)
      if (Is air at x: (x) y: (y + 1) z: (z)
        do
          Place (Grass Block) at x: (x) y: (y) z: (z)
        else
          Place (Soil Block) at x: (x) y: (y) z: (z)

This is in update tick of both grass and soil blocks.

Last seen on 04:13, 2. Jan 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What I'm trying to say is,…
Wed, 01/01/2020 - 18:01

What I'm trying to say is, is there anything wrong with this?

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can test it yourself
Wed, 01/01/2020 - 23:59

You can test it yourself