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

Spawn a Snowball as Projectile

Comments in 'Plugin Development' started by TonyDroide, Oct 30, 2015.

  1. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Can someone help me with the code for Spawn a Snowball as Projectile?
    - Thanks.



    Note: If you're Gamecrafter, please do not answer this if you will not help.

  2. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Can you please post your code?
  3. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    I haven't a code :p that's what i need, the code for spawn a Snowball as projectile.
  4. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Can you please specifically describe projectile? do you mean like a gun or a canon?
  5. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    PHP:
    $nbt = new Compound("", ["Pos" => new Enum("Pos", [new Double(""$sender->getx()),new Double(""$sender->gety() + $sender->getEyeHeight()),new Double(""$sender->getz()) ]),"Motion" => new Enum("Motion", [new Double("", -sin($sender->getyaw() / 180 M_PI) * cos($sender->getPitch() / 180 M_PI)),new Double("", -sin($sender->getPitch() / 180 M_PI)),new Double(""cos($sender->getyaw() / 180 M_PI) * cos($sender->getPitch() / 180 M_PI)) ]),"Rotation" => new Enum("Rotation", [new Float(""$sender->getyaw()),new Float(""$sender->getPitch()) ]) ]);
    $arrow = new Arrow($sender->chunk$nbt$sender);
    $ev = new EntityShootBowEvent($senderItem::get(26400), $arrow1.5);
    $this->getServer(0)->getPluginManager()->callEvent($ev);
    if(
    $ev->isCancelled()) $arrow->kill();
    else 
    $arrow->spawnToAll();
    return 
    true;
  6. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Like a gun xd
  7. FuryTacticz
    Offline

    FuryTacticz New Member

    Joined:
    Aug 31, 2015
    Posts:
    23
    Minecraft User:
    FuryTacticz
    I have a working gun plugin made :p
  8. M3fansKingdom2
    Offline

    M3fansKingdom2 New Member

    Joined:
    Oct 30, 2015
    Posts:
    8
    Minecraft User:
    M3fansKingdom2
  9. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    This is Plugin Development... That plugin has nothing to do with this.
    Taha_The_Hacker likes this.
  10. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
  11. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
  12. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    Join My Video And DownLoad ^_^
  13. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    ? The plugin does not exist :p

    EDIT: Found it :DBut why add so many snowballs? The code is messed up :p
    Last edited: Nov 2, 2015
  14. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    Thank you for the suggestion
  15. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    My Server Have Lagg So
    Downright problems in the formation of gunshot
  16. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    hey there the shovel is using depracated call back task
    [Server thread/WARNING]: A plugin attempted to register a deprecated CallbackTask (Callback#CallOfDutyNawaf1b\CallOfDutyNawaf1b::NawafCraft1b)
  17. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    That plugin will lag your serevr...
  18. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    it works well with a 2gb server 2 core by leet.cc
  19. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    The code is messed up :p
  20. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    well somewhat yes some random indents etc but who care even someone that have basic oop can read it ex me

Share This Page

Advertisement