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

How to make a block spawn in.

Discussion in 'Development' started by Secretsilver313, Jun 7, 2020.

  1. Secretsilver313

    Secretsilver313 Silverfish

    Messages:
    18
    GitHub:
    secretsilver
    Can someone give me an example of how to spawn in a block using code php?
     
  2. Rim

    Rim Spider Jockey

    Messages:
    28
    GitHub:
    boomyourbang
    See Level->setBlock($pos, $block, $direct, $update), where $pos is a Vector3 object (the position to update the block), $block is a Block object, $direct is a bool where if true it will immediately send the block update instead of queue it for the next tick, and $update is a bool where if true the surrounding blocks will be checked to be updated.
     
  3. Secretsilver313

    Secretsilver313 Silverfish

    Messages:
    18
    GitHub:
    secretsilver
    Splendid reply! 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.