List of usage examples for net.minecraftforge.event AttachCapabilitiesEvent.Entity addCapability
public void addCapability(ResourceLocation key, ICapabilityProvider cap)
From source file:com.fatality.skillcraft.common.events.EventPlayer.java
License:Open Source License
@SubscribeEvent public void AttachCapability(AttachCapabilitiesEvent.Entity event) { if (!event.getEntity().hasCapability(SkillProvider.SKILLS, null) && event.getEntity() instanceof EntityPlayer) { event.addCapability(new ResourceLocation(ModInfo.MOD_NAME, "skills"), new SkillProvider(new SkillCapability())); }/*w w w . j a v a2s. c om*/ }
From source file:mod.rankshank.arbitraria.common.vars.ArbitraryCaps.java
@SubscribeEvent public static void attachEntity(AttachCapabilitiesEvent.Entity event) { if (event.getEntity() instanceof EntityLivingBase) event.addCapability(STATS_KEY, new ArbitraryStatus((EntityLivingBase) event.getEntity())); }
From source file:necauqua.mods.cm.EntitySizeManager.java
License:Apache License
@SubscribeEvent public void attachCapabilities(AttachCapabilitiesEvent.Entity e) { e.addCapability(new ResourceLocation("chiseled_me", "size"), new EntitySizeData(e.getEntity())); }