Keeps fishhook underwater?

Discussion in 'Plugin Development' started by loman, Jul 10, 2021.

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

    loman

    Hello guys and I am facing a problem to keep a fishhook moving underwater. The fishhook moves well along x and z axis but not y axis.
    I've tried to add a vector on the fishhook every ticks but the fishhook still floats.
    I've tried to teleport the fishhook underwater every ticks but seems it doesn't work.
    I've also tried to set the fishhook as a passenger of an invisible armour stand, however, when I add a vector on the armour stand, it doesn't move.
    Can anyone please give me a hand and help with my problem? Thanks guys.
    p.s. working with 1.16.5
     
    Last edited: Jul 10, 2021
  2. Offline

    Tim_M

    Have you tried to disabling gravity? (On your fishhook)
    Code:
    Entity.setGravity(false)
    
    Edit:
    When working with armor stands I found that teleporting them in small increments over time (with BukkitScheduler thing) makes smooth movement, however I have no idea adding Velocity doesn't work.
    Edit2:
    Also if you posted your code that makes the fishing hook move would be helpful.
     
    Last edited: Jul 26, 2021
Thread Status:
Not open for further replies.

Share This Page