import { Entity, ItemStack } from "@minecraft/server";

const BASE_EXP = 1;
/**
 * @typedef {Object} EntityData
 * @property {string} id 
 * @property {number} rewardExp 
 */

/**@type {EntityData[]} */
export const allEntityData = [
    {id:"hxc:god_warrior",rewardExp:1250},
    {id:"hxc:meruem",rewardExp:1000},
    {id:"hxc:gon3",rewardExp:850},
    {id:"hxc:gon2",rewardExp:500},
    {id:"hxc:gon",rewardExp:150},
    {id:"hxc:killua3",rewardExp:650},
    {id:"hxc:killua2",rewardExp:500},
    {id:"hxc:killua",rewardExp:150},
    {id:"hxc:wing",rewardExp:500},
    {id:"hxc:biscuit",rewardExp:700},
    {id:"hxc:netero",rewardExp:1000},
    {id:"hxc:netero2",rewardExp:800},
    {id:"hxc:nobunaga",rewardExp:700},
    {id:"hxc:uvogin",rewardExp:650},
    {id:"hxc:feitan",rewardExp:700},
    {id:"hxc:ant_queen2",rewardExp:300},
    {id:"hxc:ant_queen",rewardExp:50},
    {id:"hxc:ant",rewardExp:10},
    
    //Vanilla
    {id:"minecraft:wolf",rewardExp:2},
    {id:"minecraft:polar_bear",rewardExp:5},
    {id:"minecraft:zombie",rewardExp:5},
    {id:"minecraft:husk",rewardExp:6},
    {id:"minecraft:drowned",rewardExp:6},
    {id:"minecraft:skeleton",rewardExp:6},
    {id:"minecraft:bogged",rewardExp:6},
    {id:"minecraft:parched",rewardExp:6},
    {id:"minecraft:stray",rewardExp:6},
    {id:"minecraft:creeper",rewardExp:6},
    {id:"minecraft:guardian",rewardExp:8},
    {id:"minecraft:witch",rewardExp:8},
    {id:"minecraft:spider",rewardExp:5},
    {id:"minecraft:pillager",rewardExp:6},
    {id:"minecraft:vindicator",rewardExp:8},
    {id:"minecraft:ravager",rewardExp:10},
    {id:"minecraft:evoker",rewardExp:10},
    {id:"minecraft:slime",rewardExp:3},
    {id:"minecraft:phantom",rewardExp:6},
    {id:"minecraft:iron_golem",rewardExp:16},
    {id:"minecraft:warden",rewardExp:125},
    {id:"minecraft:creaking",rewardExp:10},
    {id:"minecraft:blaze",rewardExp:6},
    {id:"minecraft:wither_skeleton",rewardExp:6},
    {id:"minecraft:ghast",rewardExp:8},
    {id:"minecraft:magma_cube",rewardExp:3},
    {id:"minecraft:zombie_pigman",rewardExp:5},
    {id:"minecraft:piglin",rewardExp:5},
    {id:"minecraft:piglin_brute",rewardExp:6},
    {id:"minecraft:hoglin",rewardExp:6},
    {id:"minecraft:zoglin",rewardExp:6},
    {id:"minecraft:wither",rewardExp:100},
    {id:"minecraft:enderman",rewardExp:7},
    {id:"minecraft:ender_dragon",rewardExp:100},
]
/**
 * @param {string} id
 * @returns {EntityData}
 */
export function getEntityDataById(id) {
    const entityData = allEntityData.find(e => e.id === id);
    return entityData ?? {id:id,rewardExp:BASE_EXP};
}