parent
7e92a8352c
commit
150f646ddf
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ object OpBlockAxisRaycast : ConstManaOperator {
|
|||
)
|
||||
)
|
||||
|
||||
return if (blockHitResult.type == HitResult.Type.BLOCK) {
|
||||
return if (blockHitResult.type == HitResult.Type.BLOCK && ctx.isVecInRange(Vec3.atCenterOf(blockHitResult.blockPos))) {
|
||||
blockHitResult.direction.step().asSpellResult
|
||||
} else {
|
||||
null.asSpellResult
|
||||
|
|
|
@ -24,7 +24,7 @@ object OpBlockRaycast : ConstManaOperator {
|
|||
)
|
||||
)
|
||||
|
||||
return if (blockHitResult.type == HitResult.Type.BLOCK) {
|
||||
return if (blockHitResult.type == HitResult.Type.BLOCK && ctx.isVecInRange(Vec3.atCenterOf(blockHitResult.blockPos))) {
|
||||
// the position on the bhr is the position of the specific *hit point*, which is actually on the outside of the block
|
||||
// this is weird (for example, casting OpBreakBlock at this position will not break the block we're looking at)
|
||||
// so we return the block pos instead
|
||||
|
|
Loading…
Reference in a new issue