类 CraftingInventory
- java.lang.Object
-
- net.minecraft.inventory.CraftingInventory
-
- 所有已实现的接口:
Inventory,RecipeInputProvider,Clearable
public class CraftingInventory extends Object implements Inventory, RecipeInputProvider
- Mappings:
Namespace Name official blzintermediary net/minecraft/class_1715named net/minecraft/inventory/CraftingInventory
-
-
字段概要
字段 修饰符和类型 字段 说明 private ScreenHandlerhandlerprivate intheightprivate DefaultedList<ItemStack>stacksprivate intwidth-
从接口继承的字段 net.minecraft.inventory.Inventory
MAX_COUNT_PER_STACK
-
-
构造器概要
构造器 构造器 说明 CraftingInventory(ScreenHandler handler, int width, int height)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancanPlayerUse(PlayerEntity player)voidclear()intgetHeight()ItemStackgetStack(int slot)Fetches the stack currently stored at the given slot.intgetWidth()booleanisEmpty()voidmarkDirty()voidprovideRecipeInputs(RecipeFinder finder)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, getMaxCountPerStack, isValid, onClose, onOpen
-
-
-
-
字段详细资料
-
stacks
private final DefaultedList<ItemStack> stacks
- Mappings:
Namespace Name Mixin selector official bLblz;b:Lgn;intermediary field_7805Lnet/minecraft/class_1715;field_7805:Lnet/minecraft/class_2371;named stacksLnet/minecraft/inventory/CraftingInventory;stacks:Lnet/minecraft/util/collection/DefaultedList;
-
width
private final int width
- Mappings:
Namespace Name Mixin selector official cLblz;c:Iintermediary field_7804Lnet/minecraft/class_1715;field_7804:Inamed widthLnet/minecraft/inventory/CraftingInventory;width:I
-
height
private final int height
- Mappings:
Namespace Name Mixin selector official dLblz;d:Iintermediary field_7803Lnet/minecraft/class_1715;field_7803:Inamed heightLnet/minecraft/inventory/CraftingInventory;height:I
-
handler
private final ScreenHandler handler
- Mappings:
Namespace Name Mixin selector official eLblz;e:Lbll;intermediary field_7802Lnet/minecraft/class_1715;field_7802:Lnet/minecraft/class_1703;named handlerLnet/minecraft/inventory/CraftingInventory;handler:Lnet/minecraft/screen/ScreenHandler;
-
-
构造器详细资料
-
CraftingInventory
public CraftingInventory(ScreenHandler handler, int width, int height)
- Mappings:
Namespace Name Mixin selector official <init>Lblz;<init>(Lbll;II)Vintermediary <init>Lnet/minecraft/class_1715;<init>(Lnet/minecraft/class_1703;II)Vnamed <init>Lnet/minecraft/inventory/CraftingInventory;<init>(Lnet/minecraft/screen/ScreenHandler;II)V
-
-
方法详细资料
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
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)
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;
-
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;
-
setStack
public void setStack(int slot, ItemStack stack)
-
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
-
clear
public void clear()
-
getHeight
public int getHeight()
- Mappings:
Namespace Name Mixin selector official fLblz;f()Iintermediary method_17397Lnet/minecraft/class_1715;method_17397()Inamed getHeightLnet/minecraft/inventory/CraftingInventory;getHeight()I
-
getWidth
public int getWidth()
- Mappings:
Namespace Name Mixin selector official gLblz;g()Iintermediary method_17398Lnet/minecraft/class_1715;method_17398()Inamed getWidthLnet/minecraft/inventory/CraftingInventory;getWidth()I
-
provideRecipeInputs
public void provideRecipeInputs(RecipeFinder finder)
- 指定者:
provideRecipeInputs在接口中RecipeInputProvider- Mappings:
Namespace Name Mixin selector official aLbnf;a(Lbjh;)Vintermediary method_7683Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)Vnamed provideRecipeInputsLnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeFinder;)V
-
-