62 lines
1.8 KiB
Java
62 lines
1.8 KiB
Java
package de.jottyfan.quickiemod.blocks;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import com.mojang.serialization.MapCodec;
|
|
|
|
import de.jottyfan.quickiemod.blockentity.DrillBlockNorthEntity;
|
|
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
import net.minecraft.block.AbstractBlock;
|
|
import net.minecraft.block.BlockEntityProvider;
|
|
import net.minecraft.block.BlockRenderType;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.FallingBlock;
|
|
import net.minecraft.block.entity.BlockEntity;
|
|
import net.minecraft.block.entity.BlockEntityTicker;
|
|
import net.minecraft.block.entity.BlockEntityType;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.World;
|
|
|
|
/**
|
|
*
|
|
* @author jotty
|
|
*
|
|
*/
|
|
public class BlockDrillNorth extends DrillBlock implements BlockEntityProvider {
|
|
|
|
public BlockDrillNorth() {
|
|
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
}
|
|
|
|
@Override
|
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
return new DrillBlockNorthEntity(pos, blockState);
|
|
}
|
|
|
|
@Override
|
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
List<ItemStack> list = new ArrayList<>();
|
|
list.add(new ItemStack(QuickieBlocks.DRILL_NORTH.getBlock()));
|
|
return list;
|
|
}
|
|
|
|
@Override
|
|
public BlockRenderType getRenderType(BlockState state) {
|
|
return BlockRenderType.MODEL;
|
|
}
|
|
|
|
@Override
|
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
return (world1, pos, state1, be) -> DrillBlockNorthEntity.tick(world1, pos, state1, be);
|
|
}
|
|
|
|
@Override
|
|
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
}
|