Package appeng.api.orientation
Class FacingStrategy
java.lang.Object
appeng.api.orientation.FacingStrategy
- All Implemented Interfaces:
IOrientationStrategy
- Direct Known Subclasses:
HorizontalFacingStrategy
Implements a strategy that allows blocks to be oriented using a single directional property.
-
Field Summary
Fields inherited from interface appeng.api.orientation.IOrientationStrategy
SPIN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFacingStrategy(net.minecraft.world.level.block.state.properties.DirectionProperty property) protectedFacingStrategy(net.minecraft.world.level.block.state.properties.DirectionProperty property, boolean allowsPlayerRotation) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates that this orientation can be changed by the player (i.e.net.minecraft.core.DirectiongetFacing(net.minecraft.world.level.block.state.BlockState state) Collection<net.minecraft.world.level.block.state.properties.Property<?>> net.minecraft.world.level.block.state.BlockStategetStateForPlacement(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context) net.minecraft.world.level.block.state.BlockStatesetFacing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface appeng.api.orientation.IOrientationStrategy
getAllStates, getSide, getSpin, setOrientation, setOrientation, setSpin, setUp
-
Constructor Details
-
FacingStrategy
protected FacingStrategy(net.minecraft.world.level.block.state.properties.DirectionProperty property) -
FacingStrategy
protected FacingStrategy(net.minecraft.world.level.block.state.properties.DirectionProperty property, boolean allowsPlayerRotation)
-
-
Method Details
-
getFacing
public net.minecraft.core.Direction getFacing(net.minecraft.world.level.block.state.BlockState state) - Specified by:
getFacingin interfaceIOrientationStrategy
-
setFacing
public net.minecraft.world.level.block.state.BlockState setFacing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing) - Specified by:
setFacingin interfaceIOrientationStrategy
-
getStateForPlacement
public net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context) - Specified by:
getStateForPlacementin interfaceIOrientationStrategy
-
allowsPlayerRotation
public boolean allowsPlayerRotation()Description copied from interface:IOrientationStrategyIndicates that this orientation can be changed by the player (i.e. by wrench).- Specified by:
allowsPlayerRotationin interfaceIOrientationStrategy
-
getProperties
- Specified by:
getPropertiesin interfaceIOrientationStrategy- Returns:
- The block state properties used for storing orientation by this strategy.
-