Some blocks cannot be placed facing a wall with /setblock or /fill + datavalues or block states
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation data value of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
(can't see due to MC-108054, may be affected if that's fixed) - (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
Environment
Windows 7, Java V7 Update51
Linked Issues
is duplicated by3
Created Issue:
Dispensers Cannot Be Placed Facing A Wall With /setblock + datavalues
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Environment
Windows 7, Java V7 Update51
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Update (Sept1): This behavior is also present in droppers and furnaces. Although not in hoppers, pistons, sticky pistons, chests, trapped chests or ender chests.
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Update (Sept 1): This behavior is also present in droppers and furnaces. Although not in hoppers, pistons, sticky pistons, chests, trapped chests or ender chests.
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Update (Sept 1): This behavior is also present in droppers and furnaces. Although not in hoppers, pistons, sticky pistons, chests, trapped chests or ender chests.
Update (Sept 2): Confirm bug is still present in official 1.8 release version
duplicates
is duplicated by
relates to
duplicates
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Update (Sept 1): This behavior is also present in droppers and furnaces. Although not in hoppers, pistons, sticky pistons, chests, trapped chests or ender chests.
Update (Sept 2): Confirm bug is still present in official 1.8 release version
Code analysis by Marcono1234 can be found in this comment.
relates to
DispensersCannotBePlacedFacingA WallWith /setblock + datavaluesDispensers/Dropper/Observer cannot be placed facing a wall with /setblock or /fill + datavalues or blockstate
Dispensers/Dropper/Observer cannot be placed facing a wall with /setblock or /fill + datavalues or blockstates
Using 1.8 Pre3
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Update (Sept 1): This behavior is also present in droppers and furnaces. Although not in hoppers, pistons, sticky pistons, chests, trapped chests or ender chests.
Update (Sept 2): Confirm bug is still present in official 1.8 release version
Code analysis by Marcono1234 can be found in this comment.
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
Dispensers/Dropper/Observercannot be placed facing a wall with /setblock or /fill + datavalues or blockstatesSome blocks cannot be placed facing a wall with /setblock or /fill + datavalues or blockstates
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
(van't see due to
MC-108054)- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
relates to
is duplicated by
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
(
van't see due toMC-108054)- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation datavalue of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
(can't see due to
MC-108054, may be affected if that's fixed)- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
When using /setblock to place a dispenser with a rotation datavalue, if the front of the block is against a wall the dispenser will point the opposite direction when placed.
To Replicate: Place a block. Attempt to spawn a dispenser one block north of it, with a rotation data value of 3 (Telling the dispenser to "look" south). The block will instead face north. Same happens for east/west.
Affects the following blocks:
- dropper
- dispenser
- observer
(can't see due to
MC-108054, may be affected if that's fixed)- (lit_)furnace
Code analysis by Marcono1234 can be found in this comment.
Some blocks cannot be placed facing a wall with /setblock or /fill + datavalues or block states
is duplicated by
Confirmed.
Possible related to
MC-12437Hi Q!
Cannot reproduce in 1.8.2-pre6, resolving to
MC-31365.Confirmed for
MC-80124)Confirmed for
Confirmed for
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the method net.minecraft.block.BlockDispenser.setDefaultDirection(World, BlockPos, IBlockState) is called after the block was placed. This means the method is also called when a player places a dispenser, despite the fact that afterwards the method net.minecraft.block.BlockDispenser.onBlockPlacedBy(World, BlockPos, IBlockState, EntityLivingBase, ItemStack) is called which uses the old rotation again.
Confirmed for 1.10
Also tested with fill command and got the same result. The command should have placed six droppers facing north. The first two had stone north of them and faced south instead. The next three had air and faced north. The last one had glass and faced north.
Can confirm in 1.11 snapshots easily using blockstates: /fill ~ ~ ~ ~2 ~ ~ minecraft:dropper facing=west will have two droppers facing the wrong direction.
Confirmed up through 17w16a.
Confirmed for 1.12-pre5. Also happens with structure blocks.