Commands: fold the block check into place_state's condition; cover /fill in the corpus

The comment names vanilla's rule (LevelChunk.setBlockState keeps or creates
the block entity when the block, not the state, is still there after
onPlace). The corpus checks the `enabled=false` flip, drops the cleanup lines
the group's closing /fill already does, and adds a powered hopper placed by
/fill, which goes through the same place_state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-24 19:49:37 +02:00
parent 493e5f8d3a
commit 0c6816811c
2 changed files with 9 additions and 10 deletions
+5 -5
View File
@@ -219,14 +219,14 @@ def world_blocks():
cmd('/clone 0 205 0 4 207 4 6 205 6 masked'),
cmd('/execute if blocks 0 205 0 4 207 4 6 205 6 all'),
cmd('/setblock 3 206 3 minecraft:air'),
# A hopper placed into power arrives `enabled=false` and must keep its block entity.
# A hopper placed into power turns `enabled=false` and keeps its block entity.
cmd('/setblock 5 205 5 minecraft:redstone_block'),
cmd('/setblock 5 206 5 minecraft:hopper[facing=down]'),
cmd('/data get block 5 206 5 Items'),
cmd('/setblock 5 206 5 minecraft:hopper'),
cmd('/execute if block 5 206 5 minecraft:hopper[enabled=false]'),
cmd('/item replace block 5 206 5 container.0 with minecraft:diamond 3'),
cmd('/data get block 5 206 5 Items[0].count'),
cmd('/setblock 5 206 5 minecraft:air'),
cmd('/setblock 5 205 5 minecraft:air'),
cmd('/fill 5 205 4 5 205 4 minecraft:hopper'),
cmd('/data get block 5 205 4 Items'),
cmd('/fill 0 200 0 15 228 15 air'),
cmd('/execute if block 0 300 0 air'),
cmd('/setblock 0 400 0 stone'),