InTruncatedPyramidPredicate

class InTruncatedPyramidPredicate(near: Vec3d, nearSize: Vec2f, far: Vec3d, farSize: Vec2f, up: Vec3d) : BiPredicate<ServerWorld, BlockPos> (source)

A BlockDestructionPredicate, which only allows breaking blocks in a truncated pyramid. The near and far sides of the truncated pyramid are the top and bottom sides.

Parameters

near

The center point of the near side of the truncated pyramid

nearSize

The width and height of the near side of the truncated pyramid

far

The center point on the far side of the truncated pyramid

farSize

The width and height of the far side if the truncated pyramid

up

The direction pointing "upwards" relative to the block destroyer's POV (perpendicular to far-near vector)

Constructors

Link copied to clipboard
constructor(near: Vec3d, nearSize: Vec2f, far: Vec3d, farSize: Vec2f, up: Vec3d)

Properties

Link copied to clipboard

The bounding volume of the truncated pyramid.

Functions

Link copied to clipboard
open override fun test(world: ServerWorld, pos: BlockPos): Boolean

Inherited functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard