Fishing Line - Grappling Hook

Discussion in 'Plugin Development' started by awesomelemonade, Oct 19, 2013.

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

    awesomelemonade

    Hi, I'm creating a grappling hook plugin (Or... At least part of it)

    And.. I'm having trouble with the fishing line. I can't find anything in the api, searched around the forums, and can't find a solution. I seen one post saying that you need to use NMS code (Not sure what that is, but I believe you use the bukkit server file)

    My Question: How do I spawn a fishing line? And the hook hooking a player. And detecting where the end of the fishing rod is.

    My Logic: Player shoots fishing rod, hits a block, presses forward, moves towards fishing line. Right click to get out of the fishing rod.

    The problem is. Controlling the velocity of the player is hard, because there ARE going to be outside forces like damages from other players.

    Thanks in advanced,
    -lemon
     
  2. Offline

    Botifier

    hasn't this already been done?
    and yes it would be hard
     
  3. Offline

    awesomelemonade


    Done where?
    Perhaps I hope there isn't a place I searched?

    Wow.. I fail to see it is in the plugins sections: However...

    I'm not sure if I am able to decomiple it and look at the code... am I?

    And this grappling hook is PART of a plugin..

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

    user_90854156

    Well, you're able to decompile the plugin and look at the code as long as you don't copy it and release it as your 'own' plugin.
     
  5. Offline

    awesomelemonade

    One question: How would I exactly decompile it? Using winrar? Or.. a software?

    I tried winrar, gave me .class files. not .java.
     
  6. Offline

    Chinwe

  7. Offline

    awesomelemonade

    Aha! Thanks, time to look into it..
     
  8. Offline

    awesomelemonade

    Sorry for bumping it, however:

    The Grappling hook plugin I downloaded and decompiled and tested is not was what I was looking for.

    I was looking for one where I could slowly go up towards the line by jumping (Pressing space) and you could swing and such
     
  9. Offline

    chasechocolate

  10. Offline

    awesomelemonade

    chasechocolate
    Yes, I believe that is NMS code, how would I go about this? Creating the fishing line string that is.
    I saw that link in the other post around when I searched the forums. I currently do not know how to deal with NMS code and I have no idea what it is. Can someone please tell me what it is?

    Update: I've researched, and besides finding a way to make a string, I would like to know if there is an event for when the fishing bobbing thingy hits something. When it hits something, I want to cancel it and create a string with grappling hook...

    Sum it up: Is there an event for when a fishing thing hits something Ex: A block

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

    awesomelemonade

    Bump!
    I need to know what NMS code is specifically, I'm confused :/
     
  12. Offline

    mattrick

    1. Don't double post.
    2. PlayerFishEvent gets when the player retracts the fishing rod. You can use e.getState(State.IN_BLOCK) or something like that.
    3. Setting the veocity is hard. I just teleport the player, but you can use hook.getLocation() and set the players velocity towards the hook.
     
  13. Offline

    SwiftDev

    If you have a look at the (currently rather outdated) source for godpowers you can see how we do super jumps using velocity. The code there should be fairly easy to port over to adding velocity towards a block
     
  14. Offline

    TheUpdater

    set player volicity etch second to go toward the block it hited be creative =D i used volivity
    to make jungle line to jump from etch to etch... took awile and alot of code just to make it work =( and it is till bad
     
  15. Offline

    Garris0n

    He had to double post to bump it.
     
  16. Offline

    mattrick

    Oh. "Wednesday" looked like "Yesterday". My bad.....
     
  17. Offline

    awesomelemonade

    BUMP! I need this... I am serious.. which is why I am bumping this..
     
Thread Status:
Not open for further replies.

Share This Page