mojira.dev
MCPE-237498

Custom multi-blocks do not respect survivability rules

Custom blocks with the minecraft:multi_block trait do not respect the minecraft:placement_filter component’s rules for survivability — maintaining their existence when their placement contract is broken. Both Vanilla multi-blocks and non-multi-block custom blocks do respect their placement filter component’s rules for survivability.

Demonstration

The attached videos demonstrate this issue. The custom block (glowstone texture) is correctly not placeable on any block available block but dirt. However, it does not get destroyed when the dirt beneath it gets destroyed. The Vanilla block (tall grass texture) does not have this issue.

Reproduction

The simplest example to demonstrate this issue is with the following block definition:

{
	"format_version": "1.26.20",
	"minecraft:block": {
		"description": {
			"identifier": "bug_multi_block:custom_block",
			"menu_category": {"category": "none"},
			
			"traits": {
				"minecraft:multi_block": {
					"enabled_states": ["minecraft:multi_block_part"],
					"direction": "up"
				}
			}
		},
		
		"components": {
			"minecraft:geometry": "minecraft:geometry.cross",
			"minecraft:material_instances": {
				"*": {"texture": "glowstone"}
			},
			
			"minecraft:selection_box": {"origin": [-4, 0, -4], "size": [8, 16, 8]},
			
			"minecraft:placement_filter": {
				"conditions": [
					{
						"allowed_faces": ["up"],
						"block_filter": [{"tags": "q.any_tag('dirt', 'grass')"}]
					}
				]
			}
		}
	}
}

The demo videos 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][media]

Ciosciaa

(Unassigned)

Unconfirmed

Multiple

26.20.22 Preview

Retrieved