-
Bug
-
Resolution: Works As Intended
-
None
-
1.20.1
-
None
-
Unconfirmed
-
(Unassigned)
The Barrel Block Placement code uses a method that uses the players looking direction instead of the placement face like other blocks..
the video shows the different placement states.
Pay close attention to how different parts of the side have an effect on the placement direction.
code review (not mojang mappings):
//Pillar Block (the block that wood inherits) public BlockState getPlacementState(ItemPlacementContext ctx){ return (BlockState)this.getDefaultState().with(AXIS, ctx.getSide().getAxis()); } //Barrel Block (the barrels block class) public BlockState getPlacementState(ItemPlacementContext ctx) { return (BlockState)this.getDefaultState().with(FACING, ctx.getPlayerLookDirection().getOpposite()); }
the naming does a good job at describing the different methods do, and most importantly how they are different.
if you are doing a 1.20.2, and this is fully considered a bug. it might be something easy to add really quick