Mrbysco / ChocoCraft4

Continuation of ChocoCraft 3 but for 1.16+
https://www.curseforge.com/minecraft/mc-mods/chococraft
Other
7 stars 8 forks source link

[Suggestion]: Anti Drowning #66

Open Mezimaru opened 1 year ago

Mezimaru commented 1 year ago

General Info

Suggestion Description

I'd still love some way to prevent Chocobo submerged in water from drowning if dismounted when they're under the stay command. I personally am currently using

    if (this.isUnderWater()) {
        setNoAi(false);
        this.goalSelector.addGoal(0, this.follow);
        this.setMovementType(MovementType.FOLLOW_OWNER);
    }

But that's probably quite rudimentary, I'm sure you have another method you'd rather utilize

Love all the work you're doing <3

Mrbysco commented 1 year ago

I rather not attach an AI goal every tick that the chocobo is underwater and never remove the goal

Mezimaru commented 1 year ago

Hahaha yeah, which is why I said it was a quite rudimentary way of doing it ;P

Also, testing, I notice flying chocobo cannot submerge/swim the same way the blue+ chocobo can. Not sure if its a problem or anything, just something I noticed.

Mrbysco commented 1 year ago

I'm currently checking if the chocobo can stand on water because the chocobo's that can stand on water should also be able to swim more easily than the chocobo's that cant

Mezimaru commented 1 year ago

Right, but for example, you can't submerge in water and swim with a gold chocobo

On Thu, Jul 20, 2023, 12:59 PM Mrbysco @.***> wrote:

I'm currently checking if the chocobo can stand on water because the chocobo's that can stand on water should also be able to swim more easily than the chocobo's that cant

— Reply to this email directly, view it on GitHub https://github.com/Mrbysco/ChocoCraft4/issues/66#issuecomment-1644273218, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIACOV4DU5PLNIPJTAIBK7TXRFPWPANCNFSM6AAAAAA2RSLL2E . You are receiving this because you authored the thread.Message ID: @.***>

Mezimaru commented 1 year ago

Also looks like yellow/green Chocobo are still stuck continuously jumping on the water surface if your holding jump and continue to hold jump for a second or two when jumping into the water.

Just tinkering around, commenting out the jumping below seemed to fix it for me, also was unable to determine any detriment from commenting it out in playtesting

else if (onGround()) { jumpFromGround(); livingentity.setJumping(false); //this.setJumping(true); }

(Sorry, you're probably sick of me by now)