2019-02-22 19:06:47 +01:00
|
|
|
package de.ellpeck.naturesaura.blocks;
|
|
|
|
|
2020-01-22 01:32:26 +01:00
|
|
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityPowderPlacer;
|
2020-01-29 00:40:28 +01:00
|
|
|
import de.ellpeck.naturesaura.data.BlockStateGenerator;
|
|
|
|
import de.ellpeck.naturesaura.reg.ICustomBlockState;
|
2020-01-23 16:05:52 +01:00
|
|
|
import net.minecraft.block.BlockState;
|
2019-02-22 19:06:47 +01:00
|
|
|
import net.minecraft.block.SoundType;
|
|
|
|
import net.minecraft.block.material.Material;
|
2020-01-23 16:05:52 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
import net.minecraft.util.math.shapes.ISelectionContext;
|
|
|
|
import net.minecraft.util.math.shapes.VoxelShape;
|
|
|
|
import net.minecraft.util.math.shapes.VoxelShapes;
|
|
|
|
import net.minecraft.world.IBlockReader;
|
2019-02-22 19:06:47 +01:00
|
|
|
|
2020-01-29 00:40:28 +01:00
|
|
|
public class BlockPowderPlacer extends BlockContainerImpl implements ICustomBlockState {
|
2020-01-23 16:05:52 +01:00
|
|
|
|
|
|
|
private static final VoxelShape SHAPE = VoxelShapes.create(0F, 0F, 0F, 1F, 4 / 16F, 1F);
|
2019-02-22 19:06:47 +01:00
|
|
|
|
|
|
|
public BlockPowderPlacer() {
|
2020-01-22 01:32:26 +01:00
|
|
|
super("powder_placer", TileEntityPowderPlacer::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(2, 5F).sound(SoundType.STONE));
|
2019-02-22 19:06:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2020-01-23 16:05:52 +01:00
|
|
|
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
|
|
|
return SHAPE;
|
2019-02-22 19:06:47 +01:00
|
|
|
}
|
2020-01-29 00:40:28 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void generateCustomBlockState(BlockStateGenerator generator) {
|
|
|
|
generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName())));
|
|
|
|
}
|
2019-02-22 19:06:47 +01:00
|
|
|
}
|