jeremyshannon / Exile

This repo is parked, moved to codeberg.org
https://codeberg.org/Mantar/Exile
GNU General Public License v3.0
16 stars 12 forks source link

patch for fish dying around glass; fixes #142, #145 #143

Closed Izzyb1234 closed 2 years ago

Izzyb1234 commented 2 years ago

I added the fishtank schematic to the doc dir. Created using worldedit. Found the main problem seems to be the fish dies before it has a chance to react to being out of water. Moving the health check until after the timer check seems to fix this. Fish now have time to fall because they're in water, but they don't move away from it on their own.

I duplicated and modified the swim from player function to swim from a pos. Seems to work, but notice it gets a little confused. Think this reflects my confusion on how yaw works so you may see an obvious fix to what I'm doing. It should be trying to do 180 from current direction, until it gets far enough away from the original position that there is more then .5 distance. I added this because initially there is little or no distance between them and it seemed to get confused about where to go. Was thining adding some randomness to the direction might help bt haven't tested that yet.

I left all the print statements in so you can see what I was testing. Found doing a /clearobjects then placing one fish in the tank at a time works best.