Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Indicates a machine has updated an inventory slot.

Link copied to clipboard

Represents the blocks that a tool made of some material is allowed to break.

Link copied to clipboard
open class Octree<N>(maxDepth: Int = DEFAULT_MAX_DEPTH, maxEntries: Int = DEFAULT_MAX_ENTRIES, bounds: BoundingBox, depth: Int, entryStrategy: (N) -> BoundingBox, storeOutOfBoundsEntries: Boolean = false) : Iterable<N>
Link copied to clipboard
data class RandomizedSound(val keys: Collection<Key>, val source: Sound.Source, val volume: Pair<Double, Double>, val pitch: Pair<Double, Double>)
Link copied to clipboard
class WeightedSet<E> @JvmOverloads constructor(innerSet: MutableSet<WeightedSet.Element<E>> = mutableSetOf()) : AbstractMutableSet<WeightedSet.Element<E>>

A set containing elements with associated weights. You can retrieve either a specified subset or a single element randomly, with the probability of each element being chosen proportional to its weight.

Properties

A shorthand for a commonly used VirtualInventory handler which prevents players from removing items from it.

Link copied to clipboard
const val FLUID_EPSILON: Double = 1.0E-6
Link copied to clipboard

Same as IMMEDIATE_FACES but includes diagonal faces, not including the vertical directions.

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

Functions

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

Does not include first or last block

Link copied to clipboard
fun blocksWithin(world: World, boundingBox: BoundingBox): List<Block>
Link copied to clipboard

Creates a CoroutineContext for a child coroutine, with a Job that is a child of the current context's Job

Link copied to clipboard
fun damageItem(itemStack: ItemStack, amount: Int, world: World, onBreak: (Material) -> Unit = {}, force: Boolean = false)
fun damageItem(itemStack: ItemStack, amount: Int, entity: LivingEntity, slot: EquipmentSlot, force: Boolean = false)
Link copied to clipboard
suspend fun delayTicks(ticks: Long)
Link copied to clipboard
inline fun <T : Any> ItemStack.editData(type: DataComponentType.Valued<T>, block: (T) -> T): ItemStack
Link copied to clipboard
inline fun <T : Any> ItemStack.editDataOrDefault(type: DataComponentType.Valued<T>, block: (T) -> T): ItemStack
Link copied to clipboard
inline fun <T : Any> ItemStack.editDataOrSet(type: DataComponentType.Valued<T>, block: (T?) -> T): ItemStack
Link copied to clipboard

Returns the yaw (in radians) that a face has, starting at NORTH and going counterclockwise.

Link copied to clipboard

Unidirectional, meaning if the closest point is 'behind' the starting point, returns the distance from the starting point.

Link copied to clipboard

Finds a Rebar item in this inventory. Use this to find Rebar items instead of traditional find methods, because this will compare Rebar IDs.

Link copied to clipboard

Finds an item of the right type in this inventory. Use this to find items purely based on Vanilla / Rebar IDs.

Link copied to clipboard

Small helper function to convert a minimessage string (eg: 'bruh') into a component

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Block.getRelative(vector: Vector3i): @NotNull Block
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

(Heuristically) checks whether an event is 'fake' (by checking if it has 'Fake' in its name)

Link copied to clipboard
@JvmName(name = "isKeyFromAddon")
fun NamespacedKey.isFromAddon(addon: RebarAddon): Boolean

Checks whether a NamespacedKey is from addon

Link copied to clipboard
Link copied to clipboard
fun Class<*>.isSubclassOf(other: Class<*>): Boolean
Link copied to clipboard

Returns all the immediate faces that are perpendicular to the given face

Link copied to clipboard

Same as persistentData but with a default value that is constant

inline fun <T> persistentData(key: NamespacedKey, type: PersistentDataType<*, T & Any>, crossinline default: () -> T): ReadWriteProperty<PersistentDataHolder, T>

Acts as a property delegate for stuff contained inside a PersistentDataContainer For example:

Link copied to clipboard
Link copied to clipboard

Rotates face to be relative to referenceFace.

Link copied to clipboard

Rotates vector to face a direction

Link copied to clipboard

Schedules the entity to be removed next tick

Link copied to clipboard

Wrapper around PersistentDataContainer.set that allows nullable values to be passed

Link copied to clipboard
Link copied to clipboard
fun Inventory.swapItem(from: Int, to: Int)
Link copied to clipboard
Link copied to clipboard

Converts an orthogonal vector to a BlockFace

Link copied to clipboard
@JvmName(name = "attachArguments")
fun Component.withArguments(args: List<TranslationArgumentLike>): Component

Attaches arguments to a component and all its children.