Skip to content

Commit

Permalink
hotfix panel crashing when no player is present
Browse files Browse the repository at this point in the history
  • Loading branch information
someaddons committed Aug 28, 2024
1 parent 95a21af commit 772be39
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public BlockState getStateForPlacement(@NotNull final BlockPlaceContext context)
}
else
{
blockstate = blockstate.setValue(FACING, context.getPlayer().getDirection()).setValue(HALF, direction == Direction.DOWN ? Half.TOP : Half.BOTTOM).setValue(OPEN, false);
blockstate = blockstate.setValue(FACING, context.getHorizontalDirection()).setValue(HALF, direction == Direction.DOWN ? Half.TOP : Half.BOTTOM).setValue(OPEN, false);
}

return blockstate.setValue(WATERLOGGED, fluidstate.getType() == Fluids.WATER);
Expand Down

0 comments on commit 772be39

Please sign in to comment.