use of org.spongepowered.api.data.manipulator.immutable.block.ImmutableDirectionalData in project SpongeCommon by SpongePowered.
the class MixinBlockWallSign method getStateWithData.
@Override
public Optional<BlockState> getStateWithData(IBlockState blockState, ImmutableDataManipulator<?, ?> manipulator) {
if (manipulator instanceof ImmutableDirectionalData) {
final Direction direction = ((ImmutableDirectionalData) manipulator).direction().get();
final EnumFacing facing = DirectionResolver.getFor(direction);
return Optional.of((BlockState) blockState.withProperty(BlockWallSign.FACING, facing));
}
return super.getStateWithData(blockState, manipulator);
}
Aggregations