Package appeng.api.orientation
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
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.IntegerProperty -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanIndicates that this orientation can be changed by the player (i.e.static IOrientationStrategyget(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.DirectiongetFacing(net.minecraft.world.level.block.state.BlockState state) Collection<net.minecraft.world.level.block.state.properties.Property<?>> default net.minecraft.core.DirectiongetSide(net.minecraft.world.level.block.state.BlockState state, RelativeSide side) default intgetSpin(net.minecraft.world.level.block.state.BlockState state) default net.minecraft.world.level.block.state.BlockStategetStateForPlacement(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context) default net.minecraft.world.level.block.state.BlockStatesetFacing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing) default net.minecraft.world.level.block.state.BlockStatesetOrientation(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing, int spin) default net.minecraft.world.level.block.state.BlockStatesetOrientation(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.BlockStatesetSpin(net.minecraft.world.level.block.state.BlockState state, int spin) default net.minecraft.world.level.block.state.BlockStatesetUp(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
-
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.
-