Package net.neoforged.neoforge.items
Class ItemHandlerCopySlot
java.lang.Object
net.minecraft.world.inventory.Slot
net.neoforged.neoforge.world.inventory.StackCopySlot
net.neoforged.neoforge.items.ItemHandlerCopySlot
Deprecated, for removal: This API element is subject to removal in a future version.
Slot class that can be used with immutable
IItemHandlers
like ComponentItemHandler.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SlotItemHandlerDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionItemHandlerCopySlot(IItemHandler itemHandler, int index, int xPosition, int yPosition) Deprecated, for removal: This API element is subject to removal in a future version.ItemHandlerCopySlot(SlotItemHandler slotItemHandler) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.intgetMaxStackSize(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.protected ItemStackDeprecated, for removal: This API element is subject to removal in a future version.Gets the itemstack from the storage.booleanisSameInventory(Slot other) Deprecated, for removal: This API element is subject to removal in a future version.Checks if the other slot is in the same inventory, by comparing the inventory reference.booleanDeprecated, for removal: This API element is subject to removal in a future version.Return whether this slot's stack can be taken from this slot.booleanDeprecated, for removal: This API element is subject to removal in a future version.Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.voidonQuickCraft(ItemStack oldStackIn, ItemStack newStackIn) Deprecated, for removal: This API element is subject to removal in a future version.if par2 has more items than par1, onCrafting(item,countIncrease) is calledprotected voidsetStackCopy(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.Sets the itemstack from the storage.Methods inherited from class net.neoforged.neoforge.world.inventory.StackCopySlot
getItem, remove, set, setChangedMethods inherited from class net.minecraft.world.inventory.Slot
allowModification, checkTakeAchievements, getContainerSlot, getNoItemIcon, getSlotIndex, hasItem, isActive, isFake, isHighlightable, onQuickCraft, onSwapCraft, onTake, safeInsert, safeInsert, safeTake, setBackground, setByPlayer, setByPlayer, tryRemove
-
Field Details
-
slotItemHandler
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
ItemHandlerCopySlot
Deprecated, for removal: This API element is subject to removal in a future version. -
ItemHandlerCopySlot
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
mayPlace
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SlotCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel. -
getStackCopy
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:StackCopySlotGets the itemstack from the storage.- Specified by:
getStackCopyin classStackCopySlot- Returns:
- the stack in this slot
-
setStackCopy
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:StackCopySlotSets the itemstack from the storage.- Specified by:
setStackCopyin classStackCopySlot- Parameters:
stack- the stack to put into this slot
-
onQuickCraft
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:Slotif par2 has more items than par1, onCrafting(item,countIncrease) is called- Overrides:
onQuickCraftin classSlot
-
getMaxStackSize
public int getMaxStackSize()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getMaxStackSizein classSlot
-
getMaxStackSize
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
getMaxStackSizein classSlot
-
mayPickup
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SlotReturn whether this slot's stack can be taken from this slot. -
isSameInventory
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SlotChecks if the other slot is in the same inventory, by comparing the inventory reference.- Overrides:
isSameInventoryin classSlot- Parameters:
other-- Returns:
- true if the other slot is in the same inventory
-
getItemHandler
Deprecated, for removal: This API element is subject to removal in a future version.
-
ResourceHandlerSlotinstead.