當前位置: 首頁>>代碼示例>>Java>>正文


Java PlayerEvent.ItemPickupEvent方法代碼示例

本文整理匯總了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);

  }
 
開發者ID:GhostMonk3408,項目名稱:MidgarCrusade,代碼行數:14,代碼來源:JoueurEvent.java

示例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);
}
 
開發者ID:Kithio,項目名稱:Thallus,代碼行數:11,代碼來源:PlayerEventHandler.java

示例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);
	}
}
 
開發者ID:zmaster587,項目名稱:AdvancedRocketry,代碼行數:12,代碼來源:PlanetEventHandler.java

示例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);		
		}
	}
}
 
開發者ID:NovaViper,項目名稱:ZeroQuest,代碼行數:12,代碼來源:AchievementEvents.java

示例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);
	}
	
}
 
開發者ID:xbony2,項目名稱:Bitm,代碼行數:8,代碼來源:viceoreEvent.java

示例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);
	}
	
}
 
開發者ID:xbony2,項目名稱:Bitm,代碼行數:8,代碼來源:nytoreEvent.java

示例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);
	}
	
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:17,代碼來源:OnPickupPatStarEvent.java

示例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);
    }
}
 
開發者ID:ItakPC,項目名稱:PlasmaticSpace,代碼行數:7,代碼來源:EventHandler.java

示例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);
}
 
開發者ID:MSourceCoded,項目名稱:Quantum-Anomalies,代碼行數:6,代碼來源:DiscoveryListener.java

示例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);
    }
}
 
開發者ID:hanetzer,項目名稱:CreepyPastaCraft,代碼行數:7,代碼來源:CPCItemPickupHandler.java

示例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);
	}
	
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:16,代碼來源:OnPickupJenStarEvent.java


注:本文中的cpw.mods.fml.common.gameevent.PlayerEvent.ItemPickupEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。