Making Water Entity Get out of water

Started by capitaojob on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making Water Entity Get out of water

I am making a dinosaur mod with an spinosaurs entity, and i am trying to make it swim and walk. I have already figured out a way of doing both by having two separated entities (spinosaurus and spinosaurusswimming), but the problem now is that, when it goes to water and starts swimming, i gave it a timer to turn back into a walking mob, but i don't know how to make him search for land

By now what i have is

When it enters the water, it turns into a swimming spino
After 2 minutes, it turns back into a walking spinosaurus and has 1 minute delay before the swimming procedure works again

Does anyone have any ideas on how to get him going to land when finished swimming?
Thanks

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might be able to set a…
Thu, 04/14/2022 - 20:00

You might be able to set a timer in the loaded entity update tick. When I t hits 0, have the swimming spino pathfind to land, and when it's walking and the timer hits zero, have it pathfind to water. please let me know your results, as I am trying to do something similar with drowned.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i set up said timer?
Sat, 01/27/2024 - 03:05

how do i set up said timer?