How to make a projectile unaffected by water?

Started by TheCatalystGaming on Sun, 08/16/2020 - 22:31

Topic category: Help with modding (Java Edition)

Last seen on 21:45, 23. Sep 2021
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a projectile unaffected by water?
Sun, 08/16/2020 - 22:31

I'm trying to make a harpoon gun, the advantage of which is supposed to be that the projectile isn't impeded by water. Unfortunately, I don't know how to actually do this. Any help would be appreciated.

Last seen on 06:50, 22. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If you are willing to change…
Mon, 08/17/2020 - 08:05

If you are willing to change your harpoon to a living entity, you can have it save its horizontal velocities to a NBT tag when it spawns, and then set its velocity to those values every tick.

The tricky part of doing this is making sure your harpoon flies in the right direction originally (once the velocity is saved and repeating, it should continue fine, so the original push is the only hard part).

I haven't tried it to see how it works, but this post might be able to help give that initial push: https://mcreator.net/forum/61838/how-accelerate-player-direction-they-are-looking?page=0

Last seen on 21:45, 23. Sep 2021
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thats a good idea, I'll try…
Mon, 08/17/2020 - 20:50

Thats a good idea, I'll try that.

Also the post you linked was posted by me, I ended up figuring that out myself eventually so I should be able to copy what I done with that to the harpoon. Thanks for the help!

Last seen on 06:50, 22. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Haha! Sorry, I didn't notice…
Mon, 08/17/2020 - 21:02

Haha! Sorry, I didn't notice. :)

You're welcome!

Last seen on 17:43, 25. Sep 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
did work?
Thu, 08/26/2021 - 20:45

did work?