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

The following examples show how to use net.minecraft.init.Blocks#WEB . 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: ItemEnderSword.java    From enderutilities with GNU Lesser General Public License v3.0 6 votes vote down vote up
@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 File: ItemKotachi.java    From Sakura_mod with 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 File: ItemKatana.java    From Sakura_mod with 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 4
Source File: ItemKotachi.java    From Sakura_mod with MIT License 4 votes vote down vote up
/**
 * Check whether this Item can harvest the given Block
 */
public boolean canHarvestBlock(IBlockState blockIn) {
    return blockIn.getBlock() == Blocks.WEB;
}
 
Example 5
Source File: ItemKatana.java    From Sakura_mod with MIT License 4 votes vote down vote up
/**
 * Check whether this Item can harvest the given Block
 */
public boolean canHarvestBlock(IBlockState blockIn) {
    return blockIn.getBlock() == Blocks.WEB;
}
 
Example 6
Source File: ItemEnderSword.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public boolean canHarvestBlock(IBlockState state, ItemStack stack)
{
    return state.getBlock() == Blocks.WEB;
}