mojira.dev
MC-262633

Unused tripwire hook state combination "attached: false, powered: true" has its own model

The bug

Tripwire hooks with the "attached" state set to false and the "powered" state set to true are impossible to encounter in normal gameplay, since in order to be powered, tripwire hooks must necessarily be part of a tripwire circuit, and therefore attached. I've done in-depth testing to confirm that this is the case and that this block state combination cannot be encountered.

However, despite this, this unencounterable block state combination still has its own explicitly-defined model file "tripwire_hook_on.json", even though will never be seen in normal gameplay.

The only differences between this model and the attached on model is the lack of a tripwire element, as well as the fact that the ring is positioned differently, potentially as a fix for MC-69834 or some other issue that never got applied to the unattached powered tripwire hook since, again, it can't ever be encountered normally.

Note that this issue differs from some other unobtainable state combinations such as those of walls or redstone wire; those arise due to how the "multipart" specification works, whereas this tripwire case explicitly defines a model which can never be seen.

How to fix

I've attached an updated tripwire_hook.json blockstates file that points this state combination to the normal unpowered unattached tripwire hook model, so this can replace the existing tripwire_hook.json in the blockstates directory. The model file "tripwire_hook_on" can be deleted from the models/block directory as it will no longer be used at all by anything.

Attachments

Comments 4

Is it not used when breaking the tripwire right next to the hook?

It is not, that uses the "attached on" model.

It seems rather that that's the issue then, not the fact it got its own model.
I highly suggest reforming the report to be about the block state, rather than the model.

I’m pretty sure the issue here is that Minecraft doesn’t recognize that the tripwire hook detaches from the tripwire when you break the tripwire, which means that it uses the “tripwire_hook_attached_on” model when the tripwire powers on as you break the tripwire. It should use “tripwire_hook_on” when you break the tripwire, since the hook should no longer be attached to the string (because you broke it), but it instead uses “tripwire_hook_attached_on” before reverting to “tripwire_hook”. The issue is not with the blockstate or the model, but with the fact that minecraft doesn’t issue a “attached: false” tag to the tripwire hook when the tripwire hook turns on as a result of you breaking the string.

P.S. you can still get the “tripwire_hook_on” model in your world through use of a debug stick. Here is what all the tripwire hooks look like with a texture pack, the last one being “tripwire_hook_on”:

[media]

muzikbike

(Unassigned)

Confirmed

(Unassigned)

1.19.4, 1.20 Pre-release 1, 1.20.4

Retrieved