Custom blocks can be made to act like Vanilla stairs by using the minecraft:corner_and_cardinal_direction state in the minecraft:placement_direction trait. Unfortunately, this trait can fail to apply corner states correctly. This has been observed with inner self-connections but may exist in more circumstances.
Workaround available
The minecraft:connection trait can be enabled to make corner connections work as expected. However, this is unreasonable, as it multiplies the number of permutations by 16.
Demonstration
This bug can be seen in the following screenshot:
The corner states are being set to "none”. Other situations, including cornering with Vanilla stairs, work correctly:
Reproduction
The code below was used for the custom calcite stairs shown above:
{
"format_version": "1.26",
"minecraft:block": {
"description": {
"identifier": "bug_stairs:custom_stairs_without_connection",
"traits": {
"minecraft:placement_position": {
"enabled_states": ["minecraft:vertical_half"]
},
"minecraft:placement_direction": {
"enabled_states": ["minecraft:corner_and_cardinal_direction"],
"blocks_to_corner_with": [{"tags": "q.all_tags('minecraft:cornerable_stairs')"}]
}
}
},
"components": {
"tag:minecraft:cornerable_stairs": {},
"minecraft:geometry": {
"identifier": "geometry.bug_stairs.stairs.right_side_up",
"bone_visibility": {
"east": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"east.southwest": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'inner_right'",
"east.northwest": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'inner_left'",
"west": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"west.southeast": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'inner_left'",
"west.northeast": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'inner_right'",
"south": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"south.northeast": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'inner_left'",
"south.northwest": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'inner_right'",
"north": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"north.southeast": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'inner_right'",
"north.southwest": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'inner_left'",
"northwest": "(q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'outer_right') || (q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'outer_left')",
"southwest": "(q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'outer_left') || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'outer_right')",
"northeast": "(q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'outer_left') || (q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'outer_right')",
"southeast": "(q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'outer_right') || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'outer_left')"
}
},
"minecraft:material_instances": {
"*": {"texture": "calcite"}
}
},
"permutations": [
{
"condition": "q.block_state('minecraft:vertical_half') == 'top'",
"components": {
"minecraft:geometry": {
"identifier": "geometry.bug_stairs.stairs.upside_down",
"bone_visibility": {
"east": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"east.southwest": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'inner_right'",
"east.northwest": "q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'inner_left'",
"west": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"west.southeast": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'inner_left'",
"west.northeast": "q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'inner_right'",
"south": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"south.northeast": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'inner_left'",
"south.northwest": "q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'inner_right'",
"north": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') != 'outer_left' && q.block_state('minecraft:corner') != 'outer_right'",
"north.southeast": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'inner_right'",
"north.southwest": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'inner_left'",
"northwest": "(q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'outer_right') || (q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'outer_left')",
"southwest": "(q.block_state('minecraft:cardinal_direction') == 'west' && q.block_state('minecraft:corner') == 'outer_left') || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'outer_right')",
"northeast": "(q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'outer_left') || (q.block_state('minecraft:cardinal_direction') == 'north' && q.block_state('minecraft:corner') == 'outer_right')",
"southeast": "(q.block_state('minecraft:cardinal_direction') == 'east' && q.block_state('minecraft:corner') == 'outer_right') || (q.block_state('minecraft:cardinal_direction') == 'south' && q.block_state('minecraft:corner') == 'outer_left')"
}
},
"minecraft:material_instances": {
"*": {"texture": "calcite"}
}
}
}
]
}
}The bone visibility can be safely ignored; it is the states themselves that are not being applied properly.
The code was taken from the behavior pack inside the following world:
This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Also included are demos involving custom stairs that include the minecraft:connection block trait.
This appears to duplicate MCPE-232019.