Package net.minecraft.world.inventory
Class ResultContainer
java.lang.Object
net.minecraft.world.inventory.ResultContainer
- All Implemented Interfaces:
Iterable<ItemStack>,Clearable,Container,RecipeCraftingHolder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.Container
Container.ContainerIterator -
Field Summary
FieldsFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintgetItem(int pIndex) Returns the stack in the given slot.RecipeHolder<?> booleanisEmpty()removeItem(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.removeItemNoUpdate(int pIndex) Removes a stack from the given slot and returns it.voidvoidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidsetRecipeUsed(RecipeHolder<?> pRecipe) booleanstillValid(Player pPlayer) Don't rename this method to canInteractWith due to conflicts with ContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.inventory.RecipeCraftingHolder
awardUsedRecipes, setRecipeUsed
-
Field Details
-
itemStacks
-
recipeUsed
-
-
Constructor Details
-
ResultContainer
public ResultContainer()
-
-
Method Details
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
isEmpty
public boolean isEmpty() -
getItem
Returns the stack in the given slot. -
removeItem
Removes up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItemin interfaceContainer
-
removeItemNoUpdate
Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). -
setChanged
public void setChanged()- Specified by:
setChangedin interfaceContainer
-
stillValid
Don't rename this method to canInteractWith due to conflicts with Container- Specified by:
stillValidin interfaceContainer
-
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
setRecipeUsed
- Specified by:
setRecipeUsedin interfaceRecipeCraftingHolder
-
getRecipeUsed
- Specified by:
getRecipeUsedin interfaceRecipeCraftingHolder
-