package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.blocks.tiles.BlockEntityPowderPlacer; import de.ellpeck.naturesaura.data.BlockStateGenerator; import de.ellpeck.naturesaura.reg.ICustomBlockState; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; public class BlockPowderPlacer extends BlockContainerImpl implements ICustomBlockState { private static final VoxelShape SHAPE = Shapes.create(0F, 0F, 0F, 1F, 4 / 16F, 1F); public BlockPowderPlacer() { super("powder_placer", BlockEntityPowderPlacer.class, Properties.of(Material.STONE).strength(2, 5F).sound(SoundType.STONE)); } @Override protected boolean hasWaterlogging() { return true; } @Override public VoxelShape getShape(BlockState state, BlockGetter levelIn, BlockPos pos, CollisionContext context) { return SHAPE; } @Override public void generateCustomBlockState(BlockStateGenerator generator) { generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName()))); } }