Package appeng.api.orientation
Class FacingWithSpinStrategy
java.lang.Object
appeng.api.orientation.FacingWithSpinStrategy
- All Implemented Interfaces:
IOrientationStrategy
Extends
FacingStrategy
to also allow the block to be rotated around its facing axis.-
Field Summary
Fields inherited from interface appeng.api.orientation.IOrientationStrategy
SPIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Direction
getFacing
(net.minecraft.world.level.block.state.BlockState state) Collection
<net.minecraft.world.level.block.state.properties.Property<?>> int
getSpin
(net.minecraft.world.level.block.state.BlockState state) 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) net.minecraft.world.level.block.state.BlockState
setSpin
(net.minecraft.world.level.block.state.BlockState state, int spin) 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
allowsPlayerRotation, getAllStates, getSide, setOrientation, setOrientation, setUp
-
Constructor Details
-
FacingWithSpinStrategy
protected FacingWithSpinStrategy()
-
-
Method Details
-
getFacing
public net.minecraft.core.Direction getFacing(net.minecraft.world.level.block.state.BlockState state) - Specified by:
getFacing
in interfaceIOrientationStrategy
-
getSpin
public int getSpin(net.minecraft.world.level.block.state.BlockState state) - Specified by:
getSpin
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
-
setSpin
public net.minecraft.world.level.block.state.BlockState setSpin(net.minecraft.world.level.block.state.BlockState state, int spin) - Specified by:
setSpin
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
-
getProperties
- Specified by:
getProperties
in interfaceIOrientationStrategy
- Returns:
- The block state properties used for storing orientation by this strategy.
-