// Path: src/main/java/net/darkhax/darkutils/features/flatblocks/collision/CollisionEffect.java
// @FunctionalInterface
// public interface CollisionEffect {
//     
//     /**
//      * This functional interface is used by the flat tile blocks in this mod. They are applied
//      * to an entity when that entity collides with the block.
//      *
//      * @param state The state of the block.
//      * @param world Instance of the world.
//      * @param pos The current block position.
//      * @param entity The entity that collided with the block.
//      */
//     void apply (BlockState state, World world, BlockPos pos, Entity entity);
// }


import net.darkhax.darkutils.features.flatblocks.collision.CollisionEffect;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World;
package net.darkhax.darkutils.features.flatblocks;


public class BlockFlatTileRotating extends BlockFlatTile {
    
    public BlockFlatTileRotating(CollisionEffect collisionEffect) {
        
        this(BLOCK_PROPERTIES, collisionEffect);
    }
    
    public BlockFlatTileRotating(Properties properties, CollisionEffect collisionEffect) {
        
        super(properties, collisionEffect);
        this.setDefaultState(this.getDefaultState().with(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH));
    }
    
    @Override
    public boolean onBlockActivated (BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
        
        if (player.isSneaking()) {
            
            worldIn.setBlockState(pos, this.rotate(state, Rotation.CLOCKWISE_90));
            return true;
        }
        
// Path: src/main/java/net/darkhax/darkutils/features/flatblocks/collision/CollisionEffect.java
// @FunctionalInterface
// public interface CollisionEffect {
//     
//     /**
//      * This functional interface is used by the flat tile blocks in this mod. They are applied
//      * to an entity when that entity collides with the block.
//      *
//      * @param state The state of the block.
//      * @param world Instance of the world.
//      * @param pos The current block position.
//      * @param entity The entity that collided with the block.
//      */
//     void apply (BlockState state, World world, BlockPos pos, Entity entity);
// }


// Path: src/main/java/net/darkhax/darkutils/features/flatblocks/BlockFlatTileRotating.java
import net.darkhax.darkutils.features.flatblocks.collision.CollisionEffect;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World;

package net.darkhax.darkutils.features.flatblocks;


public class BlockFlatTileRotating extends BlockFlatTile {
    
    public BlockFlatTileRotating(CollisionEffect collisionEffect) {
        
        this(BLOCK_PROPERTIES, collisionEffect);
    }
    
    public BlockFlatTileRotating(Properties properties, CollisionEffect collisionEffect) {
        
        super(properties, collisionEffect);
        this.setDefaultState(this.getDefaultState().with(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH));
    }
    
    @Override
    public boolean onBlockActivated (BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
        
        if (player.isSneaking()) {
            
            worldIn.setBlockState(pos, this.rotate(state, Rotation.CLOCKWISE_90));
            return true;
        }
        
        return false;