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
ConstructorsModifierConstructorDescriptionprotected
FacingStrategy
(net.minecraft.world.level.block.state.properties.DirectionProperty property) protected
FacingStrategy
(net.minecraft.world.level.block.state.properties.DirectionProperty property, boolean allowsPlayerRotation) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates that this orientation can be changed by the player (i.e.net.minecraft.core.Direction
getFacing
(net.minecraft.world.level.block.state.BlockState state) Collection
<net.minecraft.world.level.block.state.properties.Property<?>> net.minecraft.world.level.block.state.BlockState
getStateForPlacement
(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext context) net.minecraft.world.level.block.state.BlockState
setFacing
(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, wait
Methods 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:
getFacing
in 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:
setFacing
in 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:
getStateForPlacement
in interfaceIOrientationStrategy
-
allowsPlayerRotation
public boolean allowsPlayerRotation()Description copied from interface:IOrientationStrategy
Indicates that this orientation can be changed by the player (i.e. by wrench).- Specified by:
allowsPlayerRotation
in interfaceIOrientationStrategy
-
getProperties
- Specified by:
getProperties
in interfaceIOrientationStrategy
- Returns:
- The block state properties used for storing orientation by this strategy.
-