mojira.dev
MCPE-234654

Liquid detection block component does not respect transformation component rotation

The minecraft:liquid_detection component allows listing face directions that should block liquid flow to and from a block. This is handled via the stops_liquid_flowing_from_direction property. The faces given do not respect the rotation property from the minecraft:transformation component.

Rotation is otherwise very well respected across other block components, including:

  • minecraft:geometry

  • minecraft:collision_box

  • minecraft:selection_box

  • minecraft:redstone_producer

  • minecraft:leashable

The liquid detection component should likewise respect the transformation component’s rotation. It not doing so requires redundant redeclaration across permutations.

Demonstration

The following video shows a block whose liquid flow is defined as blocking in the east direction. However, the block also has a minecraft:transformation y-rotation of 180°. The west direction should therefore be blocked.

The first destroyed slab is in the east direction. Liquid should flow freely. The second destroyed slab is in the west direction. Liquid should not flow.

Reproduction

The code below was used for the above video:

{
	"format_version": "1.26.0",
	"minecraft:block": {
		"description": {"identifier": "bug_liquids:custom_block"},
		
		"components": {
			"minecraft:geometry": "minecraft:geometry.cross",
			"minecraft:material_instances": {
				"*": {"texture": "planks"}
			},
			
			"minecraft:transformation": {
				"rotation": [0, 180, 0]
			},
			
			"minecraft:liquid_detection": {
				"detection_rules": [
					{
						"can_contain_liquid": true,
						"stops_liquid_flowing_from_direction": ["east"]
					}
				]
			}
		}
	}
}

The code was taken from the behavior pack inside the following world:

[media]

This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such.

Attachments

Comments 0

No comments.

Ciosciaa

(Unassigned)

Unconfirmed

Multiple

26.0.26 Preview

Retrieved