Issue with blocks.place() – Coral blocks disappear immediately when placed in water (Minecraft Education)
Hello,
I'd like to report an issue in Minecraft Education Edition involving the use of the blocks.place()
function in code. This problem affects all coral block types (e.g., bubble coral).
While placing coral blocks manually in water works correctly (the coral remains alive when fully submerged), attempting to do the same using code results in the coral disappearing instantly — as if it wasn't placed in water or properly "waterlogged".
def on_item_interacted():
playerpos = player.position()
coral_pos = playerpos.add(pos(1, 0, 0))
# Place sand at the bottom
blocks.place(SAND, coral_pos)
# Add water above the sand
blocks.place(WATER, coral_pos.add(pos(0, 1, 0)))
# Place coral in the water
blocks.place(BUBBLE_CORAL, coral_pos.add(pos(0, 1, 0))) # --> coral disappears
player.on_item_interacted(IRON_SHOVEL, on_item_interacted)
It seems that blocks.place()
does not correctly handle blocks that require being waterlogged. As a result, corals always die immediately after being placed — even if the target block appears to contain water.
I would expect that calling blocks.place(BUBBLE_CORAL, ...)
into a block containing water would result in a living coral block, just like when placing it manually in the game.
Thank you for reviewing this issue. I hope it can be addressed in a future update, as it currently limits the ability to create underwater environments through code in Minecraft Education Edition.
Please sign in to leave a comment.
Comments
0 comments