Skip to content

Commit

Permalink
trace/block.go: BlockIntercept: Change world.Tx to world.BlockSource.
Browse files Browse the repository at this point in the history
Resolves #975.
  • Loading branch information
Sandertv committed Dec 28, 2024
1 parent f8ec722 commit 51a8300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/block/cube/trace/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (r BlockResult) BlockPosition() cube.Pos {
// that the ray collided with.
// BlockIntercept returns a BlockResult with the block collided with and with the colliding vector closest to the start position,
// if no colliding point was found, a zero BlockResult is returned and ok is false.
func BlockIntercept(pos cube.Pos, tx *world.Tx, b world.Block, start, end mgl64.Vec3) (result BlockResult, ok bool) {
bbs := b.Model().BBox(pos, tx)
func BlockIntercept(pos cube.Pos, src world.BlockSource, b world.Block, start, end mgl64.Vec3) (result BlockResult, ok bool) {
bbs := b.Model().BBox(pos, src)
if len(bbs) == 0 {
return
}
Expand Down

0 comments on commit 51a8300

Please sign in to comment.