Search in sources :

Example 1 with MiscCapabilityProvider

use of com.teamwizardry.wizardry.api.capability.player.miscdata.MiscCapabilityProvider in project Wizardry by TeamWizardry.

the class ModCapabilities method attachEntity.

@SubscribeEvent
public static void attachEntity(AttachCapabilitiesEvent<Entity> e) {
    if (e.getObject() instanceof EntityPlayer) {
        ManaCapabilityProvider manaCap = new ManaCapabilityProvider(new DefaultManaCapability());
        e.addCapability(new ResourceLocation(Wizardry.MODID, "capability_mana"), manaCap);
        MiscCapabilityProvider miscCap = new MiscCapabilityProvider(new DefaultMiscCapability());
        e.addCapability(new ResourceLocation(Wizardry.MODID, "capability_misc"), miscCap);
    }
}
Also used : DefaultManaCapability(com.teamwizardry.wizardry.api.capability.player.mana.DefaultManaCapability) ResourceLocation(net.minecraft.util.ResourceLocation) EntityPlayer(net.minecraft.entity.player.EntityPlayer) ManaCapabilityProvider(com.teamwizardry.wizardry.api.capability.player.mana.ManaCapabilityProvider) MiscCapabilityProvider(com.teamwizardry.wizardry.api.capability.player.miscdata.MiscCapabilityProvider) DefaultMiscCapability(com.teamwizardry.wizardry.api.capability.player.miscdata.DefaultMiscCapability) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

DefaultManaCapability (com.teamwizardry.wizardry.api.capability.player.mana.DefaultManaCapability)1 ManaCapabilityProvider (com.teamwizardry.wizardry.api.capability.player.mana.ManaCapabilityProvider)1 DefaultMiscCapability (com.teamwizardry.wizardry.api.capability.player.miscdata.DefaultMiscCapability)1 MiscCapabilityProvider (com.teamwizardry.wizardry.api.capability.player.miscdata.MiscCapabilityProvider)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1