Resource [1.8] MoreProjectiles

Discussion in 'Plugin Help/Development/Requests' started by stirante, Sep 1, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    BungeeTheCookie

    Thanks!
     
  2. Offline

    bossomeness

    stirante So it would now look like this?
    Code:
        @EventHandler
        public void onThrow(PlayerInteractEvent e) {
            Player player = e.getPlayer();
            if (e.getAction() == Action.RIGHT_CLICK_AIR
                    || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
                ItemProjectile projectile = new ItemProjectile("Smoke Bomb",
                        player.getLocation(), pl.sbI, e.getPlayer(), 5);
            }
        }
    The "pl.sbI" is the smoke bomb item that a player gets when they craft it.
     
  3. Offline

    BungeeTheCookie

    Thank you for adding TNTProjectile. I can't wait to see what more projectiles you will have in store :D
     
  4. Offline

    stirante

    bossomeness Yes, but there is no need for storing projectile in local variable unless you plan to change it later in if block.
     
  5. Offline

    zDylann

    stirante I've been using this for a few weeks now and it works great! Just some questions that might be easily answered by you. Is there a way I can remove the block projectile with a delayed task? I have a lot of issues with the blocks hitting the ground and not registering that it actually hit the block, so maybe I can make something to remove the projectile after 10-15 seconds to prevent this from happening. Another note the blocks that are getting stuck aren't client side, everyone on the server can see them and breaking the blocks under where its stuck will usually just make it fall and break like its suppose to.
    EDIT: Also is there a way to stop the bouncing? :p
     
  6. Offline

    BungeeTheCookie

    stirante
    What projectile are you going to do next :D
     
  7. Offline

    stirante

    BungeeTheCookie Entity.
    zDylann I know this bug when sometimes collision is not detected, so I added this timer a long time ago :p
    Code:
            int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
            this.pickupDelay -= elapsedTicks;
            this.age += elapsedTicks;
            lastTick = MinecraftServer.currentTick;
            if (this.age >= 1000) {
                die();
            }
    What you mean "stop bouncing"? It's destroyed on collision but i'm thinking about cancelable events, so you can for example cancel event, add y velocity and make them bounce.
     
  8. Offline

    zDylann


    Thanks for the reply =], with the 'bouncing' I mean sometimes I will shoot a projectile and when it hits the ground instead of being destroyed it just bounces in another direction then breaks at the next location. Its not a big deal but if it didn't happen I'd be pretty satisfied.
     
  9. Offline

    stirante

    For me it never happened.
     
  10. Offline

    zDylann

    Not the best picture hard to get a good one by myself :p, but I'm aiming the projectile at the gold block and it will bounce from the gold block forward and go off the cliff, I can show you in-game if you would like, just have no clue how to fix it if you never have this issue.

    [​IMG]
     
  11. Offline

    stirante

    zDylann Thanks, found it and fixing it :D
     
  12. Offline

    BungeeTheCookie

    Another update. Oh boi.
     
  13. Offline

    zDylann

    Woot I'm not crazy
     
  14. Offline

    stirante

    BungeeTheCookie zDylann Can't find method which causes bouncing :/ Good thing is that I added new projectile :D It's still a bit bugged but works. Uploading right now new version :)
     
  15. Offline

    zDylann

    Alright :/, I'll test out your new projectile and let you know if I find anything!
     
  16. Offline

    BungeeTheCookie

    YAAAAAY (Also, could you update your thread, its a bit.. outdated ;)
     
  17. Offline

    stirante

    BungeeTheCookie Thread updated, sorry for that. I totally forgot about it :p
     
  18. Offline

    BungeeTheCookie

    Lol, its ok everyone makes mistakes :p
     
  19. Offline

    stirante

    BungeeTheCookie Few notes with new projectile
    1. Firework projectiles just lagged my mc client so i couldn't do anything for about 1 minute
    2. Item frame projectiles causes errors (probably paintings also)
    3. Arrow with my ProjectileScheduler looks funny
    4. If you are flying boat projectile will freeze in air until you will move
    5. Bat projectile are hard to control
     
  20. Offline

    BungeeTheCookie

    I love you. #NoHomo :p
     
    stirante likes this.
  21. Offline

    zDylann


    I too love you. #Homo
     
  22. Offline

    stirante

  23. Offline

    BungeeTheCookie

  24. Offline

    Techy4198

    stirante I seriously never saw that site until now?
     
  25. Offline

    callunxz

    How would I make the projectile damage mobs without using the event (CustomProjectileHitEvent)??
    Is it possible? I've got it to damage mobs in a radius when it hits the floor but I can't seem to be able to make it damage mobs, the projectile just shoots through it.

    TL;DR - How can I damage mobs without the event?
     
  26. Offline

    stirante

    callunxz You can't without using event. If you will use event, then just check hit type.
     
  27. Offline

    callunxz

    But since I have it in a different method so that it can be called and given random attributes, I can't use the event is there seriously no way around it?
     
  28. Offline

    stirante

    callunxz Save somewhere for example projectile name and in event do custom things according to name.
     
  29. Offline

    callunxz

    stirante Well, I tried the method but it still doesn't work, it just flies straight through the mob. Is this happening to anyone else?
     
  30. Offline

    stirante

    Can you PM me your code?
     
Thread Status:
Not open for further replies.

Share This Page