本文整理汇总了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();
}
}
示例2: initBaubles
import net.minecraftforge.common.capabilities.CapabilityInject; //导入依赖的package包/类
@CapabilityInject(IBaublesItemHandler.class)
public static void initBaubles(Capability cap)
{
BeltFinder.instance = new BeltFinderBaubles();
}
示例3: producer
import net.minecraftforge.common.capabilities.CapabilityInject; //导入依赖的package包/类
@CapabilityInject(ITeslaProducer.class)
public static void producer(Capability tesla)
{
TeslaControllerBase.PRODUCER = new Producer(tesla);
}
示例4: consumer
import net.minecraftforge.common.capabilities.CapabilityInject; //导入依赖的package包/类
@CapabilityInject(ITeslaConsumer.class)
public static void consumer(Capability tesla)
{
TeslaControllerBase.CONSUMER = new Consumer(tesla);
}
示例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();
}
}
示例6: holder
import net.minecraftforge.common.capabilities.CapabilityInject; //导入依赖的package包/类
@CapabilityInject(ITeslaHolder.class)
public static void holder(Capability tesla)
{
TeslaControllerBase.HOLDER = new Holder(tesla);
}
示例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());
}