60 lines
1.6 KiB
Java
60 lines
1.6 KiB
Java
package electroblob.wizardry.block;
|
|
|
|
import electroblob.wizardry.tileentity.TileEntityMagicLight;
|
|
import net.minecraft.block.BlockContainer;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.block.state.IBlockState;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
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;
|
|
|
|
public class BlockMagicLight extends BlockContainer {
|
|
|
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
|
|
|
|
public BlockMagicLight(Material par2Material){
|
|
super(par2Material);
|
|
this.setLightLevel(1.0f);
|
|
}
|
|
|
|
@Override
|
|
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos){
|
|
// The other two bounding box methods in Block aren't nullable, so this is the
|
|
// only one that can return NULL_AABB.
|
|
return NULL_AABB;
|
|
}
|
|
|
|
@Override
|
|
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
|
|
return AABB;
|
|
}
|
|
|
|
@Override
|
|
public boolean isCollidable(){
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public TileEntity createNewTileEntity(World world, int metadata){
|
|
return new TileEntityMagicLight(600);
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube(IBlockState state){
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos){
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public EnumBlockRenderType getRenderType(IBlockState state){
|
|
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
|
}
|
|
}
|