<commit_before>package com.kihira.corruption.common.corruption;

import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;

public class WaterAllergyCorruption extends AbstractCorruption {

    private final Multiset<String> playerCount = HashMultiset.create();

    public WaterAllergyCorruption() {
        super("waterAllergy");
    }

    @Override
    public void init(String player, Side side) {
        if (side == Side.SERVER) {
            this.playerCount.add(player);
        }
    }

    @Override
    public void onUpdate(EntityPlayer player, Side side) {
        if (side == Side.SERVER) {
            if (player.isInWater() || (player.worldObj.isRaining() && player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ)) && player.worldObj.getTotalWorldTime() % 10 == 0) {
                player.attackEntityFrom(DamageSource.drown, 1);
            }
            this.playerCount.add(player.getCommandSenderName());
        }
    }

    @Override
    public void finish(String player, Side side) {
        this.playerCount.setCount(player, 0);
    }

    @Override
    public boolean shouldContinue(EntityPlayer player, Side side) {
        return this.playerCount.count(player.getCommandSenderName()) < 1000;
    }

    @Override
    public String getPageDataName() {
        return "waterAllergy";
    }

    @Override
    public boolean canApply(EntityPlayer player) {
        return true;
    }
}<commit_msg>Water allergy applies to potions/wate bottle<commit_after>package com.kihira.corruption.common.corruption;

import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;

public class WaterAllergyCorruption extends AbstractCorruption {

    private final Multiset<String> playerCount = HashMultiset.create();

    public WaterAllergyCorruption() {
        super("waterAllergy");
    }

    @Override
    public void init(String player, Side side) {
        if (side == Side.SERVER) {
            this.playerCount.add(player);
        }
    }

    @Override
    public void onUpdate(EntityPlayer player, Side side) {
        if (side == Side.SERVER) {
            if (player.isInWater() || (player.worldObj.isRaining() && player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ)) && player.worldObj.getTotalWorldTime() % 10 == 0) {
                player.attackEntityFrom(DamageSource.drown, 1);
            }
            if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemPotion && && player.worldObj.getTotalWorldTime() % 10 == 0){
                player.dropOneItem(true);
                player.attackEntityFrom(DamageSource.drown, 1);
                player.addChatComponentMessage(new ChatComponentText("The condensation from the bottle burns your hands, causing you to drop it."));
            }
            this.playerCount.add(player.getCommandSenderName());
        }
    }

    @Override
    public void finish(String player, Side side) {
        this.playerCount.setCount(player, 0);
    }

    @Override
    public boolean shouldContinue(EntityPlayer player, Side side) {
        return this.playerCount.count(player.getCommandSenderName()) < 1000;
    }

    @Override
    public String getPageDataName() {
        return "waterAllergy";
    }

    @Override
    public boolean canApply(EntityPlayer player) {
        return true;
    }
}
{'fraction_non_alphanumeric': 0.1087425796006476, 'fraction_numerical': 0.0059363194819212085, 'mean_word_length': 3.0162513542795235, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6003375', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1045, 'n_words': 216}