类 ItemHandlerCopySlot
java.lang.Object
net.minecraft.world.inventory.Slot
net.neoforged.neoforge.items.StackCopySlot
net.neoforged.neoforge.items.ItemHandlerCopySlot
Slot class that can be used with immutable
IItemHandler
s
like ComponentItemHandler
.-
字段概要
字段 -
构造器概要
构造器构造器说明ItemHandlerCopySlot
(IItemHandler itemHandler, int index, int xPosition, int yPosition) ItemHandlerCopySlot
(SlotItemHandler slotItemHandler) -
方法概要
修饰符和类型方法说明int
int
getMaxStackSize
(ItemStack stack) protected ItemStack
Gets the itemstack from the storage.boolean
isSameInventory
(Slot other) Checks if the other slot is in the same inventory, by comparing the inventory reference.boolean
boolean
void
onQuickCraft
(ItemStack oldStackIn, ItemStack newStackIn) protected void
setStackCopy
(ItemStack stack) Sets the itemstack from the storage.从类继承的方法 net.neoforged.neoforge.items.StackCopySlot
getItem, remove, set, setChanged
从类继承的方法 net.minecraft.world.inventory.Slot
allowModification, checkTakeAchievements, getContainerSlot, getNoItemIcon, getSlotIndex, hasItem, isActive, isFake, isHighlightable, onQuickCraft, onSwapCraft, onTake, safeInsert, safeInsert, safeTake, setBackground, setByPlayer, setByPlayer, tryRemove
-
字段详细资料
-
slotItemHandler
-
-
构造器详细资料
-
ItemHandlerCopySlot
-
ItemHandlerCopySlot
-
-
方法详细资料
-
mayPlace
-
getStackCopy
从类复制的说明:StackCopySlot
Gets the itemstack from the storage.- 指定者:
getStackCopy
在类中StackCopySlot
- 返回:
- the stack in this slot
-
setStackCopy
从类复制的说明:StackCopySlot
Sets the itemstack from the storage.- 指定者:
setStackCopy
在类中StackCopySlot
- 参数:
stack
- the stack to put into this slot
-
onQuickCraft
- 覆盖:
onQuickCraft
在类中Slot
-
getMaxStackSize
public int getMaxStackSize()- 覆盖:
getMaxStackSize
在类中Slot
-
getMaxStackSize
- 覆盖:
getMaxStackSize
在类中Slot
-
mayPickup
-
isSameInventory
从类复制的说明:Slot
Checks if the other slot is in the same inventory, by comparing the inventory reference.- 覆盖:
isSameInventory
在类中Slot
- 参数:
other
-- 返回:
- true if the other slot is in the same inventory
-
getItemHandler
-