VanillaMenuSlot¶
class VanillaMenuSlot(
storage: AbstractVanillaContainer,
val filter: Predicate<ItemStack> = Predicate { true },
slot: Int,
x: Int,
y: Int,
owningMenu: ComposeContainerMenuBase<*>
) : Slot
The ArchieItemMenuSlot equivalent for adapting an existing vanilla-style AbstractVanillaContainer (rather than an ArchieItemStorage) into a ComposeContainerMenuBase. Created by ComposeContainerMenuBase from a handler(group, storage, filter) registration; not usually constructed directly.
Parameters¶
- filter: Restricts which stacks
mayPlaceinto this slot.
Constructors¶
VanillaMenuSlot¶
constructor(
storage: AbstractVanillaContainer,
filter: Predicate<ItemStack> = Predicate { true },
slot: Int,
x: Int,
y: Int,
owningMenu: ComposeContainerMenuBase<*>
)
Parameters
- filter: Restricts which stacks
mayPlaceinto this slot.
Properties¶
container¶
val container: Container?
containerSlot¶
open val containerSlot: Int
filter¶
Parameters
- filter: Restricts which stacks
mayPlaceinto this slot.
index¶
isActive¶
isFake¶
isHighlightable¶
open val isHighlightable: Boolean
item¶
open override val item: ItemStack
maxStackSize¶
open override val maxStackSize: Int
noItemIcon¶
@get:
Nullable
open val noItemIcon: Pair<ResourceLocation?, ResourceLocation?>?
slotIndex¶
x¶
y¶
Functions¶
allowModification¶
open fun allowModification(player: Player?): Boolean
getItem¶
open override fun getItem(): ItemStack
getMaxStackSize¶
open override fun getMaxStackSize(): Int
hasItem¶
isSameInventory¶
open fun isSameInventory(other: Slot?): Boolean
mayPickup¶
mayPlace¶
onQuickCraft¶
open fun onQuickCraft(oldStack: ItemStack?, newStack: ItemStack?)
onTake¶
open fun onTake(player: Player?, stack: ItemStack?)
remove¶
safeInsert¶
open fun safeInsert(stack: ItemStack?): ItemStack?
open fun safeInsert(stack: ItemStack?, increment: Int): ItemStack?
safeTake¶
set¶
open override fun set(stack: ItemStack)
setBackground¶
open fun setBackground(atlas: ResourceLocation?, sprite: ResourceLocation?): Slot?
setByPlayer¶
open fun setByPlayer(stack: ItemStack?)
open fun setByPlayer(newStack: ItemStack?, oldStack: ItemStack?)
setChanged¶
open override fun setChanged()