diff --git a/src/main/java/ru/dbotthepony/mc/otm/block/BlockMatteryRotatable.java b/src/main/java/ru/dbotthepony/mc/otm/block/BlockMatteryRotatable.java index fd8350554..92ddaf037 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/block/BlockMatteryRotatable.java +++ b/src/main/java/ru/dbotthepony/mc/otm/block/BlockMatteryRotatable.java @@ -35,19 +35,7 @@ public abstract class BlockMatteryRotatable extends BlockMattery { @Nullable @Override public BlockState getStateForPlacement(BlockPlaceContext context) { - Direction find_first = null; - - for (Direction direction : context.getNearestLookingDirections()) { - if (FACING.getPossibleValues().contains(direction)) { - find_first = direction; - break; - } - } - - if (find_first == null) - return this.defaultBlockState(); - - return this.defaultBlockState().setValue(FACING, faceToPlayer(context) ? find_first.getOpposite() : find_first); + return this.defaultBlockState().setValue(FACING, faceToPlayer(context) ? context.getHorizontalDirection().getOpposite() : context.getHorizontalDirection()); } public boolean faceToPlayer(BlockPlaceContext context) {