类 CraftingResultInventory
- java.lang.Object
-
- net.minecraft.inventory.CraftingResultInventory
-
- 所有已实现的接口:
Inventory,RecipeUnlocker,Clearable
public class CraftingResultInventory extends Object implements Inventory, RecipeUnlocker
- Mappings:
Namespace Name official bmxintermediary net/minecraft/class_1731named net/minecraft/inventory/CraftingResultInventory
-
-
字段概要
字段 修饰符和类型 字段 说明 private @Nullable Recipe<?>lastRecipeprivate DefaultedList<ItemStack>stacks-
从接口继承的字段 net.minecraft.inventory.Inventory
MAX_COUNT_PER_STACK
-
-
构造器概要
构造器 构造器 说明 CraftingResultInventory()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancanPlayerUse(PlayerEntity player)voidclear()@Nullable Recipe<?>getLastRecipe()ItemStackgetStack(int slot)Fetches the stack currently stored at the given slot.booleanisEmpty()voidmarkDirty()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.voidsetLastRecipe(@Nullable Recipe<?> recipe)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
-
从接口继承的方法 net.minecraft.recipe.RecipeUnlocker
shouldCraftRecipe, unlockLastRecipe
-
-
-
-
字段详细资料
-
stacks
private final DefaultedList<ItemStack> stacks
- Mappings:
Namespace Name Mixin selector official bLbmx;b:Lgn;intermediary field_7866Lnet/minecraft/class_1731;field_7866:Lnet/minecraft/class_2371;named stacksLnet/minecraft/inventory/CraftingResultInventory;stacks:Lnet/minecraft/util/collection/DefaultedList;
-
lastRecipe
@Nullable private @Nullable Recipe<?> lastRecipe
- Mappings:
Namespace Name Mixin selector official cLbmx;c:Lbsj;intermediary field_7865Lnet/minecraft/class_1731;field_7865:Lnet/minecraft/class_1860;named lastRecipeLnet/minecraft/inventory/CraftingResultInventory;lastRecipe:Lnet/minecraft/recipe/Recipe;
-
-
方法详细资料
-
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, 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)
-
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()
-
setLastRecipe
public void setLastRecipe(@Nullable @Nullable Recipe<?> recipe)
- 指定者:
setLastRecipe在接口中RecipeUnlocker- Mappings:
Namespace Name Mixin selector official aLbmw;a(Lbsj;)Vintermediary method_7662Lnet/minecraft/class_1732;method_7662(Lnet/minecraft/class_1860;)Vnamed setLastRecipeLnet/minecraft/recipe/RecipeUnlocker;setLastRecipe(Lnet/minecraft/recipe/Recipe;)V
-
getLastRecipe
@Nullable public @Nullable Recipe<?> getLastRecipe()
- 指定者:
getLastRecipe在接口中RecipeUnlocker- Mappings:
Namespace Name Mixin selector official ap_Lbmw;ap_()Lbsj;intermediary method_7663Lnet/minecraft/class_1732;method_7663()Lnet/minecraft/class_1860;named getLastRecipeLnet/minecraft/recipe/RecipeUnlocker;getLastRecipe()Lnet/minecraft/recipe/Recipe;
-
-