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

BlockUpdateEvent?

Comments in 'Plugin Development' started by zombie_Power, Nov 2, 2015.

  1. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Greetings,

    My first question: I want to know if, I can change the block into another block by utilising the task method.

    Example: After 1 second, the 5 glowstones turn into dirt.

    My second question is that, if block provides its own co-ordinates, how can I select a specific block.

    Example: Selecting the 5 glowstone blocks, from several other blocks..

    Regards,
    Zombie_Power
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Please note that coding is a pure activity of processing numbers (strings are internally stored as numbers) by operating, storing and reading numbers. There is no such concept as "select" a block as if you are a player. A programmer does not "select" a block as if he is a user.
    zombie_Power likes this.
  3. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Thanks for clearing it
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    So can you rephrase your question again? I fail to understand what you mean by "selecting" a block in code.
    Legoboy0215 likes this.
  5. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    I guess he means saving a Block in a Variable using its Coordinates.
    zombie_Power likes this.
  6. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    PHP:
    $level->getBlock(new Vector3($x$y$z));
    And just use a delayed task to change it to dirt.
    zombie_Power likes this.
  7. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    So basically, what @CraftYourBukkit means, but I don't want to save it or anything, I want to change a specific block to another block.
    I will try your method, before I try my concept :)

Share This Page

Advertisement