mojira.dev
MCPE-237909

Game crashes when setting color of cloned dyeable item

Minecraft is guaranteed to crash when using scripting to try and set the color of an ItemDyeableComponent that is no longer valid.

Demonstration

The attached video attempts to demonstrate the issue. A script is set up such that when any Vanilla button is pressed in this world, a script runs that clones the held item and attempts to set that clone’s dye color, if relevant. The custom blue-dyed snowball item in the video meets the criteria and causes a crash when held and the button is pushed.

Reproduction

The crash occurs with any custom dyeable item when the isValid reference is not respected on the ItemDyeableComponent.

The demo video and code are taken from the behavior pack in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Ciosciaa

(Unassigned)

Unconfirmed

Multiple

26.20.23/24 Preview

Retrieved