package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.blocks.tiles.TileEntityAutoCrafter; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.DirectionProperty; import net.minecraft.state.StateContainer; import net.minecraft.state.properties.BlockStateProperties; public class BlockAutoCrafter extends BlockContainerImpl { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public BlockAutoCrafter() { super("auto_crafter", TileEntityAutoCrafter.class, "auto_crafter", ModBlocks.prop(Material.WOOD).hardnessAndResistance(1.5F).sound(SoundType.WOOD)); } @Override protected void fillStateContainer(StateContainer.Builder builder) { builder.add(FACING); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(FACING, context.getPlayer().getHorizontalFacing()); } }