Search in sources :

Example 26 with CapManager

use of com.teamwizardry.wizardry.api.capability.CapManager in project Wizardry by TeamWizardry.

the class PotionSteroid method removeAttributesModifiersFromEntity.

@Override
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, @Nonnull AbstractAttributeMap attributeMapIn, int amplifier) {
    CapManager manager = new CapManager(entityLivingBaseIn);
    manager.setMana(0);
    manager.setBurnout(manager.getMaxBurnout());
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.HUNGER, 200, 3, true, true));
    entityLivingBaseIn.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 200, 3, true, true));
    if (!(entityLivingBaseIn instanceof EntityPlayer) || !((EntityPlayer) entityLivingBaseIn).capabilities.isCreativeMode)
        entityLivingBaseIn.setHealth(0.5f);
    super.removeAttributesModifiersFromEntity(entityLivingBaseIn, attributeMapIn, amplifier);
}
Also used : CapManager(com.teamwizardry.wizardry.api.capability.CapManager) PotionEffect(net.minecraft.potion.PotionEffect) EntityPlayer(net.minecraft.entity.player.EntityPlayer)

Aggregations

CapManager (com.teamwizardry.wizardry.api.capability.CapManager)26 Vec3d (net.minecraft.util.math.Vec3d)8 BlockPos (net.minecraft.util.math.BlockPos)6 ItemStack (net.minecraft.item.ItemStack)5 Entity (net.minecraft.entity.Entity)4 EntityLivingBase (net.minecraft.entity.EntityLivingBase)3 EntityPlayer (net.minecraft.entity.player.EntityPlayer)3 TileEntity (net.minecraft.tileentity.TileEntity)3 ParticleBuilder (com.teamwizardry.librarianlib.features.particle.ParticleBuilder)2 InterpFadeInOut (com.teamwizardry.librarianlib.features.particle.functions.InterpFadeInOut)2 ClientRunnable (com.teamwizardry.librarianlib.features.utilities.client.ClientRunnable)2 IWizardryCapability (com.teamwizardry.wizardry.api.capability.IWizardryCapability)2 PacketExplode (com.teamwizardry.wizardry.common.network.PacketExplode)2 TilePearlHolder (com.teamwizardry.wizardry.common.tile.TilePearlHolder)2 EntityItem (net.minecraft.entity.item.EntityItem)2 PotionEffect (net.minecraft.potion.PotionEffect)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 NetworkRegistry (net.minecraftforge.fml.common.network.NetworkRegistry)2 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)2 BasicAnimation (com.teamwizardry.librarianlib.features.animator.animations.BasicAnimation)1