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


Java CapabilityInject類代碼示例

本文整理匯總了Java中net.minecraftforge.common.capabilities.CapabilityInject的典型用法代碼示例。如果您正苦於以下問題:Java CapabilityInject類的具體用法?Java CapabilityInject怎麽用?Java CapabilityInject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CapabilityInject類屬於net.minecraftforge.common.capabilities包,在下文中一共展示了CapabilityInject類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: capRegistered1

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(IEnergyStorage.class)
private static void capRegistered1(@Nonnull Capability<IEnergyStorage> cap) {
  try {
    ForgeAdapter.capRegistered(cap);
  } catch (Throwable e) {
    Log.error("Forge Energy failed to load. Forge Energy integration disabled. Reason: ");
    e.printStackTrace();
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:10,代碼來源:CapInjectHandler.java

示例2: initBaubles

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(IBaublesItemHandler.class)
public static void initBaubles(Capability cap)
{
    BeltFinder.instance = new BeltFinderBaubles();
}
 
開發者ID:gigaherz,項目名稱:ToolBelt,代碼行數:6,代碼來源:BeltFinderBaubles.java

示例3: producer

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(ITeslaProducer.class)
public static void producer(Capability tesla)
{
    TeslaControllerBase.PRODUCER = new Producer(tesla);
}
 
開發者ID:gigaherz,項目名稱:Ender-Rift,代碼行數:6,代碼來源:TeslaController.java

示例4: consumer

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(ITeslaConsumer.class)
public static void consumer(Capability tesla)
{
    TeslaControllerBase.CONSUMER = new Consumer(tesla);
}
 
開發者ID:gigaherz,項目名稱:Ender-Rift,代碼行數:6,代碼來源:TeslaController.java

示例5: capRegistered2

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(ITeslaHolder.class)
private static void capRegistered2(@Nonnull Capability<ITeslaHolder> cap) {
  try {
    TeslaAdapter.capRegistered(cap);
  } catch (Throwable e) {
    Log.error("Tesla API failed to load. Tesla integration disabled. Reason:");
    e.printStackTrace();
  }

}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:11,代碼來源:CapInjectHandler.java

示例6: holder

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(ITeslaHolder.class)
public static void holder(Capability tesla)
{
    TeslaControllerBase.HOLDER = new Holder(tesla);
}
 
開發者ID:gigaherz,項目名稱:Ender-Rift,代碼行數:6,代碼來源:TeslaController.java

示例7: initBaubles

import net.minecraftforge.common.capabilities.CapabilityInject; //導入依賴的package包/類
@CapabilityInject(IBaublesItemHandler.class)
public static <T> void initBaubles(Capability<T> capability)
{
    SlotItemHandlerBaubles.setBaublesItemValidator(new BaublesItemValidator());
    ContainerInventorySwapper.setBaublesInvProvider(new BaublesInvProvider());
}
 
開發者ID:maruohon,項目名稱:enderutilities,代碼行數:7,代碼來源:BaublesCompat.java


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