Here is what I have so far however in victimLeftBlock I pass in victimLeft which is not a vector3 but just the the x value minus 1. I don't know how I would pass in the whole vector3 with just the x subtracted by 1. Any help is appreciated thx in advance!
'''js
import {world} from "@minecraft/server"
world.beforeEvents.entityHurt.subscribe((event) => {
const victim = event.hurtEntity
const getVictimTags = victim.getTags()
if (getVictimTags.includes("b_trinkets:void_eyes_cooldown")) {
return
}
if (getVictimTags.includes("b_trinkets:void_eyes")) {
event.cancel
const victimLocation = victim.location
const victimLeft = victim.location.x - 1
const victimRight = victim.location.x + 1
const victimLeftBlock = victim.dimension.getBlock(victimLeft)
if(victimLeftBlock.typeId === "minecraft:air") {
victim.teleport(victimLeft)
}
}
})
'''