Slab half detection

Started by Crayeights on

Topic category: General discussion

Last seen on 20:48, 24. Feb 2023
Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Slab half detection

I am trying to detect top and or bottom half of slab so if its top half do..... or bottom then do......

I been working on the grass code and that is something that has been a pain for me to figure out, I know we can detect directional blocks and it helps allot but am unable to detect top or bottom so like grass can grow under top but not bottom. Bottom slab will suffocate grass block under self.

is there another way to do this I tryed detecting solid or not and also opacity and done a good bit of the work but the grass block has allot of code behind it.

Last seen on 18:29, 24. Apr 2024
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry my reply took so long,…
Tue, 12/05/2023 - 09:07

Sorry my reply took so long, but I only recently encountered the same issue.
The solution is actually pretty simple.

Under block data, there is a procedure block called "Get enum property [] of []."
Here, you can enter "type" for the first input, and put a "Get block at [] [] []" procedure block into the second input.
The entire block then needs to be placed into one of the inputs of a string equals block, and the other half needs a text block.

The types you can scan for are called...

  • bottom
  • double
  • top

 

I hope this is still valuable to you.