-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
使用pl.getBlockFromViewVector()函数获取目视方块时,无论传入的检测距离是多少,无论朝向什么方向,什么方块,以即无论是否在检测距离内有方块,均返回在坐标(0,0,0)的方块
To Reproduce
//使用玩家到实体的距离是为了实时改变输入获取目视方块检测距离
let X = pl.distanceTo(en)
//后续也做过测试,此处X使用Math.ceil()取整后也是一样的结果
let bl = pl.getBlockFromViewVector(false,false,X,true)
if (bl) {
pl.tell(当前玩家坐标${pl.pos},检测距离${X},有方块,方块坐标${bl.pos}:${bl.name})
return
}else{
pl.tell(和实体之间无方块)
return
}
Expected behavior
正确获取玩家目视方块
Screenshots
Platform
No response
BDS Version
No response
LeviLamina Version
No response
LegacyScriptEngine Version
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working



