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

    stirante

    @PizzaPixelYou have example in first post and in lib you have test class.
     
  2. I haven't been able be stop the projectile from bouncing, how can I achieve this?
     
  3. Offline

    MisterErwin

    stirante: Any idea how to update it to 1.7.2?
    - Because I don't have any :/
    The orebfuscated function names ... hurt :/
     
  4. Offline

    Ultimate_n00b

    I will be needing this updated to 1.7 for when Minecade officially updates. If you could update, that would be great.
     
  5. Offline

    stirante

  6. Offline

    MisterErwin

    Well.... If I just "send" the new Packet, I don't see any tilecracks...:/ - So.... "In your face Gandalf!" (yepp - I had to do this :p)
     
    stirante likes this.
  7. Offline

    Ultimate_n00b

    Thank you. If you could tag me when you're done, that would be great.
     
  8. Offline

    DarkBladee12

    MisterErwin Did you rename it to blockcrack? Because that's the new name for it in 1.7!
     
  9. Offline

    stirante

    MisterErwin Ultimate_n00b Updated, but still untested.
    Ninja edit: I changed public int getBlockId() in ItemProjectileHitEvent and ItemProjectile to public Material getMaterial()
     
  10. Offline

    MisterErwin

    DarkBladee12 stirante: Thanks.... I guess I have to test it tomorrow (or tonight) - Sometimes schoolwork goes first :/
     
  11. Offline

    stirante

    MisterErwin Tested it. Works great, exp orbs still have delay after spawning, when you throw itemprojectile with item, particles are super fast, fixing it right now.

    EDIT: Fixed and updated.
     
    MisterErwin likes this.
  12. Offline

    BungeeTheCookie

    stirante
    I sooooo want to use this library, but it has that nms and OBC. Can you use reflection to make it version independent? Maybe CaptainBern knows with his reflection expertise.
     
  13. Offline

    Ultimate_n00b

    Love ya <3

    Not possible with reflection, as it extends classes.
     
    stirante likes this.
  14. Offline

    BungeeTheCookie

    There has to be another way. Everything is possible with Java. 100 years ago people thought humans wouldn't explore the moon, yet it happened. I know there is another way, we just haven't thought of it yet
     
  15. stirante likes this.
  16. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    That is a terrible suggestion, unless you think risking making unknown calls on the volatile internals of the server is a good idea.

    It's just a really bad idea in any situation where you're invoking methods, changing variables, etc.
     
    CaptainBern and stirante like this.
  17. Offline

    zDylann

    Is there a way I can get the 1.6.4 version of this?
     
  18. Offline

    stirante

    zDylann Here you have untested version for 1.6.2, so you only need to change packages.
     
    zDylann likes this.
  19. Please update it to the 1.7.2 CraftBukkit.
    I really need it.
     
  20. Offline

    stirante

    MinecraftShamrock It's updated to package version v1_7_R1 . I changed lib to newest development build and everything looks fine.
     
  21. Offline

    BungeeTheCookie

    I don't care about NMS any more. This is too good not to use. Thanks :D!

    stirante
    How about EntityProjectiles? Like TNTPrimed, or boats, or minecarts, or even LivingEntities like zombies!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  22. Offline

    stirante

    BungeeTheCookie I'll try to do something about that.

    EDIT: Honestly i don't see any good reason to add boats and minecarts as projectile and adding every living entitity would take me a lot of time. Right now I'll add tnt becouse it can make cool grenade :D
     
  23. Offline

    BungeeTheCookie

    You just add an entity argument to shoot an entity projectile. You don't have to code like 47 projectile classes, just make an argument (if it is possible).
     
  24. Offline

    bossomeness

    So how would I go about making a custom item (just an item with different name, lore, recipe, not a mod) into a projectile?

    Code:
    ItemProjectile projectile = new ItemProjectile("Smoke Bomb", player.getLocation(), /*Im not sure how to put a custom item here*/, /*do i just put a number here?*/);
    And then to do stuff with the projectile:

    Code:
        @EventHandler
        public void onHit(CustomProjectileHitEvent e){
            if (e.getName().equals("Smoke Bomb")){
                //Do stuff
            }
        }
     
  25. Offline

    stirante

    BungeeTheCookie It is possible but then it would need a 1 tick scheduler instead of on update method.
    bossomeness In actual version ItemProjectile constructor takes name location, itemstack, shooter and power.
     
  26. Offline

    BungeeTheCookie

    So can you use a 1 tick scheduler?
     
  27. Offline

    stirante

    BungeeTheCookie I can but it can look weird or lag or both. I will look at it later. Where I live is 02:33 AM
     
  28. Offline

    bossomeness

    stirante Oh ok. Thanks!

    So it would be:
    Code:
    ItemProjectile projectile = new ItemProjectile("Smoke Bomb", player.getLocation(), smokeBomb(), e.getPlayer(), 5);
    The "smokeBomb()" is a crafting recipe i have created.

    I tried that code, compiled it, and tested it. The crafting recipe works, and gives the item (with colored name and lore), but I can't throw it. I think I got the projectile code right, but I'm not exactly sure. I have put your API into my plugin, and it seems to work fine. The weird part is that there are no errors in the console.

    Please help me :'(

    My code.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  29. Offline

    BungeeTheCookie

    Ok, could you push this to GitHub?
     
  30. Offline

    stirante

    bossomeness
    1. You forgot @EventHandler annotation above onThrow method.
    2. Method shoot(ItemProjectile projectile) is useless becouse you shoot projectile in event outside if block. Delete method shoot and move creating ItemProjectile to if block.

    Sorry, but i hate github. That's why i included code in jar. I'll update the jar now with TNTProjectile.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
Thread Status:
Not open for further replies.

Share This Page