Java Code Examples for net.minecraft.init.Items#STONE_PICKAXE
The following examples show how to use
net.minecraft.init.Items#STONE_PICKAXE .
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: ItemHandUpgrade.java From Cyberware with MIT License | 6 votes |
@SubscribeEvent public void handleMining(HarvestCheck event) { EntityPlayer p = event.getEntityPlayer(); ItemStack test = new ItemStack(this, 1, 2); boolean rightArm = (p.getPrimaryHand() == EnumHandSide.RIGHT ? (CyberwareAPI.isCyberwareInstalled(p, new ItemStack(CyberwareContent.cyberlimbs, 1, 1))) : (CyberwareAPI.isCyberwareInstalled(p, new ItemStack(CyberwareContent.cyberlimbs, 1, 0)))); if (rightArm && CyberwareAPI.isCyberwareInstalled(p, test) && p.getHeldItemMainhand() == null) { ItemStack pick = new ItemStack(Items.STONE_PICKAXE); if (pick.canHarvestBlock(event.getTargetBlock())) { event.setCanHarvest(true); } } }
Example 2
Source File: GTEventCheckSpawn.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
public ItemStack getRandomPickaxe(Random rand) { switch (rand.nextInt(4)) { case 1: return new ItemStack(Items.STONE_PICKAXE); case 2: return new ItemStack(Items.IRON_PICKAXE); case 3: return new ItemStack(Items.GOLDEN_PICKAXE); default: return new ItemStack(Items.WOODEN_PICKAXE); } }
Example 3
Source File: ItemHandUpgrade.java From Cyberware with MIT License | 5 votes |
@SubscribeEvent public void handleMineSpeed(BreakSpeed event) { EntityPlayer p = event.getEntityPlayer(); ItemStack test = new ItemStack(this, 1, 2); boolean rightArm = (p.getPrimaryHand() == EnumHandSide.RIGHT ? (CyberwareAPI.isCyberwareInstalled(p, new ItemStack(CyberwareContent.cyberlimbs, 1, 1))) : (CyberwareAPI.isCyberwareInstalled(p, new ItemStack(CyberwareContent.cyberlimbs, 1, 0)))); if (rightArm && CyberwareAPI.isCyberwareInstalled(p, test) && p.getHeldItemMainhand() == null) { ItemStack pick = new ItemStack(Items.STONE_PICKAXE); event.setNewSpeed(event.getNewSpeed() * pick.getStrVsBlock(p.worldObj.getBlockState(event.getPos()))); } }
Example 4
Source File: ItemTool.java From minecraft-roguelike with GNU General Public License v3.0 | 5 votes |
private static ItemStack pickPick(Random rand, int level) { Quality quality = Quality.getToolQuality(rand, level); switch (quality) { case DIAMOND: return new ItemStack(Items.DIAMOND_PICKAXE); case GOLD: return new ItemStack(Items.GOLDEN_PICKAXE); case IRON: return new ItemStack(Items.IRON_PICKAXE); case STONE: return new ItemStack(Items.STONE_PICKAXE); default: return new ItemStack(Items.WOODEN_PICKAXE); } }