Package-level declarations
Types
Functions
Link copied to clipboard
Find the best spot of the upper side of the block
Link copied to clipboard
fun findClosestPointOnBlockInLineWithCrystal(eyes: Vec3, range: Double, wallsRange: Double, expectedTarget: BlockPos, notFacingAway: Boolean, rotationsNotToMatch: List<Rotation>? = null): Pair<RotationWithVector, Direction>?
Finds the rotation to the closest point on the expectedTarget, that if possible also points to the crystal that will that could be above the position.
Link copied to clipboard
fun findVisiblePointFromVirtualEye(virtualEyes: Vec3, box: AABB, rangeToTest: Double, visibilityPredicate: VisibilityPredicate = ArrowVisibilityPredicate): Vec3?
Finds a point that is visible from the virtual eyes.
Link copied to clipboard
Creates rotation matrices: The first allows to turn the vec (1.0, 0.0, 0.0) into the given vec. The second allows to turn the given vec into (1.0, 0.0, 0.0).
Link copied to clipboard
inline fun projectPointsOnBox(virtualEye: Vec3, targetBox: AABB, maxPoints: Int = 128, consumer: (Vec3) -> Unit): Boolean
Projects points onto the targetBox. The points are uniformly distributed from the perspective of virtualEye.
Link copied to clipboard
fun raytraceBlockRotation(eyes: Vec3, pos: BlockPos, state: BlockState, range: Double, wallsRange: Double): RotationWithVector?
Link copied to clipboard
fun raytraceBlockSide(side: Direction, pos: BlockPos, eyes: Vec3, rangeSquared: Double, wallsRangeSquared: Double, collisionContext: CollisionContext): RotationWithVector?
Link copied to clipboard
fun raytraceBox(eyes: Vec3, box: AABB, range: Double, wallsRange: Double, visibilityPredicate: VisibilityPredicate = VisibilityPredicate.Outline, rotationPreference: RotationPreference = LeastDifferencePreference.leastDifferenceToCurrentRotation(), futureTarget: AABB? = null, prioritizeVisible: Boolean = true): RotationWithVector?
Find the best spot of a box to aim at.
Link copied to clipboard
fun raytraceUpperBlockSide(eyes: Vec3, range: Double, wallsRange: Double, expectedTarget: BlockPos, rotationPreference: RotationPreference = LeastDifferencePreference.leastDifferenceToCurrentRotation(), rotationsNotToMatch: Collection<Rotation>? = null): RotationWithVector?
Find the best spot of the upper block side
Link copied to clipboard
Link copied to clipboard