//用于存储正在试验，但并未写进游戏内的代码
/**
 let player = event.source.actual
let slotHelper = $CuriosApi.getSlotHelper();
// 增加 1 个戒指槽位
slotHelper.growSlotType("ring", 1, player)
 */

/**
  PlayerEvents.tick(event => {
    let player = event.entity
    if (player.age % 20 != 0) return
    let ray = player.rayTrace(24, false)
    let distance = ray.distance
    let vec3Nor = player.getLookAngle().normalize()
    let counter = 0
    let getlevel = player.getXpLevel()
    if (ray.entity && ray.entity.isLiving()) {
        ray.entity.attack(30 + Math.min(getlevel, 100))
        ray.entity.invulnerableTime = 0
        counter++
    }
    if (ray.block) {
        distance = player.getPosition(1.0).distanceTo(ray.block.pos)
    }
    for (let i = 0; i < distance; i++) {
        let vec3 = vec3Nor.scale(i).add(player.getEyePosition())
        player.level.spawnParticles("minecraft:sonic_boom", false, vec3.x(), vec3.y(), vec3.z(), 0, 0, 0, 1, 0)

        if (i % 2 == 0) {
            let entityInRadius = getLivingWithinRadius(event.level, vec3, 2)
            entityInRadius.forEach(e => {
                if (!e.isPlayer()) {
                    counter++
                    e.attack(10 + Math.min(getlevel * 0.5, 50))
                    e.invulnerableTime = 0
                }
            })
        }
    }
})
 */


