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

Solved How to set blocks with meta

Comments in 'Plugin Development' started by Rspuds, Aug 23, 2015.

  1. Rspuds
    Offline

    Rspuds New Member

    Joined:
    Aug 4, 2015
    Posts:
    53
    Title pretty much explances it. I want to know how to set a block with meta. I tried setBlockIdAt($x, $y, $z, $id) but you can't use a : to set the meta. I also tried using setBlock(vector3 $pos, block $block) but red stained clay. I noticed there is a setBlockDataAt() function that could do this but I don't want to have to set blocks then change the meta. So I guess the real question is, is there a more efficient way of setting blocks with meta then setting the block then applying the meta?
    One more thing. I'm not using it for this it for this project but have been wondering how to set a group of blocks with out using setblock for each of them. I tried looking on worldeditart and minereset but those plugins are quite big and confusing for me to find stuff in.

    Thanks for the help!
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    You know what would help the most right now? By posting the code you are using.
  3. Rspuds
    Offline

    Rspuds New Member

    Joined:
    Aug 4, 2015
    Posts:
    53
    I don't have the code yet because I'm waiting on an answer to thing. I don't see how the code would help anyways all I need to know is if there is a better way of placing blocks with meta, I know how to do the rest.
  4. Rspuds
    Offline

    Rspuds New Member

    Joined:
    Aug 4, 2015
    Posts:
    53
    Ok looked into what @Asidert said and he was right except its a "," rather then an ":" thanks for the help!
  5. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    PHP:
    $level->setBlockDataAt($x,$y,$z,$data);
    EDIT: Oops, i didnt read what you posted :p
    Last edited: Aug 23, 2015

Share This Page

Advertisement