Class FacingStrategy

java.lang.Object
appeng.api.orientation.FacingStrategy
All Implemented Interfaces:
IOrientationStrategy
Direct Known Subclasses:
HorizontalFacingStrategy

public class FacingStrategy extends Object implements IOrientationStrategy
Implements a strategy that allows blocks to be oriented using a single directional property.
  • 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 interface IOrientationStrategy
    • 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 interface IOrientationStrategy
    • 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 interface IOrientationStrategy
    • 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 interface IOrientationStrategy
    • getProperties

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