JannisX11 / blockbench

Blockbench - A low poly 3D model editor
https://www.blockbench.net
GNU General Public License v3.0
3.05k stars 271 forks source link

Texture field in bedrock entity project defaults to bool `false` instead of expected no definition #2340

Closed imIrony closed 1 month ago

imIrony commented 1 month ago

What are you trying to do, and what do you expect to happen?

Saving a Blockbench project in bedrock entity format should resolve the texture field within a faces object array as an int if there is a valid texture or removed completely if there isn't a valid texture.

What happens instead?

Saving a Blockbench project in bedrock entity format causes the texture field within a faces object array to resolve as a bool false if there isn't a valid texture and as an int if there is a valid texture.

Unsure if this change was made intentionally, if so please close this issue with confirmation. Currently doesn't make sense for texture to accept 2 different types in this scenario.

Model format in which the issue occurs

Bedrock Entity

Blockbench variant

Program

Blockbench version

4.10.1

Operating System

Windows 11

Installed Blockbench plugins

No response

JannisX11 commented 1 month ago

This was a versioned change to resolve an issue where saving and opening a project would assign textures to faces explicitly, in formats that are single-texture based and shouldn't have textures explicitly assigned to faces: https://www.blockbench.net/wiki/

However, you are right, the field should be omitted in this case instead of being set to false. false is consistent with how the data is handled internally, but to be consistent with previous versions of the bbmodel format, omitting the field would actually be correct.