1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved About checking if a block is complete

Discussion in 'Development' started by Sushant, Mar 4, 2022.

  1. Sushant

    Sushant Creeper

    Messages:
    5
    GitHub:
    NightSling
    So, As you might not understand what I mean by the term "complete block". I'm trying to refer to a block where the player can jump normally (Dirt, stone) and by the term "uncomplete block" I refer to blocks where the player can just basically walk (Stairs, Slabs etc..).

    I had tried doing some research about built in APIs to check it but I didn't find any reliable answers. If anyone reading this knows about a API method to check if a Block is a complete block (termed above) please let me know!
     
  2. PiloudeDakar

    PiloudeDakar Witch

    Messages:
    62
    GitHub:
    piloudedakar
    You can check if the block is an instance of "pocketmine\block\Transparent". (All of the complete blocks are instance of "Opaque" or just common blocks instance).
     
  3. Sushant

    Sushant Creeper

    Messages:
    5
    GitHub:
    NightSling
    Oh yeah, that's possible thanks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.