<commit_before>package us.myles.ViaVersion.api.entities;

import com.google.common.base.Optional;
import lombok.AllArgsConstructor;
import lombok.Getter;
import us.myles.ViaVersion.api.Via;

import java.util.HashMap;
import java.util.Map;


public class Entity1_15Types {
    public static EntityType getTypeFromId(int typeID) {
        Optional<EntityType> type = EntityType.findById(typeID);

        if (!type.isPresent()) {
            Via.getPlatform().getLogger().severe("Could not find type id " + typeID);
            return EntityType.ENTITY; // Fall back to the basic ENTITY
        }

        return type.get();
    }

    @AllArgsConstructor
    @Getter
    public enum EntityType {
        ENTITY(-1),

        AREA_EFFECT_CLOUD(0, ENTITY),
        ENDER_CRYSTAL(18, ENTITY),
        EVOCATION_FANGS(22, ENTITY),
        XP_ORB(24, ENTITY),
        EYE_OF_ENDER_SIGNAL(25, ENTITY),
        FALLING_BLOCK(26, ENTITY),
        FIREWORKS_ROCKET(27, ENTITY),
        ITEM(35, ENTITY),
        LLAMA_SPIT(40, ENTITY),
        TNT(59, ENTITY),
        SHULKER_BULLET(64, ENTITY),
        FISHING_BOBBER(111, ENTITY),

        LIVINGENTITY(-1, ENTITY),
        ARMOR_STAND(1, LIVINGENTITY),
        PLAYER(110, LIVINGENTITY),

        ABSTRACT_INSENTIENT(-1, LIVINGENTITY),
        ENDER_DRAGON(19, ABSTRACT_INSENTIENT),

        BEE(4, ABSTRACT_INSENTIENT),

        ABSTRACT_CREATURE(-1, ABSTRACT_INSENTIENT),

        ABSTRACT_AGEABLE(-1, ABSTRACT_CREATURE),
        VILLAGER(85, ABSTRACT_AGEABLE),
        WANDERING_TRADER(89, ABSTRACT_AGEABLE),

        // Animals
        ABSTRACT_ANIMAL(-1, ABSTRACT_AGEABLE),
        DOLPHIN(14, ABSTRACT_INSENTIENT),
        CHICKEN(9, ABSTRACT_ANIMAL),<commit_msg>fix 1.15 entity type ids<commit_after>package us.myles.ViaVersion.api.entities;

import com.google.common.base.Optional;
import lombok.AllArgsConstructor;
import lombok.Getter;
import us.myles.ViaVersion.api.Via;

import java.util.HashMap;
import java.util.Map;


public class Entity1_15Types {
    public static EntityType getTypeFromId(int typeID) {
        Optional<EntityType> type = EntityType.findById(typeID);

        if (!type.isPresent()) {
            Via.getPlatform().getLogger().severe("Could not find type id " + typeID);
            return EntityType.ENTITY; // Fall back to the basic ENTITY
        }

        return type.get();
    }

    @AllArgsConstructor
    @Getter
    public enum EntityType {
        ENTITY(-1),

        AREA_EFFECT_CLOUD(0, ENTITY),
        ENDER_CRYSTAL(18, ENTITY),
        EVOCATION_FANGS(22, ENTITY),
        XP_ORB(24, ENTITY),
        EYE_OF_ENDER_SIGNAL(25, ENTITY),
        FALLING_BLOCK(26, ENTITY),
        FIREWORKS_ROCKET(27, ENTITY),
        ITEM(35, ENTITY),
        LLAMA_SPIT(40, ENTITY),
        TNT(59, ENTITY),
        SHULKER_BULLET(64, ENTITY),
        FISHING_BOBBER(102, ENTITY),

        LIVINGENTITY(-1, ENTITY),
        ARMOR_STAND(1, LIVINGENTITY),
        PLAYER(101, LIVINGENTITY),

        ABSTRACT_INSENTIENT(-1, LIVINGENTITY),
        ENDER_DRAGON(19, ABSTRACT_INSENTIENT),

        BEE(4, ABSTRACT_INSENTIENT),

        ABSTRACT_CREATURE(-1, ABSTRACT_INSENTIENT),

        ABSTRACT_AGEABLE(-1, ABSTRACT_CREATURE),
        VILLAGER(85, ABSTRACT_AGEABLE),
        WANDERING_TRADER(89, ABSTRACT_AGEABLE),

        // Animals
        ABSTRACT_ANIMAL(-1, ABSTRACT_AGEABLE),
        DOLPHIN(14, ABSTRACT_INSENTIENT),
        CHICKEN(9, ABSTRACT_ANIMAL),
{'fraction_non_alphanumeric': 0.10677916787896422, 'fraction_numerical': 0.02822228687809136, 'mean_word_length': 2.7863436123348015, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7393824', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1260, 'n_words': 203}