ItemStackProvider Bindings

Bindings for creating ItemStackProviders and certain related utilities

declare class ItemStackProviderBindings {

    // These are avaialble via TFC.isp.*

    of(stack: ItemStack, modifiers?: List<ItemStackModifier>): ItemStackProvider
    empty(): ItemStackProvider
    copyInputStack(): ItemStackProvider
    getCraftingPlayer(): @Nullable Player
    setCraftingInput(inventory: IItemHandler): void
    setCraftingInput(inventory: IItemHandler, startSlot: int, endSlot: int): void
    clearCraftingInput(): void
}
  • : Creates a new mutable ItemStackProvider with the given stack and, if present, list of modifiers
  • : Creates a new empty mutable ItemStackProvider
  • : Creates a new empty mutable ItemStackProvider with a tfc:copy_input modifier
  • : Gets the current crafting player, or null if not present
  • : Sets the current crafting input, a view of the inventory used by certain modifiers. Must call .clearCraftingInput() after modifiers have been applied
  • : Sets the crafting input, a view of the inventory used by certain modifiers, as a subset of the inventory’s slots. Must call .clearCraftingInput() after modifiers have been applied
  • : Clears the crafting input