IndyPets - Independent Pets (Fabric)

IndyPets - Independent Pets (Fabric)

128k Downloads

Suggestion/Request: Config to let the "Goat Horn" item serve as the whistle

HatTrkPatrk opened this issue ยท 4 comments

commented

Minecraft added Goat Horns in 1.19 and AFAIK they're just a fun item without any actual purpose.

Could you make it so the Goat Horn toggles your pets between follow and independent when you fully "sound it"? I don't know if this is possible to do without client-side code but I'm very hopeful so! Either instead of the commands /indypets whistle and /indypets unwhistle or in addition to them.

If it could be configurable to enable/disable that'd be even better :)

And thank you for the awesome mod, this is a feature of tamed pets/followers that I will never be able to play Minecraft without again!

commented

I will try the test release out today. Thank you! And sorry I didn't respond in time to answer your questions, I've been on a trip for the last few days.

commented

Goat Horns do have a purpose: They can be heard by other nearby players, so they can be used for communication.
IndyPets' whistle sound effect on the other hand is client-side only, so it's different in that aspect.

It is certainly possible to use Goat Horns as a toggle without client modification, though it's not quite clear how exactly they should work, so here's a bunch of questions/thoughts:
Should all Goat Horns have that behavior, or only certain ones?
Should they all toggle, or should e.g. one be for whistle, another one for unwhistle?

I imagine it could be a little confusing if the same sound could mean "follow me" but also "dismissed" - which is why I added separate sounds for the whistle and unwhistle hotkeys.

Hm... It should be theoretically possible to configure each type of horn separately, maybe like
/indypets horn <horn_type> <option>
where <horn_type> is the concrete type like ponder_goat_horn, or * for all of them at once and <option> would be something like toggle / whistle / unwhistle / disabled (default).
So to make all horns toggle, one could do /indypets horn * toggle.

About the "toggling":
The default whistle keybind doesn't actually toggle each pet, but it alternates between whistling and unwhistling.
That is so that when you e.g. come home and dismiss your pets, it doesn't make your other pets follow you.
I'd make Goat Horns the same way, though there's one caveat:
When the whistle/horn is in the wrong state, with the hotkey you can just immediately whistle again to fix it, but Goat Horns have a cooldown you'd need to wait for.
(Note to self: I need to save that state in the config, so it doesn't get lost on relog.)

You also said horns should toggle "when you fully sound it" - do you mean it should wait until the end of the sound?
Because of sounds being client-side, I don't think that's possible server-side, though I could maybe add a like 3s delay to it...?
Not sure if that's a good idea though.

Another random idea to consider:
Sounding the horn while standing: follow
Sounding the horn while sneaking: dismiss
Might be better than a toggle because it gives more control, and has no "wrong state and having to wait" issue.

I also thought about changing the pitch of the "unwhistle" horn sound to distinguish the sounds a little - though the thing I don't like about that is that this is kinda a feature in itself since other players can hear them - like it's almost "too cool" to just be about controlling your pets.
(Same with the whistle sound effects - even if it were possible, I'm still not sure I'd make them not client-side only.)

commented

Progress!
gui
command
The command is only for vanilla players (same as with the /indypets config command).
I didn't manage to add the * option due to limitations of Mojang's Brigadier - it seems this is only solvable with client-side modification.

I put a test release for 1.21(.1) here if you wanna give it a try.
It should be fully functional, just missing some small bibs and bobs here and there - or as one says:
The last 10% of the work are 90% of the work.

commented

Just released 1.4.1 with the Goat Horn option!
Compared to the test version, I added a Whistle / Sneak Unwhistle option as well but otherwise it's pretty much the same.

Let me know if there's any issues.