Package-level declarations

Types

Link copied to clipboard

Properties

Link copied to clipboard
val Level.bedRule: BedRule
Link copied to clipboard
val Level.entityGetter: LevelEntityGetter<Entity>
Link copied to clipboard
val ChunkAccess.filledSections: List<LevelChunkSection>

Returns the loaded section slice from section 0 through ChunkAccess.highestFilledSectionIndex.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun <B : Entity, T : B> LevelEntityGetter<B>.any(type: EntityTypeTest<B, T>, predicate: Predicate<T>): Boolean
Link copied to clipboard
fun <B : Entity, T : B> LevelEntityGetter<B>.filter(type: EntityTypeTest<B, T>, predicate: Predicate<T>): List<T>
Link copied to clipboard
fun <B : Entity, T : B, C : MutableCollection<in T>> LevelEntityGetter<B>.filterTo(destination: C, type: EntityTypeTest<B, T>, predicate: Predicate<T>): C
Link copied to clipboard
fun <B : Entity, T : B> LevelEntityGetter<B>.firstOrNull(type: EntityTypeTest<B, T>, predicate: Predicate<T>): T?
Link copied to clipboard
fun <B : Entity, T : B> LevelEntityGetter<B>.forEach(type: EntityTypeTest<B, T>, consumer: Consumer<T>)
Link copied to clipboard
inline fun LevelChunkSection.forEachBlock(action: (localX: Int, localY: Int, localZ: Int, BlockState) -> Unit)

Iterates all 4096 block states in a section and provides local section coordinates (0..15).

Link copied to clipboard
inline fun LevelChunk.forEachSectionBlock(sectionIndex: Int, mutable: BlockPos.MutableBlockPos = BlockPos.MutableBlockPos(), action: (BlockPos, BlockState) -> Unit)

Iterates all blocks in a specific section index and exposes world-space block positions.

Link copied to clipboard
inline fun <T : Entity> EntityGetter.getEntitiesInCube(midPos: Vec3, range: Double, predicate: Predicate<T> = Predicates.alwaysTrue()): MutableList<T>
fun EntityGetter.getEntitiesInCube(midPos: Vec3, range: Double, exclusion: Entity? = null, predicate: Predicate<Entity> = Predicates.alwaysTrue()): MutableList<Entity>
Link copied to clipboard
fun Level.nextLocalEntityId(): Int

Allocates a unique negative entity ID for a locally spawned entity.

Link copied to clipboard
fun <B : Entity, T : B> LevelEntityGetter<B>.none(type: EntityTypeTest<B, T>, predicate: Predicate<T>): Boolean
Link copied to clipboard
fun ChunkAccess.sectionBottomY(index: Int): Int

Converts a section index to the section base world Y (multiple of 16).