Typically, the Pick Block action can be used on blocks inside a Vanilla flower pot. This returns the potted block instead of the pot. Custom blocks generally reflect this behavior. However, if the custom block has an item override, this behavior fails.
Demonstration
Below is a demonstration of the bug:
The Pick Block action is used on each successive block. Shown in Creative mode, the custom block with an item override does not return an item to the hotbar like it should.
Reproduction
Although related to blocks, reproduction of this bug involves an item definition overriding the auto-generated item for a custom block. Shown below are the block and item definitions respectively:
{
"format_version": "1.26.0",
"minecraft:block": {
"description": {"identifier": "bug_pottability:custom_block_with_item_override"},
"components": {
"minecraft:geometry": "minecraft:geometry.cross",
"minecraft:material_instances": {
"*": {
"render_method": "alpha_test_single_sided",
"texture": "dandelion",
"face_dimming": false,
"ambient_occlusion": false
}
},
"minecraft:flower_pottable": {}
}
}
}{
"format_version": "1.26.0",
"minecraft:item": {
"description": {"identifier": "bug_pottability:custom_block_with_item_override"},
"components": {
"minecraft:display_name": {
"value": "tile.bug_pottability:custom_block_with_item_override.name"
},
"minecraft:block_placer": {
"block": "bug_pottability:custom_block_with_item_override",
"replace_block_item": true
}
}
}
}This example is taken from the behavior pack in the following world attached for convenience:
This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Also included is a demonstration of the working behavior when no item override is present for a custom block.
Attachments
Comments 0
No comments.