@SubscribeEvent public void OnItemPickup(ItemPickupEvent event){ if(event.pickedUp.getEntityItem().getItem().equals(Item.getItemFromBlock(Blocks.dirt))) { event.player.addStat(ModAchievements.dirt, 1); } if(event.pickedUp.getEntityItem().getItem().equals(Item.getItemFromBlock(ModBlocks.oreCopper))) { event.player.addStat(ModAchievements.mineCopper, 1); } if(event.pickedUp.getEntityItem().getItem().equals(ModItems.uranium)) { event.player.addStat(ModAchievements.mineUranium, 1); } if(event.pickedUp.getEntityItem().getItem().equals(ModItems.iridium)) { event.player.addStat(ModAchievements.mineUranium, 1); } if(event.pickedUp.getEntityItem().getItem().equals(ModItems.plutonium)) { event.player.addStat(ModAchievements.mineUranium, 1); } if(UtilityCheck.isItemImpureGem(event.pickedUp.getEntityItem().getItem())) { event.player.addStat(ModAchievements.mineGem, 1); } }
@SubscribeEvent public void notifyPickup(ItemPickupEvent event) { EntityPlayer player = event.player; if (HandlerPlayerTick.getMagnetizationLevel(player) > 0) { player.triggerAchievement(attractedDrop); } ItemStack iStack = event.pickedUp.getEntityItem(); if (iStack != null) { Item item = iStack.getItem(); if ((item == null) || (player == null)) return; if (item == MeteorItems.itemMeteorChips || item == MeteorItems.itemFrezaCrystal || item == MeteorItems.itemKreknoChip) { player.triggerAchievement(materialGather); } else if (item == MeteorItems.itemRedMeteorGem) { player.triggerAchievement(meteorManipulator); } } }
@SubscribeEvent public void onItemPickup(ItemPickupEvent event) { if (!addItemPickup.isEmpty()) { hItemPickup.addAll(addItemPickup); addItemPickup.clear(); } for (Iterator<LIHandler> it = hItemPickup.iterator(); it.hasNext(); ) { LIHandler handler = it.next(); if (handler.isDead()) it.remove(); else handler.trigger(event); } }
@SubscribeEvent public void itemPickup(ItemPickupEvent eventPicked) { if(eventPicked.pickedUp.getEntityItem().getItem() == RoadStuffItems.itemBitumen && eventPicked.pickedUp.getEntityItem().getItemDamage() == 0) { if(eventPicked.player != null) eventPicked.player.triggerAchievement(RoadStuffAchievements.getBitumen); } }
@SubscribeEvent public void onItemPickedUp(ItemPickupEvent event) { ItemStack stack = event.pickedUp.getEntityItem(); if (stack != null && stack.getItem() instanceof IPickupAchievement) { Achievement achievement = ((IPickupAchievement) stack.getItem()).getAchievementOnPickup(stack, event.player, event.pickedUp); if(achievement != null) { event.player.addStat(achievement, 1); } } }
@SubscribeEvent public void onItemPickup(ItemPickupEvent event){ Item item = event.pickedUp.getEntityItem().getItem(); if(item.equals(TDETools.ancient_pickaxe) || item.equals(TDETools.ancient_axe) || item.equals(TDETools.ancient_shovel) || item.equals(TDETools.ancient_hoe) || item.equals(TDEWeapons.ancient_dagger) || item.equals(TDEWeapons.ancient_sword)){ AchievementHandler.setAchieved(TDEAchievements.ancient_upgrade); ScoreStat.addScore(1); } if(item.equals(TDEWeapons.death_sword)){ AchievementHandler.setAchieved(TDEAchievements.death_lord); ScoreStat.addScore(1); } }
@SubscribeEvent public void onPlayerItemPickup(ItemPickupEvent event) { for(String page : TechTree.pages.keySet()) { ArrayList<TechTreeComponent> components = TechTree.pages.get(page); for(TechTreeComponent component : components) { if(component.goal.hasReachedGoal(event.pickedUp.getEntityItem()) && TechTreeServer.canUnlockComponent(event.player.getCommandSenderName(), component.pageName, component.name)) { TechTreeServer.unlockComponent(event.player.getCommandSenderName(), component.pageName, component.name); } } } }
@SubscribeEvent public void onPickup(ItemPickupEvent event){ String pickedUpItem = event.pickedUp.getEntityItem().getItem().getUnlocalizedName(); if(pickedUpItem.equals(SoulItems.BlueGel.get().getUnlocalizedName())){ event.player.addStat(InitAchievements.gel, 1); } if(pickedUpItem.equals(SoulItems.FrostShard.get().getUnlocalizedName()) || pickedUpItem.equals(SoulItems.StrengthShard.get().getUnlocalizedName()) || pickedUpItem.equals(SoulItems.BucketSoulWater.get().getUnlocalizedName())){ event.player.addStat(InitAchievements.shards, 1); } }
@SubscribeEvent public void notifyPickup(ItemPickupEvent e) { }
@SubscribeEvent public void PickupPatStar(PlayerEvent.ItemPickupEvent event) { event.setResult(ALLOW); //event.player.triggerAchievement(Achievements.achievementPatStar); if (event.pickedUp.getEntityItem() == itemstack) { event.player.addStat(Achievements.achievementPatStar, 1); event.setResult(ALLOW); } }
@SubscribeEvent public void notifyPickup(ItemPickupEvent event) { }
@SubscribeEvent public void onItemPickup(ItemPickupEvent event) { triggerAchievement(AchievementSource.ITEM_PICKUP, event.player, event.pickedUp.getEntityItem()); }
@SubscribeEvent public void PickupJenStar(PlayerEvent.ItemPickupEvent event) { event.setResult(ALLOW); //event.player.triggerAchievement(Achievements.achievementJenStar); if (event.pickedUp.getEntityItem() == itemstack) { event.player.addStat(Achievements.achievementJenStar, 1); } }