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

How can I replace iron fence with Air

Comments in 'Plugin Development' started by DunxandMinecraft, Aug 7, 2015.

  1. DunxandMinecraft
    Offline

    DunxandMinecraft Active Member

    Joined:
    Oct 26, 2014
    Posts:
    158
    Show me how I could use that
  2. Asparanc
    Offline

    Asparanc Active Member

    Joined:
    Feb 20, 2015
    Posts:
    210
    Minecraft User:
    Asparanc
    for ($x2 = 0; $x2 < 10 ; $x2++){
    $level->setBlock(new Vector3($x + $x2, $y, $z), Block::get($id, $metadata));
    }
    $x = inital X position.
    This will produce a line of the block the choiced block for a lenght of 10 blocks
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    for is a control structure, not a function. It is conceptually wrong to say for as a function.
    Asparanc likes this.
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    You know where the fence is located? Then it's easy but if you want it to find fence it will be little harder and more laggier
  5. Asparanc
    Offline

    Asparanc Active Member

    Joined:
    Feb 20, 2015
    Posts:
    210
    Minecraft User:
    Asparanc
    Yes sorry ^^

Share This Page

Advertisement