类 DoubleInventory
- java.lang.Object
-
- net.minecraft.inventory.DoubleInventory
-
-
构造器概要
构造器 构造器 说明 DoubleInventory(Inventory first, Inventory second)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancanPlayerUse(PlayerEntity player)voidclear()intgetMaxCountPerStack()Returns the maximum number of items a stack can contain when placed inside this inventory.ItemStackgetStack(int slot)Fetches the stack currently stored at the given slot.booleanisEmpty()booleanisPart(Inventory inventory)booleanisValid(int slot, ItemStack stack)Returns whether the given stack is a valid for the indicated slot position.voidmarkDirty()voidonClose(PlayerEntity player)voidonOpen(PlayerEntity player)ItemStackremoveStack(int slot)Removes the stack currently stored at the indicated slot.ItemStackremoveStack(int slot, int amount)Removes a specific number of items from the given slot.voidsetStack(int slot, ItemStack stack)intsize()-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 net.minecraft.inventory.Inventory
containsAny, count
-
-
-
-
字段详细资料
-
first
private final Inventory first
- Mappings:
Namespace Name Mixin selector official bLaqy;b:Laqz;intermediary field_5769Lnet/minecraft/class_1258;field_5769:Lnet/minecraft/class_1263;named firstLnet/minecraft/inventory/DoubleInventory;first:Lnet/minecraft/inventory/Inventory;
-
second
private final Inventory second
- Mappings:
Namespace Name Mixin selector official cLaqy;c:Laqz;intermediary field_5771Lnet/minecraft/class_1258;field_5771:Lnet/minecraft/class_1263;named secondLnet/minecraft/inventory/DoubleInventory;second:Lnet/minecraft/inventory/Inventory;
-
-
构造器详细资料
-
DoubleInventory
public DoubleInventory(Inventory first, Inventory second)
- Mappings:
Namespace Name Mixin selector official <init>Laqy;<init>(Laqz;Laqz;)Vintermediary <init>Lnet/minecraft/class_1258;<init>(Lnet/minecraft/class_1263;Lnet/minecraft/class_1263;)Vnamed <init>Lnet/minecraft/inventory/DoubleInventory;<init>(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/inventory/Inventory;)V
-
-
方法详细资料
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
isPart
public boolean isPart(Inventory inventory)
- Mappings:
Namespace Name Mixin selector official aLaqy;a(Laqz;)Zintermediary method_5405Lnet/minecraft/class_1258;method_5405(Lnet/minecraft/class_1263;)Znamed isPartLnet/minecraft/inventory/DoubleInventory;isPart(Lnet/minecraft/inventory/Inventory;)Z
-
getStack
public ItemStack getStack(int slot)
Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns seeItemStack.EMPTY.
-
removeStack
public ItemStack removeStack(int slot, int amount)
Removes a specific number of items from the given slot.- 指定者:
removeStack在接口中Inventory- 返回:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official aLaqz;a(II)Lbpr;intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
public ItemStack removeStack(int slot)
Removes the stack currently stored at the indicated slot.- 指定者:
removeStack在接口中Inventory- 返回:
- the stack previously stored at the indicated slot.
- Mappings:
Namespace Name Mixin selector official bLaqz;b(I)Lbpr;intermediary method_5441Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
public void setStack(int slot, ItemStack stack)
-
getMaxCountPerStack
public int getMaxCountPerStack()
Returns the maximum number of items a stack can contain when placed inside this inventory. No slots may have more than this number of items. It is effectively the stacking limit for this inventory's slots.- 指定者:
getMaxCountPerStack在接口中Inventory- 返回:
- the max
countof item stacks in this inventory - Mappings:
Namespace Name Mixin selector official X_Laqz;X_()Iintermediary method_5444Lnet/minecraft/class_1263;method_5444()Inamed getMaxCountPerStackLnet/minecraft/inventory/Inventory;getMaxCountPerStack()I
-
markDirty
public void markDirty()
-
canPlayerUse
public boolean canPlayerUse(PlayerEntity player)
- 指定者:
canPlayerUse在接口中Inventory- Mappings:
Namespace Name Mixin selector official aLaqz;a(Lbjf;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
onOpen
public void onOpen(PlayerEntity player)
-
onClose
public void onClose(PlayerEntity player)
-
isValid
public boolean isValid(int slot, ItemStack stack)Returns whether the given stack is a valid for the indicated slot position.
-
-