Test for block but ignore transparent blocks/ test for solid block

Started by SquidkingInc on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Test for block but ignore transparent blocks/ test for solid block
Mon, 06/17/2019 - 10:25 (edited)

In the procedure editor how do I make something test for a block but ignore all transparent blocks, such as slabs, glass, cobwebs, tall grass, flowers, ect. I know some blocks do this in Minecraft already such as grass blocks when testing to see if they have a solid block on top. ( I am trying to make grass blocks :/ )

Edited by SquidkingInc on Mon, 06/17/2019 - 10:25
You could check the light…
Mon, 06/17/2019 - 19:47

You could check the light value on the block location and above it. If the value is the same, the block is transparent.

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but that means if two blocks…
Mon, 06/17/2019 - 21:12

but that means if two blocks are above it, it will not turn to dirt...

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also then a torch will turn…
Mon, 06/17/2019 - 21:16

Also then a torch will turn the grass to dirt, this doesn't really solve my problem

Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Test if the light value of…
Tue, 06/18/2019 - 01:22

Test if the light value of the block above is more than 0. If it is, then your block is fine. If it is 0, then that means the block is solid and it needs to turn to dirt

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but when it turns night all…
Wed, 06/19/2019 - 05:36

but when it turns night all the grass will turn to dirt

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The sky light value does not…
Mon, 04/27/2020 - 09:47

The sky light value does not change with the day/night cycle, so your precious grass will not turn to dirt when it becomes night if the above procedure is used.

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried this too in a kind…
Thu, 07/14/2022 - 19:06

I tried this too in a kind of way, but it doesn't seem to work. I hope i can get some helpThis is what i tried, and it failed

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does the image work?  
Thu, 07/14/2022 - 19:07

Does the image work?