Get All tiles

Discussion in 'Plugin Help' started by andrew_dev, Aug 4, 2022.

  1. andrew_dev

    andrew_dev Creeper

    Messages:
    3
    GitHub:
    andrewkydev1
    How to get all tiles in world.
    Here is my sample code

    PHP:
    foreach($this->getServer()->getWorldManager()->getDefaultWorld()->getTiles() as $tile){
    }
    But it gives me an error about the method, but I can't find the method for getting tiles.
     
  2. IvanCraft623

    IvanCraft623 Baby Zombie

    Messages:
    104
    GitHub:
    IvanCraft623
    Why u need get tiles?
     
  3. andrew_dev

    andrew_dev Creeper

    Messages:
    3
    GitHub:
    andrewkydev1
    To make a plugin on the plates
     
  4. HeyDeniis_

    HeyDeniis_ Baby Zombie

    Messages:
    135
    PHP:
    foreach($this->getServer()->getWorldManager()->getDefaultWorld()->getLoadedChunks() as $chunk){
      foreach(
    $chunk->getTiles() as $tile){

      }
    }
     
    andrew_dev likes this.

Share This Page

  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.