Package-level declarations

Types

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)
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

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

Functions

Link copied to clipboard
inline fun <T : Any> ItemStack.editData(type: DataComponentType.Valued<T>, block: (T) -> T): ItemStack
Link copied to clipboard
fun findPylonItemInInventory(inventory: Inventory, targetItem: PylonItem): Int?

Finds a Pylon item in an inventory. Use this to find Pylon items instead of traditional find methods, because this will compare Pylon 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

(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: PylonAddon): Boolean

Checks whether a NamespacedKey is from addon

Link copied to clipboard
Link copied to clipboard

Compares two Pylon items to check if they have the same Pylon ID. If neither item is a Pylon item, the material will be compared instead.

Link copied to clipboard
fun <T> persistentData(key: NamespacedKey, type: PersistentDataType<*, T & Any>, default: T): <Error class: unknown class>

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
fun rotateToPlayerFacing(player: Player, face: BlockFace, allowVertical: Boolean): BlockFace

Rotates a BlockFace to the player's reference frame.

Link copied to clipboard

Rotates vector to face a direction

Link copied to clipboard

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

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.