Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

set tile

Comments in 'Plugin Development' started by Creeperface, Aug 15, 2015.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    ho how can i set new Tile to level?
    i tried this but tile still doesnt exist :/
    PHP:
    $level $this->plugin->level;
            
    $tile $level->getTile($pos);
            if(!
    $tile instanceof Chest){
                
    $level->setBlock($posBlock::get(540));
            }
            
    $tile $level->getTile($pos);
  2. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    981
    Plugins:
    9
    What's $pos?
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Vector
    If i place chest it works
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Set block ≠ add tile
    You have to create a new tile yourself. For how to do it, look at source code about placing chests.
    Creeperface likes this.

Share This Page

Advertisement