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

The following are Jave code examples for showing how to use extinguish() of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Industrial-Foregoing   File:   Source Code and License Vote up 5 votes
public void onDrink(World world, BlockPos pos, FluidStack stack, EntityPlayer player, boolean fromFluidContainer) {
    NBTTagCompound tag = player.getEntityData();
    if (tag.hasKey("lavaDrink") && world.getTotalWorldTime() - tag.getLong("lavaDrink") < 120) { //6 Seconds to drink water after drinking lava to create obsidian
        player.entityDropItem(new ItemStack(Blocks.OBSIDIAN), player.getEyeHeight());

        tag.setLong("lavaDrink", 0);
        world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 1.5F, world.rand.nextFloat() * 0.1F + 0.9F);