Java Code Examples for net.minecraft.init.Blocks#DIAMOND_ORE

The following examples show how to use net.minecraft.init.Blocks#DIAMOND_ORE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ItemBasicLaserGun.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public boolean canHarvestBlock(IBlockState blockIn)
{
	Block block = blockIn.getBlock();

	if (block == Blocks.OBSIDIAN)
	{
		return this.toolMaterial.getHarvestLevel() == 3;
	}
	else if (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE)
	{
		if (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK)
		{
			if (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE)
			{
				if (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE)
				{
					if (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE)
					{
						if (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE)
						{
							Material material = blockIn.getMaterial();
							return material == Material.ROCK ? true : (material == Material.IRON ? true : material == Material.ANVIL);
						}
						else
						{
							return this.toolMaterial.getHarvestLevel() >= 2;
						}
					}
					else
					{
						return this.toolMaterial.getHarvestLevel() >= 1;
					}
				}
				else
				{
					return this.toolMaterial.getHarvestLevel() >= 1;
				}
			}
			else
			{
				return this.toolMaterial.getHarvestLevel() >= 2;
			}
		}
		else
		{
			return this.toolMaterial.getHarvestLevel() >= 2;
		}
	}
	else
	{
		return this.toolMaterial.getHarvestLevel() >= 2;
	}
}