当前位置: 首页>>代码示例>>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;未经允许,请勿转载。