"Invalid color value" Assert happening while crafting custom items with the name "bed" in their file name
[1.18.2]
Partner Rank:
2
Partner Team Reporting:
Everbloom Studios
Verification builds:
1.17.4.1
Summary:
We've encountered a strange assert that been appearing when crafting a custom recipe for a custom item. Both of which contain the string "bed" within their IDs. The assert in question appears when attempting to craft said recipe utilizing the in-game recipe book.
Assert:
~~
Assertion failed: Invalid color value Condition is false: false Function: BlockColorUtil::fromInt in D:\a_work\1\s\handheld\src\common\world\level\block\BlockColor.cpp @ 61
We saw none of these asserts on the following Minecraft version.
- Minecraft Version: 1.17.4
Impact:
This only affects one map at current, but in the future this may affect anything that possibly contains the string "bed" within its IDs. This could slow down marketplace submission unnecessarily. The asserts may affect some player experiences if it happens to slow the game at all.
Repro Steps:
We're unsure of what the repro steps are but we suspect is has to do with a custom recipe file containing the string "bed" within its ID or within the item it outputs, and then attempting to craft it using the in-game recipe book. Has not yet been isolated. However the assert does not happen if you have already crafted a standard vanilla bed beforehand, so it may have to do with bed color initialization of some kind.
Expected Results:
The expected result is no issue whatsoever due to this not being an actual bed item or vanilla bed recipe, so it is expected that its reference to colors would be treated separately.