User Tools

Site Tools


tutorial:directionalblock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
tutorial:directionalblock [2022/12/16 02:07] solidblocktutorial:directionalblock [2023/03/15 21:21] haykam
Line 38: Line 38:
         @Override         @Override
  public BlockState getPlacementState(ItemPlacementContext ctx) {  public BlockState getPlacementState(ItemPlacementContext ctx) {
- return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getPlayerFacing().getOpposite());+ return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite());
  }  }
  
tutorial/directionalblock.txt · Last modified: 2023/09/26 05:43 by poopooracoocoo