Package-level declarations
Types
Link copied to clipboard
class AnchoredHotbarSwapController(owner: EventListener, inventoryConstraints: InventoryConstraints, swapDelayProvider: () -> Int, anchorHotbarSlotResolver: () -> HotbarItemSlot = {
Slots.Hotbar.findSlot { it.isEmpty } ?: Slots.Hotbar[SilentHotbar.serversideSlot]
}) : EventListener
Reusable anchored hotbar swap state machine:
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Constraints for inventory actions. This can be used to ensure that the player is not moving or rotating while interacting with the inventory. It Also allows setting delays for opening, clicking and closing the inventory.
Link copied to clipboard
Link copied to clipboard
Manages the inventory state and timings and schedules inventory actions
Link copied to clipboard
Link copied to clipboard
Represents an inventory slot (e.g. Hotbar Slot 0, OffHand, Chestslot 5, etc.)
Link copied to clipboard
Link copied to clipboard
Additional constraints for the player inventory. This should be used when interacting with the player inventory instead of a generic container.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class VirtualItemSlot(val itemStack: ItemStack, val slotType: ItemSlot.Type, val id: Int) : ItemSlot
Properties
Functions
Link copied to clipboard
fun <T : ItemSlot> Iterable<T>.findBestToolToMineBlock(blockState: BlockState, ignoreDurability: Boolean = true, predicate: BiPredicate<ItemStack, BlockState> = BiPredicate { _, _ -> true }): T?
Finds the best slot in this iterable for mining blockState using mc.player as baseline.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
context(requester: EventListener)
fun useHotbarSlotOrOffhand(slot: HotbarItemSlot, ticksUntilReset: Int = 1, yRot: Float = RotationManager.currentRotation?.yRot ?: player.yRot, xRot: Float = RotationManager.currentRotation?.xRot ?: player.xRot, swingMode: SwingMode = SwingMode.DO_NOT_HIDE): InteractionResult
fun useHotbarSlotOrOffhand(slot: HotbarItemSlot, ticksUntilReset: Int = 1, yRot: Float = RotationManager.currentRotation?.yRot ?: player.yRot, xRot: Float = RotationManager.currentRotation?.xRot ?: player.xRot, swingMode: SwingMode = SwingMode.DO_NOT_HIDE): InteractionResult