Java Code Examples for net.minecraft.entity.player.EntityPlayer#extinguish()

The following examples show how to use net.minecraft.entity.player.EntityPlayer#extinguish() . 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: InfernalWandUpdate.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 6 votes vote down vote up
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
    if(player.ticksExisted % 100 == 0){
        if(player.worldObj.provider.dimensionId == -1){
            for(int x = 0;x < primals.length;x++){
                if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 10) {
                    ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
                }
            }
        }
        
        if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, Aspect.FIRE) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 5) {
            ((ItemWandCasting)itemstack.getItem()).addVis(itemstack, Aspect.FIRE, 1, true);
        }
    }
    
    if(player.isBurning())
        player.extinguish();
        
    if(player.isPotionActive(Potion.wither.id)) {
        if(player.worldObj.isRemote)
            player.removePotionEffectClient(Potion.wither.id);
        else
            player.removePotionEffect(Potion.wither.id);
    }
}
 
Example 2
Source File: MoCEntityHorse.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
public void NightmareEffect()
{
    int i = MathHelper.floor_double(posX);
    int j = MathHelper.floor_double(boundingBox.minY);
    int k = MathHelper.floor_double(posZ);
    worldObj.setBlock(i - 1, j, k - 1, Block.fire.blockID, 0, 3);//MC1.5
    EntityPlayer entityplayer = (EntityPlayer) riddenByEntity;
    if ((entityplayer != null) && (entityplayer.isBurning()))
    {
        // entityplayer.fire = 0;
        entityplayer.extinguish();
    }
    setNightmareInt(getNightmareInt() - 1);
}
 
Example 3
Source File: NEIServerUtils.java    From NotEnoughItems with MIT License 4 votes vote down vote up
public static void healPlayer(EntityPlayer player) {
    player.heal(20);
    player.getFoodStats().addStats(20, 1);
    player.extinguish();
    player.clearActivePotions();
}
 
Example 4
Source File: NEIServerUtils.java    From NotEnoughItems with MIT License 4 votes vote down vote up
public static void healPlayer(EntityPlayer player) {
    player.heal(20);
    player.getFoodStats().addStats(20, 1);
    player.extinguish();
}