BloodMagic/src/main/java/WayofTime/bloodmagic/block/BlockIncenseAltar.java

99 lines
2.6 KiB
Java
Raw Normal View History

package WayofTime.bloodmagic.block;
2016-03-18 13:16:38 -04:00
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
2016-03-18 13:16:38 -04:00
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;
2016-03-18 13:16:38 -04:00
2016-03-16 15:37:55 -07:00
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
2016-03-18 13:16:38 -04:00
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.client.IVariantProvider;
import WayofTime.bloodmagic.tile.TileIncenseAltar;
2016-03-16 15:37:55 -07:00
public class BlockIncenseAltar extends BlockContainer implements IVariantProvider
{
2016-03-18 13:16:38 -04:00
protected static final AxisAlignedBB AABB = new AxisAlignedBB(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F);
public BlockIncenseAltar()
{
2016-04-24 10:06:28 -07:00
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".incenseAltar");
setCreativeTab(BloodMagic.tabBloodMagic);
setHardness(2.0F);
setResistance(5.0F);
setHarvestLevel("pickaxe", 0);
2016-03-18 13:16:38 -04:00
}
2016-03-18 13:16:38 -04:00
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{
return AABB;
}
@Override
public boolean isOpaqueCube(IBlockState state)
{
return false;
}
@Override
2016-03-18 13:16:38 -04:00
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos)
{
return false;
}
@Override
2016-03-18 13:16:38 -04:00
public boolean isFullCube(IBlockState state)
{
return false;
}
@Override
public boolean isVisuallyOpaque()
{
return false;
}
@Override
2016-03-18 13:16:38 -04:00
public EnumBlockRenderType getRenderType(IBlockState state)
{
2016-03-18 13:16:38 -04:00
return EnumBlockRenderType.MODEL;
}
@Override
public TileEntity createNewTileEntity(World world, int meta)
{
return new TileIncenseAltar();
}
@Override
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState)
{
TileIncenseAltar TileIncenseAltar = (TileIncenseAltar) world.getTileEntity(blockPos);
if (TileIncenseAltar != null)
TileIncenseAltar.dropItems();
super.breakBlock(world, blockPos, blockState);
}
2016-03-16 15:37:55 -07:00
@Override
2016-03-16 18:41:06 -04:00
public List<Pair<Integer, String>> getVariants()
{
2016-03-16 15:37:55 -07:00
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
ret.add(new ImmutablePair<Integer, String>(0, "normal"));
return ret;
}
}