Package net.neoforged.neoforge.items
Class SlotItemHandler
java.lang.Object
net.minecraft.world.inventory.Slot
net.neoforged.neoforge.items.SlotItemHandler
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ContainerDeprecated, for removal: This API element is subject to removal in a future version.protected final intDeprecated, for removal: This API element is subject to removal in a future version.private final IItemHandlerDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionSlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiongetItem()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, 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.voidinitialize(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.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 calledremove(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.voidDeprecated, for removal: This API element is subject to removal in a future version.Helper method to put a stack in the slot.Methods 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, setChanged, tryRemove
-
Field Details
-
EMPTY_INVENTORY
Deprecated, for removal: This API element is subject to removal in a future version. -
itemHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
index
protected final int indexDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
SlotItemHandler
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. -
getItem
Deprecated, for removal: This API element is subject to removal in a future version. -
set
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SlotHelper method to put a stack in the slot. -
initialize
Deprecated, for removal: This API element is subject to removal in a future version. -
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. -
remove
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SlotDecrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new stack. -
getItemHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
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
-
ResourceHandlerSlotinstead.