-
Bug
-
Resolution: Fixed
-
Minecraft 16w44a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w17a, Minecraft 17w17b, Minecraft 1.12
-
Confirmed
When running /testforblock on iron bars, fences or panes the result is not as expected.
As can be seen in the attachment, I ran
/testforblock ~1 ~ ~ minecraft:iron_bars east=false
and
/testforblock ~1 ~ ~ minecraft:iron_bars east=true
directed at an iron_bars block with the block state east=true,north=false,west=false,south=false
What I expected to happen was the first command to NOT find the block and the second command to do find the block.
Instead, the opposite happened. The first command resulted in the block being found, despite the block state for "east=" not matching my criteria. The second command resulted in the block not being found, giving the message:
"The block at -144, 67, -125 had the data value of minecraft:iron_bars[east=false,north=false,south=false,west=false] (expected: east=true)"
Note: I was told to make an issue separate from MC-109353 even though both bugs seem similar.
Affected blocks
Last updated for 1.11.2
Blockstates | Properties |
---|---|
bed[part=foot] | occupied 1 |
chorus_plant | north, east, south, west, up, down |
dirt[variant=podzol], grass, mycelium | snowy |
wooden_door[half=lower], iron_door[half=lower] | hinge, powered |
wooden_door[half=upper], iron_door[half=upper] | facing, open |
all fences | north, east, south, west |
all fence gates | in_wall |
fire | north, east, south, west, upper |
flower_pot | contents |
iron_bars, glass_pane, stained_glass_pane | north, east, south, west |
powered_repeater, unpowered_repeater | locked |
redstone_wire | north, east, south, west |
all stairs | shape |
pumpkin_stem, melon_stem | facing |
tripwire | north, east, south, west |
vine | up |
cobblestone_wall | north, east, south, west, up |
1 If the occupied property of the foot part is false, but the head part true
Code analysis
For flower pots, see MC-109353
- is duplicated by
-
MC-109353 Detecting the block states of flower_pots doesn't work
- Resolved
-
MC-109891 Observers Can't Detect Redstone Wire's Side Change
- Resolved
-
MC-110533 Changes in melon/pumpkin stems don't get detected by observer
- Resolved
-
MC-110895 Detecting read-only blockstates always returns false
- Resolved
-
MC-127766 Observers not detecting melon stem facing block state changing
- Resolved
- relates to
-
MC-107664 Some events / actions do not trigger observers
- Open
-
MC-106127 Some blocks cannot be given certain block states
- Resolved