Properties

Link copied to clipboard
open val debugName: String
Link copied to clipboard

If this is true recordBlock is called on chunk updates and on single block updates. This might be inefficient for some modules, so they can choose to not call that method on chunk updates.

Functions

Link copied to clipboard
override fun allPositions(): Sequence<BlockPos>

Returns a Sequence providing all tracked BlockPos.

Link copied to clipboard
override fun chunkUpdate(chunk: LevelChunk)

Is called when a chunk is initially loaded or entirely updated.

Link copied to clipboard
override fun clearAllChunks()
Link copied to clipboard
override fun clearChunk(pos: ChunkPos)
Link copied to clipboard
open override fun getStateFor(pos: BlockPos, state: BlockState): AutoFarmTrackedState?

Gets the state of specified BlockPos and its BlockState.

Link copied to clipboard
override fun isEmpty(): Boolean

Returns if there iss nothing tracked.

Link copied to clipboard
override fun iterate(): Sequence<Map.Entry<BlockPos, AutoFarmTrackedState>>

Returns a Sequence providing all tracked BlockPos and its state T.

fun iterate(type: AutoFarmTrackedState): Sequence<BlockPos>
Link copied to clipboard
open fun onUpdated()
Link copied to clipboard
override fun recordBlock(pos: BlockPos, state: BlockState, cleared: Boolean)

Registers a block update and asks the subscriber to make a decision about what should be done. This method must be thread-safe.

Link copied to clipboard
override fun track(pos: BlockPos, state: AutoFarmTrackedState)

Tracks a BlockPos with state.

Link copied to clipboard
override fun untrack(pos: BlockPos): Boolean

Untracks a BlockPos.