package com.miningmark48.pearcelmod.block; import com.miningmark48.pearcelmod.tileentity.TileEntityPearcelBeacon; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import javax.annotation.Nullable; import java.util.List; public class BlockPearcelBeacon extends BlockContainer{ private static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.9375D, 1.0D); public BlockPearcelBeacon() { super(Material.ROCK); setHardness(2.0F); setResistance(2.0F); } @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ return BOUNDING_BOX; } @Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) { super.addCollisionBoxToList(pos, entityBox, collidingBoxes, BOUNDING_BOX); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityPearcelBeacon(); } public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } @Override public boolean isFullCube(IBlockState state){ return false; } @Override public boolean isOpaqueCube(IBlockState state){ return false; } @Override public BlockRenderLayer getBlockLayer(){ return BlockRenderLayer.CUTOUT; } }