Java Code Examples for net.minecraft.block.material.Material#coral()

The following examples show how to use net.minecraft.block.material.Material#coral() . 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
@Override
public float getDestroySpeed(ItemStack stack, IBlockState state)
{
    if (this.isToolBroken(stack))
    {
        return 0.2f;
    }

    if (state.getBlock() == Blocks.WEB)
    {
        return 15.0f;
    }

    Material material = state.getMaterial();

    if (material == Material.PLANTS ||
        material == Material.VINE ||
        material == Material.CORAL ||
        material == Material.LEAVES ||
        material == Material.GOURD)
    {
        return 1.5f;
    }

    return 1.0f;
}
 
Example 2
Source Project: Sakura_mod   File: ItemKotachi.java    License: MIT License 5 votes vote down vote up
public float getDestroySpeed(ItemStack stack, IBlockState state) {
      Block block = state.getBlock();

      if (block == Blocks.WEB) {
          return 15.0F;
      }
Material material = state.getMaterial();
return material != Material.PLANTS && material != Material.VINE && material != Material.CORAL && material != Material.LEAVES && material != Material.GOURD ? 1.0F : 1.5F;
  }
 
Example 3
Source Project: Sakura_mod   File: ItemKatana.java    License: MIT License 5 votes vote down vote up
public float getDestroySpeed(ItemStack stack, IBlockState state) {
      Block block = state.getBlock();

      if (block == Blocks.WEB) {
          return 15.0F;
      }
Material material = state.getMaterial();
return material != Material.PLANTS && material != Material.VINE && material != Material.CORAL && material != Material.LEAVES && material != Material.GOURD ? 1.0F : 1.5F;
  }