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