<commit_before>package soot.handler;

import it.unimi.dsi.fastutil.objects.Object2BooleanOpenHashMap;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.MobEffects;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import soot.Config;
import teamroots.embers.RegistryManager;

public class GolemHandler {
    static Object2BooleanOpenHashMap<Class> golemClassCache = new Object2BooleanOpenHashMap<>();

    @SubscribeEvent(priority = EventPriority.LOWEST)
    public static void onEntityDamaged(LivingHurtEvent event)
    {
        EntityLivingBase target = event.getEntityLiving();
        float damage = event.getAmount();
        DamageSource source = event.getSource();

        if(Config.GOLEMS_TYRFING_WEAK && source.getImmediateSource() instanceof EntityLivingBase)
        {
            EntityLivingBase attacker = (EntityLivingBase) source.getImmediateSource();
            if(attacker.getHeldItemMainhand().getItem() == RegistryManager.tyrfing && isGolem(target))
                event.setAmount(damage * 2.5f + 1.0f);
        }
    }
<commit_msg>- Changes the fastutil hashmap back to a regular java one. Possibly fixes #81<commit_after>package soot.handler;

import it.unimi.dsi.fastutil.objects.Object2BooleanOpenHashMap;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.MobEffects;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import soot.Config;
import teamroots.embers.RegistryManager;

public class GolemHandler {
    static Map<Class,Boolean> golemClassCache = new HashMap<>();

    @SubscribeEvent(priority = EventPriority.LOWEST)
    public static void onEntityDamaged(LivingHurtEvent event)
    {
        EntityLivingBase target = event.getEntityLiving();
        float damage = event.getAmount();
        DamageSource source = event.getSource();

        if(Config.GOLEMS_TYRFING_WEAK && source.getImmediateSource() instanceof EntityLivingBase)
        {
            EntityLivingBase attacker = (EntityLivingBase) source.getImmediateSource();
            if(attacker.getHeldItemMainhand().getItem() == RegistryManager.tyrfing && isGolem(target))
                event.setAmount(damage * 2.5f + 1.0f);
        }
    }

{'fraction_non_alphanumeric': 0.09500351864883885, 'fraction_numerical': 0.0049261083743842365, 'mean_word_length': 4.531128404669261, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '518691', 'n_tokens_mistral': 847, 'n_tokens_neox': 815, 'n_words': 141}