mojira.dev
MCPE-242124

Ore feature replacement targets do not support tag lookups

Ore features use the may_replace array to specify the blocks that may be replaced by a given block within a replacement rule. These blocks are given via block specifiers (descriptors). Block specifiers support one of 2 modes: concrete and “filter”, the latter of which is used when an unspecified block type is needed. It is used in places such as block definition placement filters and single block feature replacement filters. Unfortunately, ore features use the concrete form, disallowing block tags from being used in this sensible location.

Demonstration

The attached screenshot demonstrates this issue. The ore feature is not even loaded; an error appears in the content log.

The following is the entire code of the ore feature in question:

{
	"format_version": "1.26.50",
	"minecraft:ore_feature": {
		"description": {"identifier": "bug_features:ore_feature"},
		
		"replace_rules": [
			{
				"places_block": "minecraft:glowstone",
				"may_replace": [{"tags": "q.all_tags('dirt')"}]
			}
		],
		"count": 32
	}
}

This should be a valid ore feature definition.

Reproduction

The demo screenshot 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.50.27 Preview

Retrieved