@Override public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) { ItemStack currentStack = player.getCurrentEquippedItem(); if (currentStack != null && currentStack.getItem() instanceof ItemPickaxe) { return world.setBlockToAir(x, y, z); } else if (player.capabilities.isCreativeMode) { return world.setBlockToAir(x, y, z); } else { beginHatch(world, x, y, z, player); return false; } }
@Override public void harvestBlock(World world, EntityPlayer par2EntityPlayer, int x, int y, int z, int par6) { ItemStack currentStack = par2EntityPlayer.getCurrentEquippedItem(); if (currentStack != null && currentStack.getItem() instanceof ItemPickaxe) { par2EntityPlayer.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1); par2EntityPlayer.addExhaustion(0.025F); this.dropBlockAsItem(world, x, y, z, par6 % 3, 0); if (currentStack.getItem() == MarsItems.deshPickaxe && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer)) { ItemStack itemstack = new ItemStack(MarsItems.deshPickSlime, 1, currentStack.getItemDamage()); if (currentStack.stackTagCompound != null) { itemstack.stackTagCompound = (NBTTagCompound) currentStack.stackTagCompound.copy(); } par2EntityPlayer.setCurrentItemOrArmor(0, itemstack); } } }
@SubscribeEvent public void onRenderTick(TickEvent.RenderTickEvent event) { EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().thePlayer; if (player != null) { if (player.getHeldItemMainhand() != null && player.getHeldItemMainhand().toString().contains("tile.air")) { ItemStack held = player.getHeldItemMainhand(); InventoryPlayer playerInv = player.inventory; if (held.getItem() instanceof ItemPickaxe) { if(held.serializeNBT().getInteger("BurnTimeLeft") == 0){ for (int i = 0; i < playerInv.getSizeInventory(); i++) { if (playerInv.getStackInSlot(i).getItem() == Items.COAL) { held.serializeNBT().setInteger("BurnTimeLeft", TileEntityFurnace.getItemBurnTime(playerInv.getStackInSlot(i))); break; } } } } } } }
/** * Finds or creates a pickaxe for an ore. */ public static void PopulatePickaxe(OreStuff stuff) { if (!stuff.HasPickaxe) { Item Pickaxe = Util.FindItemFromString(stuff.BaseName + "pick"); if (Pickaxe != null) { stuff.HasPickaxe = true; } else { ItemPickaxe pick; pick = AutoItemAndBlock.CreatePickaxe(stuff.MetalMaterial, Util.rand.nextInt(10), 1, ModTabs.maintab, stuff.MetalMaterial.getHarvestLevel(), Reference.MODID + ":MissingPickaxeTexture", stuff.BaseName + "Pickaxe"); stuff.Pickaxe = pick; } } }
@SubscribeEvent public void addVanillaTools(ValidatingToolsEvent event){ Iterator<Item> iterator = Item.itemRegistry.iterator(); while(iterator.hasNext()){ Item i = iterator.next(); if(i instanceof ItemSword){ event.addSword(i); } if(i instanceof ItemPickaxe){ event.addPickaxe(i); } if(i instanceof ItemSpade){ event.addShovel(i); } if(i instanceof ItemAxe){ event.addAxe(i); } if(i instanceof ItemHoe){ event.addHoe(i); } } }
/** * switches through input number to determine desired tool * * @param tool * @return */ public static Class getToolClassFromNode(Node tool) { if (tool != null) { if (tool.getNodeType() == Node.ELEMENT_NODE) { int toolIndex = 0; Element toolElement = (Element) tool; toolIndex = Integer.parseInt(toolElement.getTextContent()); switch (toolIndex) { case 0: return CuttingKnifeBase.class; case 1: return ItemAxe.class; case 2: return ItemPickaxe.class; case 3: return ItemSpade.class; } } } return CuttingKnifeBase.class; }
@Override public boolean isItemValid( ItemStack stack ) { if ( stack == null ) { return true; } Item item = stack.getItem(); if ( item instanceof ItemPickaxe || item == ComponentEquipment.items.pickaxe ) { return true; } return false; }
public boolean attackEntityFrom(DamageSource damagesource, float f) { Entity entity = damagesource.getTrueSource(); if (entity != null) { if (entity instanceof EntityPlayer) { ItemStack stack = ((EntityPlayer) entity).inventory.getCurrentItem(); if (stack != null) { if (stack.getItem() == FakeOres.antiOresBlade) { f = Float.MAX_VALUE; } if (stack.getItem() instanceof ItemPickaxe) { f = (f * 5); } } } } if (damagesource.isFireDamage()) { return false; } if (damagesource.isExplosion()) { f = Float.MAX_VALUE; return true; } return super.attackEntityFrom(damagesource, f); }
@Override public boolean matches(InventoryCrafting crafting, World world) { boolean pickFound = false; boolean gemFound = false; boolean somethingElseFound = false; for(int i = 0; i < crafting.getSizeInventory(); i++){ if(crafting.getStackInSlot(i) != null) { //if there's an item ItemStack stack = crafting.getStackInSlot(i); if (stack.getItem() instanceof ItemPickaxe && !somethingElseFound){ //check if it's a valid pickaxe if(stack.getItem().getHarvestLevel(stack, "pickaxe") >= 2){ if(stack.getItemDamage() < stack.getMaxDamage() - 7){ pickFound = true; } } }else if(OreHelper.isItemThisOre(stack, ore) && !somethingElseFound){ //check if it's a gem gemFound = true; }else{ somethingElseFound = true; } } } return pickFound && gemFound && !somethingElseFound; }
@Override public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) { if (world.isRemote) { return; } if (PlayerUtils.isSword(player.getHeldItem())) { long time = world.getWorldTime(); long days = (world.getTotalWorldTime() / 24000L); long current = (time + 6000L) % 24000L; // 0 is 6:00 am, 18000 is midnight, so add 6000 int h = (int)(current / 1000L); int m = (int)((current % 1000L) * 3 / 50); // 1000 ticks divided by 60 minutes = 16 and 2/3 PlayerUtils.sendTranslatedChat(player, "chat.zss.block.gossip_stone.time", String.format("%02d", h), String.format("%02d", m), days); } else if (world.getBlockState(pos).getValue(UNBREAKABLE).booleanValue() && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemPickaxe) { world.playSoundAtEntity(player, Sounds.ITEM_BREAK, 0.25F, 1.0F / (world.rand.nextFloat() * 0.4F + 0.5F)); } }
public static int getType(ItemStack itemStack) { Item item = itemStack.getItem(); if (item instanceof ItemPickaxe) { return TYPE_PICKAXE; } else if (item instanceof ItemAxe) { return TYPE_AXE; } else if (item instanceof ItemSpade) { return TYPE_SHOVEL; } else if (item instanceof ItemSword) { return TYPE_SWORD; } else if (item instanceof ItemHoe) { return TYPE_HOE; } else if (item instanceof ItemTool) { Set<String> toolClasses = ((ItemTool)item).getToolClasses(itemStack); if (toolClasses.contains("pickaxe")) return TYPE_PICKAXE; else if (toolClasses.contains("axe")) return TYPE_AXE; else if (toolClasses.contains("shovel")) return TYPE_SHOVEL; else if (toolClasses.contains("hoe")) return TYPE_HOE; else return -1; } else if (tinkersType(item)>=0) { //see if it's a tinkers type return tinkersType(item); } else { return -1; } }
private static String identityType(@Nonnull ItemStack stack) { Item item = stack.getItem(); if (item instanceof ItemArmor) { switch (((ItemArmor)item).armorType) { case HEAD: return "helmet"; case CHEST: return "chestplate"; case LEGS: return "leggings"; case FEET: return "boots"; default: break; } } else if (item instanceof ItemPickaxe) return "pickaxe"; else if (item instanceof ItemShears) return "shears"; else if (item instanceof ItemAxe) return "axe"; else if (item instanceof ItemSpade) return "shovel"; else if (item instanceof ItemBlock) return "block"; else if (item instanceof ItemBucket) return "bucket"; return "gizmo"; }
/** * Creates a pickaxe from the specs provided. */ public static ItemPickaxe CreatePickaxe(ToolMaterial material, float EfficiencyOnProperMaterial, int maxStackSize, CreativeTabs creativetab, int mininglevel, String texturename, String UnlocalizedName) { ItemPickaxe pick; pick = new AutoPickaxe(material, EfficiencyOnProperMaterial, maxStackSize, creativetab, mininglevel, texturename, UnlocalizedName); return pick; }
public ItemDrill(ToolMaterial toolMaterial) { super(0, toolMaterial); setNoRepair(); addToolClass("pickaxe"); effectiveBlocks.addAll(ItemPickaxe.field_150915_c); effectiveMaterials.add(Material.iron); effectiveMaterials.add(Material.anvil); effectiveMaterials.add(Material.rock); maxEnergy = Config.maxEnergy; energyPerUse = Config.energyPerUse; }
@Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { if (state.getValue(AGE) == 5) { if (worldIn.isRemote) return true; if (playerIn.getHeldItem() != null) { if (playerIn.getHeldItem().getItem() instanceof ItemPickaxe) { worldIn.setBlockState(pos, this.getDefaultState(), 2); EntityItem ei = new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(this.item)); worldIn.spawnEntityInWorld(ei); playerIn.getHeldItem().damageItem(2, playerIn); playerIn.addStat(MAchievements.glacieric_ice, 1); if (playerIn instanceof FakePlayer) { ei.onCollideWithPlayer(playerIn); } return true; } } } return false; }
public boolean attackEntityFrom(DamageSource damagesource, float f) { Entity entity = damagesource.getTrueSource(); if(entity != null) { if(entity instanceof EntityPlayer) { ItemStack stack = ((EntityPlayer) entity).inventory.getCurrentItem(); if(stack != null) { if(stack.getItem() == FakeOres.antiOresBlade) { f = Float.MAX_VALUE; } if(stack.getItem() instanceof ItemPickaxe) { f = (f * 5); } } } } if(damagesource.isFireDamage()) { return false; } if(damagesource.isExplosion()) { f = Float.MAX_VALUE; return true; } return super.attackEntityFrom(damagesource, f); }
public ItemPickaxe setNameAndTab(String name, CreativeTabs tab, Item material) { this.setTextureName(ResourcePathHelper.getResourcesPath() + name); this.setUnlocalizedName(name); this.setCreativeTab(tab); this.material = material; return this; }
public ItemPickaxe setNameAndTab(String name, CreativeTabs tab) { this.setTextureName(ResourcePathHelper.getResourcesPath() + name); this.setUnlocalizedName(name); this.setCreativeTab(tab); return this; }
public static Item getColoredVersion(Item tool) { if (tool instanceof ItemPickaxe || tool instanceof ModPickaxe) { return ModItems.colored_pickaxe; } else if (tool instanceof ItemSpade || tool instanceof ModShovel) { return ModItems.colored_shovel; } else if (tool instanceof ItemAxe || tool instanceof ModAxe) { return ModItems.colored_axe; } else if (tool instanceof ItemHoe || tool instanceof ModHoe) { return ModItems.colored_hoe; } else if (tool instanceof Hammer) { return ModItems.colored_hammer; } else if (tool instanceof Trident) { Trident trident = (Trident) tool; switch (trident.HeadMaterial) { case EMERALD: return ModItems.diamond_colored_trident; case GOLD: return ModItems.gold_colored_trident; case IRON: return ModItems.iron_colored_trident; case STONE: return ModItems.stone_colored_trident; case WOOD: return ModItems.wood_colored_trident; default: return ModItems.colored_colored_trident; } } else if (tool instanceof ItemSword || tool instanceof ModSword) { return ModItems.colored_sword; } return null; }
public ToolPickaxe() { super(); this.vanillaEquivalent = new ItemPickaxe(ToolMaterial.EMERALD) { }; this.vanillaEquivalent.setUnlocalizedName("pickaxeDiamond") .setTextureName("diamond_pickaxe"); GameRegistry.registerItem(this.vanillaEquivalent, "dummy_pickaxe"); this.allowedEnchants.add(EnumEnchantmentType.digger); }
@Override public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) { if (!world.isRemote && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemPickaxe) { if (Config.showSecretMessage) { PlayerUtils.sendTranslatedChat(player, "chat.zss.block.secret"); } world.playSoundAtEntity(player, Sounds.ITEM_BREAK, 0.25F, 1.0F / (world.rand.nextFloat() * 0.4F + 0.5F)); } }
@Override public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) { if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemPickaxe) { if (!world.isRemote) { world.playSoundAtEntity(player, Sounds.ITEM_BREAK, 0.25F, 1.0F / (world.rand.nextFloat() * 0.4F + 0.5F)); } else if (Config.showSecretMessage) { PlayerUtils.sendTranslatedChat(player, "chat.zss.block.secret"); } } }
@Override public boolean canApply(ItemStack item) { if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemPrimalCrusher) return true; else return false; }
@Override public boolean canApply(ItemStack item) { if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade || item.getItem() instanceof ItemPrimalCrusher) return true; else return false; }
/** * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. */ protected void onCrafting(ItemStack stack) { if (this.amountCrafted > 0) { stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); } this.amountCrafted = 0; if (stack.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { this.thePlayer.triggerAchievement(AchievementList.buildWorkBench); } if (stack.getItem() instanceof ItemPickaxe) { this.thePlayer.triggerAchievement(AchievementList.buildPickaxe); } if (stack.getItem() == Item.getItemFromBlock(Blocks.furnace)) { this.thePlayer.triggerAchievement(AchievementList.buildFurnace); } if (stack.getItem() instanceof ItemHoe) { this.thePlayer.triggerAchievement(AchievementList.buildHoe); } if (stack.getItem() == Items.bread) { this.thePlayer.triggerAchievement(AchievementList.makeBread); } if (stack.getItem() == Items.cake) { this.thePlayer.triggerAchievement(AchievementList.bakeCake); } if (stack.getItem() instanceof ItemPickaxe && ((ItemPickaxe)stack.getItem()).getToolMaterial() != Item.ToolMaterial.WOOD) { this.thePlayer.triggerAchievement(AchievementList.buildBetterPickaxe); } if (stack.getItem() instanceof ItemSword) { this.thePlayer.triggerAchievement(AchievementList.buildSword); } if (stack.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { this.thePlayer.triggerAchievement(AchievementList.enchantments); } if (stack.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { this.thePlayer.triggerAchievement(AchievementList.bookcase); } if (stack.getItem() == Items.golden_apple && stack.getMetadata() == 1) { this.thePlayer.triggerAchievement(AchievementList.overpowered); } }
/** * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. */ protected void onCrafting(ItemStack stack) { if (this.amountCrafted > 0) { stack.onCrafting(this.thePlayer.world, this.thePlayer, this.amountCrafted); } this.amountCrafted = 0; if (stack.getItem() == Item.getItemFromBlock(Blocks.CRAFTING_TABLE)) { this.thePlayer.addStat(AchievementList.BUILD_WORK_BENCH); } if (stack.getItem() instanceof ItemPickaxe) { this.thePlayer.addStat(AchievementList.BUILD_PICKAXE); } if (stack.getItem() == Item.getItemFromBlock(Blocks.FURNACE)) { this.thePlayer.addStat(AchievementList.BUILD_FURNACE); } if (stack.getItem() instanceof ItemHoe) { this.thePlayer.addStat(AchievementList.BUILD_HOE); } if (stack.getItem() == Items.BREAD) { this.thePlayer.addStat(AchievementList.MAKE_BREAD); } if (stack.getItem() == Items.CAKE) { this.thePlayer.addStat(AchievementList.BAKE_CAKE); } if (stack.getItem() instanceof ItemPickaxe && ((ItemPickaxe)stack.getItem()).getToolMaterial() != Item.ToolMaterial.WOOD) { this.thePlayer.addStat(AchievementList.BUILD_BETTER_PICKAXE); } if (stack.getItem() instanceof ItemSword) { this.thePlayer.addStat(AchievementList.BUILD_SWORD); } if (stack.getItem() == Item.getItemFromBlock(Blocks.ENCHANTING_TABLE)) { this.thePlayer.addStat(AchievementList.ENCHANTMENTS); } if (stack.getItem() == Item.getItemFromBlock(Blocks.BOOKSHELF)) { this.thePlayer.addStat(AchievementList.BOOKCASE); } }
/** * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. */ protected void onCrafting(ItemStack stack) { if (this.amountCrafted > 0) { stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); } this.amountCrafted = 0; if (stack.getItem() == Item.getItemFromBlock(Blocks.CRAFTING_TABLE)) { this.thePlayer.addStat(AchievementList.BUILD_WORK_BENCH); } if (stack.getItem() instanceof ItemPickaxe) { this.thePlayer.addStat(AchievementList.BUILD_PICKAXE); } if (stack.getItem() == Item.getItemFromBlock(Blocks.FURNACE)) { this.thePlayer.addStat(AchievementList.BUILD_FURNACE); } if (stack.getItem() instanceof ItemHoe) { this.thePlayer.addStat(AchievementList.BUILD_HOE); } if (stack.getItem() == Items.BREAD) { this.thePlayer.addStat(AchievementList.MAKE_BREAD); } if (stack.getItem() == Items.CAKE) { this.thePlayer.addStat(AchievementList.BAKE_CAKE); } if (stack.getItem() instanceof ItemPickaxe && ((ItemPickaxe)stack.getItem()).getToolMaterial() != Item.ToolMaterial.WOOD) { this.thePlayer.addStat(AchievementList.BUILD_BETTER_PICKAXE); } if (stack.getItem() instanceof ItemSword) { this.thePlayer.addStat(AchievementList.BUILD_SWORD); } if (stack.getItem() == Item.getItemFromBlock(Blocks.ENCHANTING_TABLE)) { this.thePlayer.addStat(AchievementList.ENCHANTMENTS); } if (stack.getItem() == Item.getItemFromBlock(Blocks.BOOKSHELF)) { this.thePlayer.addStat(AchievementList.BOOKCASE); } }
private static AdditionalCosts getAdditionalCosts (final Item output) { int index = 0; if (output instanceof ItemArmor) { index = ((ItemArmor) output).armorType; } else if (output instanceof ItemPickaxe) { index = 4; } else if (output instanceof ItemSword) { index = 5; } else if (output instanceof ItemAxe) { index = 6; } else if (output instanceof ItemSpade) { index = 7; } else if (output instanceof ItemHoe) { index = 8; } else if (output instanceof ItemBow) { index = 9; } else if (output instanceof ItemShears) { index = 10; } else if (output instanceof ItemFishingRod) { index = 11; } return AdditionalCosts.values()[index]; }
/** * Just a shortcut method to register items and keep code cleaner. */ public static void registerItems() { ToolMaterial bronzeMaterial = EnumHelper.addToolMaterial("bronze", 2, 350, 6.5F, 2.2F, 10); ToolMaterial steelMaterial = EnumHelper.addToolMaterial("steel", 3, 700, 7.0F, 2.7F, 12); //ingots ItemList.copper_ingot = new SimpleItem("copper_ingot"); ItemList.tin_ingot = new SimpleItem("tin_ingot"); ItemList.bronze_ingot = new SimpleItem("bronze_ingot"); ItemList.steel_ingot = new SimpleItem("steel_ingot"); //bronze tools ItemList.bronze_sword = (ItemSword) new ItemSword(bronzeMaterial).setUnlocalizedName("bronze_sword").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.bronze_sword, "bronze_sword"); ItemList.bronze_shovel = (ItemSpade) new ItemSpade(bronzeMaterial).setUnlocalizedName("bronze_shovel").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.bronze_shovel, "bronze_shovel"); ItemList.bronze_axe = (ItemAxe) new SimpleAxe(bronzeMaterial).setUnlocalizedName("bronze_axe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.bronze_axe, "bronze_axe"); ItemList.bronze_pickaxe = (ItemPickaxe) new SimplePickaxe(bronzeMaterial).setUnlocalizedName("bronze_pickaxe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.bronze_pickaxe, "bronze_pickaxe"); ItemList.bronze_hoe = (ItemHoe) new ItemHoe(bronzeMaterial).setUnlocalizedName("bronze_hoe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.bronze_hoe, "bronze_hoe"); //steel tools ItemList.steel_sword = (ItemSword) new ItemSword(steelMaterial).setUnlocalizedName("steel_sword").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.steel_sword, "steel_sword"); ItemList.steel_shovel = (ItemSpade) new ItemSpade(steelMaterial).setUnlocalizedName("steel_shovel").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.steel_shovel, "steel_shovel"); ItemList.steel_axe = (ItemAxe) new SimpleAxe(steelMaterial).setUnlocalizedName("steel_axe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.steel_axe, "steel_axe"); ItemList.steel_pickaxe = (ItemPickaxe) new SimplePickaxe(steelMaterial).setUnlocalizedName("steel_pickaxe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.steel_pickaxe, "steel_pickaxe"); ItemList.steel_hoe = (ItemHoe) new ItemHoe(steelMaterial).setUnlocalizedName("steel_hoe").setCreativeTab(FutureCraft.tabFutureCraft); GameRegistry.registerItem(ItemList.steel_hoe, "steel_hoe"); //space suit ItemList.space_suit_helmet = new ItemSpaceSuit(ArmorMaterial.IRON, 2, 0); GameRegistry.registerItem(ItemList.space_suit_helmet, "space_suit_helmet"); ItemList.space_suit_chestplate = new ItemSpaceSuit(ArmorMaterial.IRON, 2, 1); GameRegistry.registerItem(ItemList.space_suit_chestplate, "space_suit_chestplate"); ItemList.space_suit_leggings = new ItemSpaceSuit(ArmorMaterial.IRON, 2, 2); GameRegistry.registerItem(ItemList.space_suit_leggings, "space_suit_leggings"); ItemList.space_suit_boots = new ItemSpaceSuit(ArmorMaterial.IRON, 2, 3); GameRegistry.registerItem(ItemList.space_suit_boots, "space_suit_boots"); //misc ItemList.stone_channel = new SimpleItem("stone_channel"); ItemList.stone_cast = new SimpleItem("stone_cast"); ItemList.multimeter = new ItemMultimeter("multimeter"); ItemList.itemLaser = new ItemLaser("laser"); ItemList.creative_tab = new SimpleItem("creative_tab", false); }
/** * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. */ protected void onCrafting(ItemStack par1ItemStack) { par1ItemStack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); this.amountCrafted = 0; if (par1ItemStack.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { this.thePlayer.addStat(AchievementList.buildWorkBench, 1); } if (par1ItemStack.getItem() instanceof ItemPickaxe) { this.thePlayer.addStat(AchievementList.buildPickaxe, 1); } if (par1ItemStack.getItem() == Item.getItemFromBlock(Blocks.furnace)) { this.thePlayer.addStat(AchievementList.buildFurnace, 1); } if (par1ItemStack.getItem() instanceof ItemHoe) { this.thePlayer.addStat(AchievementList.buildHoe, 1); } if (par1ItemStack.getItem() == Items.bread) { this.thePlayer.addStat(AchievementList.makeBread, 1); } if (par1ItemStack.getItem() == Items.cake) { this.thePlayer.addStat(AchievementList.bakeCake, 1); } if (par1ItemStack.getItem() instanceof ItemPickaxe && ((ItemPickaxe)par1ItemStack.getItem()).func_150913_i() != Item.ToolMaterial.WOOD) { this.thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); } if (par1ItemStack.getItem() instanceof ItemSword) { this.thePlayer.addStat(AchievementList.buildSword, 1); } if (par1ItemStack.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { this.thePlayer.addStat(AchievementList.enchantments, 1); } if (par1ItemStack.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { this.thePlayer.addStat(AchievementList.bookcase, 1); } }