Pirate Cannons (launching active tnt with dispensers)

Discussion in 'Archived: Plugin Requests' started by Ikarirain, Mar 22, 2011.

  1. Offline

    Ikarirain

    I'm personally not a modder, but it sounds fairly easy to create. What I'm looking for is a plugin that modifies dispensed TNT blocks from a drop that can be picked up, to an activated TNT block that fires with the same characteristics (speed/velocity/angle) of an arrow.

    The effect would then be a simple, basic cannon that, when triggered, launches an active TNT block (the cannonball) in the direction the dispenser is facing. This would be very useful when used in conjunction with MoveCraft, allowing players to build these cannons on ships and take part in naval combat.
     
  2. Offline

    jmonk

    I'm not sure if this can be done easily. But I will look into it, see how it would work in bukkit. I'll try to report back when I know more about dispensers.
     
  3. Offline

    KoryuObihiro

    Bump. I know this is sort of an old thread, but I'm trying to figure out this exact problem for a plugin a friend and I are developing. I'm currently using the CraftTNTPrimed class for spawning the TNT (code template from here: http://forums.bukkit.org/threads/how-do-i-spawn-an-entity-thats-not-an-creature.6181/), I've done it successfully...I'm just not sure which of the obfuscated methods set the velocity vector, though. :\
     
  4. Offline

    retsrif

    Try to see what the methods return (inside the body too). Can give clues.
     
  5. Offline

    KoryuObihiro

    That's what I did, and I got it! It's the f(double x, double y, double z) method. :) I hope others can get something useful from this.
     
  6. Offline

    Ikarirain

    Bump for any new news? (more like I dont want the thread to be lost and forgotten after three days, lol).
     
  7. Offline

    bizzybusk

    seems like a good idea! definitly watching this thread..
     
  8. Offline

    KoryuObihiro

    @Ikarirain I've actually coded a dispenser cannon that turns on when am adjacent sign with the following parameters is powered by redstone:

    [cannon]
    #power #angle

    Where power is a double that's divided by 100 for vector math, and the Angle is an int. The vector given to the TNT is based upon the facing of the dispenser, and it works like a charm. Sorry to have forgotten to post back.

    Something else that may catch your interest is that yesterday I also programmed it to accept sand...and shoot falling sand! :p
     
  9. Offline

    Ikarirain

    By adjacent, you mean above/below/beside right? And how limited are the parameters? I wouldnt want people with overpowered cannons firing halfway across the map because of a high power setting, lol.
     
  10. Offline

    KoryuObihiro

    Yes, I've limited the power to less than 2, or in this case 200. The maximum absolute value for an angle is 90, for obvious reasons. :p If you have Hamachi, I can PM you my server's info - I've been too lazy to forward ports yet.

    EDIT: Anybody who wants the info can just PM me. I should be available to show people things at flexible hours, and when I'm not there I don't mind people just running around on it.
     
  11. Offline

    zytherxy

    That. Is. Amazing. I would love to have have cannons to just a dispenser, then I could make normal sized ships!
    @KoryuObihiro I'm lost, do you have it working? Because if you do, and even if it's rough, put it in submissions or something of that order, I would love to see that on my server. [Not mine, mine. But you get the idea]
     
  12. Offline

    KoryuObihiro

    A friend and I are working on a plugin for just that, actually. :) If you want to see the plugin in action, PM me! And have Hamachi ready. :p

    @Ikarirain Actually, what's funny is if you put the power too high, it'll force the server to generate new chunks wherever the TNT wanders that players haven't been before...LOL

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

    ZeusHerscher

    that would be cool:D
     
  14. Offline

    bfanboy

    Kory you are my new hero
     
  15. Offline

    bfanboy

    Any news or progress reports on this? I'm salivating over here.
     
  16. Offline

    KoryuObihiro

    LOL, it's been done since shortly after I posted here. Again....anyone who wants a demonstration needs to come onto my server, as the plugin I'm helping to develop is still underway. Shoot me a message on my profile or PM me if you're interested.
     
  17. Offline

    bfanboy

    Thanks again for showing me this great plugin. It is going to be VERY popular! I think you are very close if not already at a stage acceptable for an alpha release. I am running many plugins on my server and would be willing to throw yours in to see if there are any compatibility issues. Also I am not very talented but if there is anything else I can help with let me know. Again, great job.
     
  18. Offline

    KoryuObihiro

    :p Thanks. I guess you're right, we're pretty close to release...just a couple more bugs to maim!
     
  19. Offline

    bfanboy

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]


    Almost done :)
     
  20. Offline

    KoryuObihiro

  21. Offline

    vlamer12

    How many more days will it take??? I have been looking for a mod like this for 2 weeks now. THANKS ALOT. :D
    Big fan:D

    Grzzz

    vlamer12
     
  22. Offline

    KoryuObihiro

  23. Offline

    vlamer12

    Umh, a very noobish question. How do i pm:S
     
  24. Offline

    MisanthropX

  25. Offline

    lulzz

    Sounds great, but remember about possibility of changing distance of shoot TNT.
    What about .txt file? You could save length there.
     
  26. Offline

    KoryuObihiro

    @lulzz You just use a sign for parameters. No need for globalized cannons stats.
     
  27. this + movecraft = [diamond] * alot
     
  28. Offline

    bfanboy

  29. Offline

    KoryuObihiro

    :D Niiiiice.
     
  30. Offline

    lulzz

    Any progress? I think that helicopters would be one of the best crafts for it. They are small, you can place dispensers under wings. Then just connect them by redstone and put lever in cabin.
    Battle of helicopters and ships would be really great.
     

Share This Page