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