Java Code Examples for net.minecraft.init.Blocks.WEB
The following are Jave code examples for showing how to use
WEB of the
net.minecraft.init.Blocks
class.
You can vote up the examples you like. Your votes will be used in our system to get
more good examples.
+ Save this method
Example 1
Project: Bewitchment File: ModSpinningThreadRecipes.java View Source Code | 5 votes |
public static void init() { Ingredient string = Ingredient.fromItem(Items.STRING); web = new SpinningThreadRecipe(LibMod.MOD_ID, "spider_web", new ItemStack(Blocks.WEB), string, string, string); // soulstring = new SpinningThreadRecipe(LibMod.MOD_ID, "soulstring", new ItemStack(ModItems.soulstring), string, string, Ingredient.fromStacks(new ItemStack(ModItems.misc, 1, 5)), Ingredient.fromStacks(new ItemStack(ModItems.flowers, 1, 1))); registerAll(); }
Example 2
Project: Adventurers-Toolbox File: ItemATDagger.java View Source Code | 5 votes |
@Override public float getDestroySpeed(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.WEB) { return 15.0F; } else { 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
Project: Adventurers-Toolbox File: ItemATSword.java View Source Code | 5 votes |
@Override public float getDestroySpeed(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.WEB) { return 15.0F; } else { 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
Project: Adventurers-Toolbox File: ItemATMace.java View Source Code | 5 votes |
@Override public float getDestroySpeed(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.WEB) { return 15.0F; } else { 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
Project: Backmemed File: ItemShears.java View Source Code | 5 votes |
/** * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic. */ public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving) { if (!worldIn.isRemote) { stack.damageItem(1, entityLiving); } Block block = state.getBlock(); return state.getMaterial() != Material.LEAVES && block != Blocks.WEB && block != Blocks.TALLGRASS && block != Blocks.VINE && block != Blocks.TRIPWIRE && block != Blocks.WOOL ? super.onBlockDestroyed(stack, worldIn, state, pos, entityLiving) : true; }
Example 6
Project: Backmemed File: ItemSword.java View Source Code | 5 votes |
public float getStrVsBlock(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.WEB) { return 15.0F; } else { 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 7
Project: CustomWorldGen File: ItemShears.java View Source Code | 5 votes |
/** * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic. */ public boolean onBlockDestroyed(ItemStack stack, World worldIn, IBlockState state, BlockPos pos, EntityLivingBase entityLiving) { stack.damageItem(1, entityLiving); Block block = state.getBlock(); return state.getMaterial() != Material.LEAVES && block != Blocks.WEB && block != Blocks.TALLGRASS && block != Blocks.VINE && block != Blocks.TRIPWIRE && block != Blocks.WOOL && !(state instanceof net.minecraftforge.common.IShearable) ? super.onBlockDestroyed(stack, worldIn, state, pos, entityLiving) : true; }
Example 8
Project: CustomWorldGen File: ItemSword.java View Source Code | 5 votes |
public float getStrVsBlock(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.WEB) { return 15.0F; } else { 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 9
Project: Adventurers-Toolbox File: ItemATDagger.java View Source Code | 4 votes |
@Override public boolean canHarvestBlock(IBlockState blockIn) { return blockIn.getBlock() == Blocks.WEB; }
Example 10
Project: Adventurers-Toolbox File: ItemATSword.java View Source Code | 4 votes |
@Override public boolean canHarvestBlock(IBlockState blockIn) { return blockIn.getBlock() == Blocks.WEB; }
Example 11
Project: Adventurers-Toolbox File: ItemATMace.java View Source Code | 4 votes |
@Override public boolean canHarvestBlock(IBlockState blockIn) { return blockIn.getBlock() == Blocks.WEB; }
Example 12
Project: Backmemed File: ItemShears.java View Source Code | 4 votes |
/** * Check whether this Item can harvest the given Block */ public boolean canHarvestBlock(IBlockState blockIn) { Block block = blockIn.getBlock(); return block == Blocks.WEB || block == Blocks.REDSTONE_WIRE || block == Blocks.TRIPWIRE; }
Example 13
Project: Backmemed File: ItemShears.java View Source Code | 4 votes |
public float getStrVsBlock(ItemStack stack, IBlockState state) { Block block = state.getBlock(); return block != Blocks.WEB && state.getMaterial() != Material.LEAVES ? (block == Blocks.WOOL ? 5.0F : super.getStrVsBlock(stack, state)) : 15.0F; }
Example 14
Project: Backmemed File: ItemSword.java View Source Code | 4 votes |
/** * Check whether this Item can harvest the given Block */ public boolean canHarvestBlock(IBlockState blockIn) { return blockIn.getBlock() == Blocks.WEB; }
Example 15
Project: CustomWorldGen File: ItemShears.java View Source Code | 4 votes |
/** * Check whether this Item can harvest the given Block */ public boolean canHarvestBlock(IBlockState blockIn) { Block block = blockIn.getBlock(); return block == Blocks.WEB || block == Blocks.REDSTONE_WIRE || block == Blocks.TRIPWIRE; }
Example 16
Project: CustomWorldGen File: ItemShears.java View Source Code | 4 votes |
public float getStrVsBlock(ItemStack stack, IBlockState state) { Block block = state.getBlock(); return block != Blocks.WEB && state.getMaterial() != Material.LEAVES ? (block == Blocks.WOOL ? 5.0F : super.getStrVsBlock(stack, state)) : 15.0F; }
Example 17
Project: CustomWorldGen File: ItemSword.java View Source Code | 4 votes |
/** * Check whether this Item can harvest the given Block */ public boolean canHarvestBlock(IBlockState blockIn) { return blockIn.getBlock() == Blocks.WEB; }