类 PlayerMainInvWrapper
java.lang.Object
net.minecraftforge.items.wrapper.RangedWrapper
net.minecraftforge.items.wrapper.PlayerMainInvWrapper
- 所有已实现的接口:
IItemHandler
,IItemHandlerModifiable
Exposes the player inventory WITHOUT the armor inventory as IItemHandler.
Also takes core of inserting/extracting having the same logic as picking up items.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@NotNull ItemStack
insertItem
(int slot, @NotNull ItemStack stack, boolean simulate) Inserts an ItemStack into the given slot and return the remainder.从类继承的方法 net.minecraftforge.items.wrapper.RangedWrapper
extractItem, getSlotLimit, getSlots, getStackInSlot, isItemValid, setStackInSlot
-
字段详细资料
-
inventoryPlayer
-
-
构造器详细资料
-
PlayerMainInvWrapper
-
-
方法详细资料
-
insertItem
@NotNull public @NotNull ItemStack insertItem(int slot, @NotNull @NotNull ItemStack stack, boolean simulate) 从接口复制的说明:IItemHandler
Inserts an ItemStack into the given slot and return the remainder. The ItemStack should not be modified in this function!
Note: This behaviour is subtly different fromIFluidHandler.fill(FluidStack, IFluidHandler.FluidAction)
- 指定者:
insertItem
在接口中IItemHandler
- 覆盖:
insertItem
在类中RangedWrapper
- 参数:
slot
- Slot to insert into.stack
- ItemStack to insert. This must not be modified by the item handler.simulate
- If true, the insertion is only simulated- 返回:
- The remaining ItemStack that was not inserted (if the entire stack is accepted, then return an empty ItemStack). May be the same as the input ItemStack if unchanged, otherwise a new ItemStack. The returned ItemStack can be safely modified after.
-
getInventoryPlayer
-