本文整理匯總了Java中cpw.mods.fml.common.gameevent.PlayerEvent.ItemPickupEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java PlayerEvent.ItemPickupEvent方法的具體用法?Java PlayerEvent.ItemPickupEvent怎麽用?Java PlayerEvent.ItemPickupEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cpw.mods.fml.common.gameevent.PlayerEvent
的用法示例。
在下文中一共展示了PlayerEvent.ItemPickupEvent方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onItemPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onItemPickup(PlayerEvent.ItemPickupEvent event)
{
Item item;
item = event.pickedUp.getEntityItem().getItem();
if (item == ItemRegister.STAFF_BUMPING || item == ItemRegister.STAFF_ELFIC || item == ItemRegister.STAFF_LIGHTNING)
event.player.triggerAchievement(AchievementList.MAGIC_STAFF);
else if (item == ItemRegister.SULFURAS)
event.player.triggerAchievement(AchievementList.SULFURAS);
}
示例2: onItemPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onItemPickup(PlayerEvent.ItemPickupEvent event)
{
// TODO: Implement ItemPickupEventHandler (Achievement on ItemPickup ??)
//if (event.pickedUp.getEntityItem().getItem().equals(ModItems.testItem))
//if (event.pickedUp.getEntityItem().getItem().equals(Item.getItemFromBlock(ModBlocks.testBlock))
//event.player.addStat(Thallus.testAchievement, 1);
}
示例3: onPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPickup(PlayerEvent.ItemPickupEvent event) {
if(event.pickedUp != null) {
Item item = event.pickedUp.getEntityItem().getItem();
zmaster587.libVulpes.api.material.Material mat = LibVulpes.materialRegistry.getMaterialFromItemStack( event.pickedUp.getEntityItem());
if(mat != null && mat.getUnlocalizedName().contains("Dilithium"))
event.player.triggerAchievement(ARAchivements.dilithiumCrystals);
}
}
示例4: PickupEvent
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void PickupEvent(PlayerEvent.ItemPickupEvent event){
if(event.pickedUp.getEntityItem().getItem() == ModItems.nileGrain){
event.player.addStat(ModAchievements.NileStart, 1);
}
if(Constants.DEF_DARKLOAD == true){
if(event.pickedUp.getEntityItem().getItem() == ModItems.darkGrain){
event.player.addStat(ModAchievements.DarkStart, 1);
}
}
}
示例5: onPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPickup(PlayerEvent.ItemPickupEvent e){
if(e.pickedUp.getEntityItem().isItemEqual(new ItemStack(bonytechmod.viceore))) {
e.player.addStat(bonytechmod.viceoreAchievement, 1);
}
}
示例6: onPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onPickup(PlayerEvent.ItemPickupEvent e){
if(e.pickedUp.getEntityItem().isItemEqual(new ItemStack(bonytechmod.nytore))) {
e.player.addStat(bonytechmod.nytoreAchievement, 1);
}
}
示例7: PickupPatStar
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@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);
}
}
示例8: pickUpEvent
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void pickUpEvent(PlayerEvent.ItemPickupEvent event) {
if(event.pickedUp.getEntityItem().isItemEqual(new ItemStack(Ore.oreBituminousCoal))) {
event.player.addStat(Achievements.enterPlasmaticAge, 1);
}
}
示例9: pickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void pickup(PlayerEvent.ItemPickupEvent event) {
if (isServer() && RandomUtils.rnd.nextInt(10) == 0)
DiscoveryManager.unlockItem(QADiscoveries.Item.MAGNET.get().getKey(), event.player, false);
}
示例10: onItemPickup
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onItemPickup(PlayerEvent.ItemPickupEvent event) {
if (event.pickedUp.getEntityItem().getItem() == CPCItems.jeffKnife) {
event.player.addStat(CPCAchievementList.noSleep, 1);
}
}
示例11: PickupJenStar
import cpw.mods.fml.common.gameevent.PlayerEvent; //導入方法依賴的package包/類
@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);
}
}