#Right click TP is invalid

3 messages · Page 1 of 1 (latest)

pearl torrent
#

ItemEvents.rightClicked('terminal:qixing', e => {
const { player, level } = e

const direction = player.getLookAngle().scale(10)
const newPos = player.position.add(direction)


const checkCollision = (x, y, z) => {
    return !level.getBlock(x, y, z).isAir() || 
           !level.getBlock(x, y+1, z).isAir()
}

if (!checkCollision(newPos.x, newPos.y, newPos.z)) {
   
    player.playSound('entity.enderman.teleport', 1, 1)
    
   
    player.teleport(newPos.x, newPos.y, newPos.z)
    
    
    player.addItemCooldown('terminal:qixing', 200)
} else {
    player.playSound('block.note_block.didgeridoo', 1, 0.5)
    player.tell(Text.red("There are blocks that cannot be executed"))
}

})

full abyssBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

pearl torrent
#

not execute