When using a jigsaw, structure block, test instance block or test block on singleplayer if the block itself gets removed player still remains in UI. Which is unlike command blocks and other ui blocks.
I have a datapack creative_escape_room that uses default_block_use advancement trigger to detect if a block from a custom tag special_blocks has been interacted with. After that a function is called that sets up a raytrace to find that block and delete it.
The function path goes like this: (advancement)any_special_block.json → (function)cer:micro/special_block_prevention → (function)cer:micro/remove_special_block_raytrace → (function)cer:micro/remove_special_block
To reproduce
Place an impulse command block and give it the command
execute at @p run setblock ~ ~-1 ~ air
Set up a button with several 4-tick repeaters leading to the command block
Place a jigsaw, structure or test block under yourself
Open to LAN
Press the button, then quickly enter the UI of the block below you
❌ When the block is deleted, you remain in its UI
Linked issues
relates to 2
Attachments
Comments 0
No comments.