Dirt and Grass

Started by Alpineer on

Topic category: Help with MCreator software

Active 1 year ago
Joined Dec 2018
Points:
738

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
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.

Active 1 year ago
Joined Dec 2018
Points:
738

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
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?

Active 4 months ago
Joined Jun 2019
Points:
2787

User statistics:

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

You can test it yourself