net.minecraftforge.common.capabilities.CapabilityManager Java Examples
The following examples show how to use
net.minecraftforge.common.capabilities.CapabilityManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SimpleCapabilityManager.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
public static void init() { registerCapabilityWithNoDefault(IEnergyContainer.class); registerCapabilityWithNoDefault(IElectricItem.class); registerCapabilityWithNoDefault(IWorkable.class); registerCapabilityWithNoDefault(ICoverable.class); registerCapabilityWithNoDefault(IControllable.class); registerCapabilityWithNoDefault(IWrenchItem.class); registerCapabilityWithNoDefault(IScrewdriverItem.class); registerCapabilityWithNoDefault(ISoftHammerItem.class); //internal capabilities CapabilityManager.INSTANCE.register(GTWorldGenCapability.class, GTWorldGenCapability.STORAGE, GTWorldGenCapability.FACTORY); }
Example #2
Source File: PlayerCivilizationCapabilityImpl.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static void register() { CapabilityManager.INSTANCE.register(PlayerCivilizationCapability.class, new PlayerCivilizationStorage(), new Callable<PlayerCivilizationCapability>() { @Override public PlayerCivilizationCapability call() throws Exception { return null; } }); }
Example #3
Source File: ProxyCommon.java From WearableBackpacks with MIT License | 5 votes |
public void preInit() { MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(WearableBackpacks.CONFIG); MinecraftForge.EVENT_BUS.register(WearableBackpacks.CONTENT); MinecraftForge.EVENT_BUS.register(new DyeWashingHandler()); // FIXME: BackpackCapability requires an entity for its constructor. WHAT WAS I THINKING? CapabilityManager.INSTANCE.register(IBackpack.class, new BackpackCapability.Storage(), BackpackCapability::new); }
Example #4
Source File: SquashableMod.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void onPreInit(FMLPreInitializationEvent event) { CapabilityManager.INSTANCE.register(Squashable.class, Squashable.Storage.INSTANCE, Squashable::new); NETWORK.registerMessage(SquashEntityMessage.Handler.class, SquashEntityMessage.class, 0, Side.CLIENT); }
Example #5
Source File: ModCapabilities.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public static void preInit() { CapabilityManager.INSTANCE.register(IManaCapability.class, new ManaCapabilityStorage(), DefaultManaCapability::new); CapabilityManager.INSTANCE.register(IMiscCapability.class, new MiscCapabilityStorage(), DefaultMiscCapability::new); }
Example #6
Source File: WizardryWorldCapability.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public static void init() { CapabilityManager.INSTANCE.register(WizardryWorld.class, new WizardryWorldStorage(), StandardWizardryWorld::create); }
Example #7
Source File: WizardryChunkCapability.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
public static void init() { CapabilityManager.INSTANCE.register(WizardryChunk.class, new WizardryChunkStorage(), StandardWizardryChunk::create); }
Example #8
Source File: CommonProxy.java From Cyberware with MIT License | 4 votes |
public void preInit() { CapabilityManager.INSTANCE.register(ICyberwareUserData.class, CyberwareUserDataImpl.STORAGE, CyberwareUserDataImpl.class); CyberwareContent.preInit(); CyberwarePacketHandler.preInit(); }
Example #9
Source File: ValkyrienSkiesWorld.java From Valkyrien-Skies with Apache License 2.0 | 4 votes |
private void registerCapabilities() { CapabilityManager.INSTANCE.register(ICapabilityAntiGravity.class, new StorageAntiGravity(), ImplCapabilityAntiGravity::new); }
Example #10
Source File: ValkyrienSkiesControl.java From Valkyrien-Skies with Apache License 2.0 | 4 votes |
private void registerCapabilities() { CapabilityManager.INSTANCE.register(ICapabilityLastRelay.class, new StorageLastRelay(), ImplCapabilityLastRelay::new); }
Example #11
Source File: ValkyrienSkiesMod.java From Valkyrien-Skies with Apache License 2.0 | 4 votes |
private void registerCapabilities() { CapabilityManager.INSTANCE.register(IValkyrienSkiesWorldData.class, new StorageValkyrienSkiesWorldData(), ImplValkyrienSkiesWorldData::new); }
Example #12
Source File: ENCapabilities.java From ExNihiloAdscensio with MIT License | 4 votes |
public static void init() { CapabilityManager.INSTANCE.register(ICapabilityHeat.class, CapabilityHeatManager.INSTANCE, CapabilityHeatManager.INSTANCE); }
Example #13
Source File: CapabilityDamageXp.java From TinkersToolLeveling with MIT License | 4 votes |
public static void register() { CapabilityManager.INSTANCE.register(IDamageXp.class, INSTANCE, DamageXpHandler::new); }
Example #14
Source File: ItemConverter.java From NOVA-Core with GNU Lesser General Public License v3.0 | 4 votes |
private void registerCapabilities() { CapabilityManager.INSTANCE.register(NovaItem.class, CapabilityUtil.createStorage( (capability, instance, side) -> instance.serializeNBT(), (capability, instance, side, nbt) -> instance.deserializeNBT(nbt)), () -> null); }
Example #15
Source File: EnderUtilitiesCapabilities.java From enderutilities with GNU Lesser General Public License v3.0 | 4 votes |
public static void register() { CapabilityManager.INSTANCE.register(IPortalCooldownCapability.class, new DefaultPortalCooldownStorage<>(), () -> new PortalCooldownCapability()); }