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

SnowBall Block

Comments in 'Plugin Development' started by Marcelo234, Apr 17, 2016.

  1. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    Hey Guys...How to get the Block which the SnowBall will hit after the SnowBall will throw? Thanks Marcelo234
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Use ProjectileHitEvent.
  3. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    Yes sure! But how to get the Block? x,y,z,world
  4. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    Get the projectile's position & get the block at that position.
  5. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    Can you give me a Part of the Code please?
  6. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    PHP:
    $projectile->getLevel()->getBlock(new Vector3($projectile->x$projectile->y$projectile->z));
  7. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    What is $projectile?
  8. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    Figure it on your own. You can't get help on everything...
  9. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    $projectile = $event->getEntity ();???
  10. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    Yes.
    Legoboy0215 likes this.

Share This Page

Advertisement