mojira.dev
MC-276141

Instrument component no longer works with use_cooldown

Previously, in 24w34a, I could utilise both instrument and use_cooldown components, which allowed for versatile cooldown programming. In 24w35a, the use_cooldown component no longer triggers on release.

Steps to Reproduce

Acquire a goat horn with a use_cooldown.

/give @s minecraft:goat_horn[minecraft:use_cooldown={seconds:1}]

When it is played, the on-press (instrument) cooldown triggers as normal. However, when releasing right-click, the on-release cooldown does not trigger and override the on-use cooldown as it did back in 24w34a.

Using both components, one can program various sorts of effects. Examples include:

  • A fire breath spell that (on-press) can be channelled for up to 3 seconds, until going on a longer (on-release) cooldown.

  • A wand that can be held indefinitely to aim (like a bow), then fires on release, going on a cooldown.

If another solution is devised in the future that allows for these possibilities, it would be ideal. But for now, goat horns are love, and life.

Linked issues

Attachments

Comments 5

Despite the data saying the horn has a 1s cooldown, the item cooldown is much longer

[media]

This is because cooldowns are provided by the instrument registry, used by the goat horn. It would be a nice idea to allow use_cooldown to overwrite it, but that'd more fir with a change request than a bug. You can achieve the 1 second cooldown by creating another instrument ID (with the same sound) and using that instead.

My request is a completely different thing from what you described. These cooldowns are used for different purposes.

They both set the item cooldown on using the item... there is no difference at all, aside from one being a field in the instrument registry, and the other being an item component. The registry just has priority over the item component.

And you just said it yourself: "My request".

They are not the same cooldown. The instrument cooldown triggers right upon using, and the consumable cooldown triggers upon 'finishing' the usage. For goat horns, the consumable cooldown triggers after I've hold right click for the entire duration of the instrument.

And yes, while I say it is a request, it actually did work like I wanted, for exactly one snapshot, before being changed to how it is now. And I'm seeing that you still fail to get my point, so stop replying to me until you do.

proppinbags

(Unassigned)

1317868

Confirmed

Expansion B

Low

Items

24w35a, 1.21.3, 1.21.4 Release Candidate 1

Retrieved