Java Code Examples for net.minecraft.block.material.Material#CORAL
The following examples show how to use
net.minecraft.block.material.Material#CORAL .
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 |
@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 |
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 |
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; }