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

The following examples show how to use net.minecraft.init.Blocks#DIAMOND_ORE . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: AdvancedRocketry   File: ItemBasicLaserGun.java    License: 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;
	}
}