mojira.dev
MCPE-240716

Custom block rendering component validation does not consider permutation cases correctly

Currently, the engine enforces that the geometry and material instance components be declared together in root components. If one is given, the other must be; if neither are given, no checks are run.

When failing, the engine should emit a content log error. This is not the case in one special circumstance: when one component is declared in permutations but the other isn’t. Realistically, the engine should error on any permutation that has one component but not the other. Basic heuristics should not be applied at the parsing level to attempt to determine failures.

Demonstration

The attached image (somewhat) demonstrates the issue. The custom block is being displayed as though unknown. The custom block in question is given simply as:

{
	"format_version": "1.26.40",
	"minecraft:block": {
		"description": {"identifier": "bug_validation:custom_block"},
		
		"permutations": [
			{
				"condition": "true",
				"components": {
					"minecraft:geometry": "minecraft:geometry.cross"
				}
			}
		]
	}
}

The interesting thing is that the present block is not actually an unknown block. Further, no content log errors are emitted to help diagnose the problem.

Reproduction

This example is 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 2

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

[media][media]

This issue has been reviewed by our team.

Please add new, relevant information if it helps us understand or reproduce the issue. To show that you’re affected, use the vote feature rather than commenting.

If a fix is implemented, it will be listed in our official changelogs.

For major outages or urgent assistance, visit the Minecraft Help Center.

Ciosciaa

(Unassigned)

1688993

Confirmed

Multiple

26.40.31 Preview

Retrieved