Java Code Examples for net.minecraft.block.material.Material#GOURD
The following examples show how to use
net.minecraft.block.material.Material#GOURD .
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: ToolSword.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
@Override public boolean canMineBlock(IBlockState block, ItemStack stack) { String tool = block.getBlock().getHarvestTool(block); return (tool != null && tool.equals("sword")) || block.getMaterial() == Material.LEAVES || block.getMaterial() == Material.GOURD || block.getMaterial() == Material.VINE || block.getMaterial() == Material.WEB || block.getMaterial() == Material.CLOTH || block.getMaterial() == Material.CARPET || block.getMaterial() == Material.PLANTS || block.getMaterial() == Material.CACTUS || block.getMaterial() == Material.CAKE || block.getMaterial() == Material.TNT || block.getMaterial() == Material.SPONGE; }
Example 2
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 3
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 4
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; }
Example 5
Source File: ToolUniversalSpade.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override public boolean canMineBlock(IBlockState block, ItemStack stack) { String tool = block.getBlock().getHarvestTool(block); return (tool != null && (tool.equals("shovel") || tool.equals("axe") || tool.equals("saw") || tool.equals("sword") || tool.equals("crowbar"))) || block.getMaterial() == Material.SAND || block.getMaterial() == Material.GRASS || block.getMaterial() == Material.GROUND || block.getMaterial() == Material.SNOW || block.getMaterial() == Material.CLAY || block.getMaterial() == Material.CRAFTED_SNOW || block.getMaterial() == Material.LEAVES || block.getMaterial() == Material.VINE || block.getMaterial() == Material.WOOD || block.getMaterial() == Material.CACTUS || block.getMaterial() == Material.CIRCUITS || block.getMaterial() == Material.GOURD || block.getMaterial() == Material.WEB || block.getMaterial() == Material.CLOTH || block.getMaterial() == Material.CARPET || block.getMaterial() == Material.PLANTS || block.getMaterial() == Material.CAKE || block.getMaterial() == Material.TNT || block.getMaterial() == Material.SPONGE; }
Example 6
Source File: BlockBeaconPost.java From Cyberware with MIT License | 4 votes |
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); return block == Blocks.BARRIER ? false : ((!(block instanceof BlockBeaconPost) || block.getMaterial(iblockstate) != this.blockMaterial) && !(block instanceof BlockFenceGate) ? (block.getMaterial(iblockstate).isOpaque() && iblockstate.isFullCube() ? block.getMaterial(iblockstate) != Material.GOURD : false) : true); }
Example 7
Source File: ItemEnderTool.java From enderutilities with GNU Lesser General Public License v3.0 | 4 votes |
@Override public boolean canHarvestBlock(IBlockState state, ItemStack stack) { if (this.isToolBroken(stack)) { return false; } ToolType tool = ToolType.fromStack(stack); if (tool.equals(ToolType.PICKAXE)) // Ender Pickaxe { if (state.getMaterial() == Material.ROCK || state.getMaterial() == Material.GLASS || state.getMaterial() == Material.ICE || state.getMaterial() == Material.PACKED_ICE || state.getMaterial() == Material.REDSTONE_LIGHT || state.getMaterial() == Material.PISTON || state.getMaterial() == Material.IRON || state.getMaterial() == Material.ANVIL) { //System.out.println("canHarvestBlock(): true; Pickaxe"); return true; } } else if (tool.equals(ToolType.AXE)) // Ender Axe { if (state.getMaterial() == Material.WOOD || state.getMaterial() == Material.LEAVES || state.getMaterial() == Material.GOURD || state.getMaterial() == Material.CARPET || state.getMaterial() == Material.CLOTH || state.getMaterial() == Material.PLANTS || state.getMaterial() == Material.VINE) { //System.out.println("canHarvestBlock(): true; Axe"); return true; } } else if (tool.equals(ToolType.SHOVEL)) // Ender Shovel { if (state.getMaterial() == Material.GROUND || state.getMaterial() == Material.GRASS || state.getMaterial() == Material.SAND || state.getMaterial() == Material.SNOW || state.getMaterial() == Material.CRAFTED_SNOW || state.getMaterial() == Material.CLAY) { //System.out.println("canHarvestBlock(): true; Shovel"); return true; } } //System.out.println("canHarvestBlock(): false"); return false; }