Interface IOrientationStrategy

All Known Implementing Classes:
FacingStrategy, FacingWithSpinStrategy, HorizontalFacingStrategy

public interface IOrientationStrategy
Specifies how a block determines its orientation and stores it in the blockstate. For use with IOrientableBlock.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.IntegerProperty
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Indicates that this orientation can be changed by the player (i.e.
    get(net.minecraft.world.level.block.state.BlockState state)
     
    default Stream<net.minecraft.world.level.block.state.BlockState>
    getAllStates(net.minecraft.world.level.block.state.BlockState baseState)
     
    default net.minecraft.core.Direction
    getFacing(net.minecraft.world.level.block.state.BlockState state)
     
    Collection<net.minecraft.world.level.block.state.properties.Property<?>>
     
    default net.minecraft.core.Direction
    getSide(net.minecraft.world.level.block.state.BlockState state, RelativeSide side)
     
    default int
    getSpin(net.minecraft.world.level.block.state.BlockState state)
     
    default net.minecraft.world.level.block.state.BlockState
    getStateForPlacement(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context)
     
    default net.minecraft.world.level.block.state.BlockState
    setFacing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing)
     
    default net.minecraft.world.level.block.state.BlockState
    setOrientation(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing, int spin)
     
    default net.minecraft.world.level.block.state.BlockState
    setOrientation(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing, net.minecraft.core.Direction up)
     
    default net.minecraft.world.level.block.state.BlockState
    setSpin(net.minecraft.world.level.block.state.BlockState state, int spin)
     
    default net.minecraft.world.level.block.state.BlockState
    setUp(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction up)
     
  • Field Details

    • SPIN

      static final net.minecraft.world.level.block.state.properties.IntegerProperty SPIN
  • Method Details

    • get

      static IOrientationStrategy get(net.minecraft.world.level.block.state.BlockState state)
    • getFacing

      default net.minecraft.core.Direction getFacing(net.minecraft.world.level.block.state.BlockState state)
    • getSpin

      default int getSpin(net.minecraft.world.level.block.state.BlockState state)
    • setFacing

      default net.minecraft.world.level.block.state.BlockState setFacing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing)
    • setSpin

      default net.minecraft.world.level.block.state.BlockState setSpin(net.minecraft.world.level.block.state.BlockState state, int spin)
    • setUp

      default net.minecraft.world.level.block.state.BlockState setUp(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction up)
    • setOrientation

      default net.minecraft.world.level.block.state.BlockState setOrientation(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing, int spin)
    • setOrientation

      default net.minecraft.world.level.block.state.BlockState setOrientation(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing, net.minecraft.core.Direction up)
    • getSide

      default net.minecraft.core.Direction getSide(net.minecraft.world.level.block.state.BlockState state, RelativeSide side)
    • getStateForPlacement

      default net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context)
    • getAllStates

      default Stream<net.minecraft.world.level.block.state.BlockState> getAllStates(net.minecraft.world.level.block.state.BlockState baseState)
    • allowsPlayerRotation

      default boolean allowsPlayerRotation()
      Indicates that this orientation can be changed by the player (i.e. by wrench).
    • getProperties

      Collection<net.minecraft.world.level.block.state.properties.Property<?>> getProperties()
      Returns:
      The block state properties used for storing orientation by this strategy.