Uses of Class
net.minecraft.world.item.ItemStack
Packages that use ItemStack
Package
Description
Events fired only on the client-side, chiefly related to rendering and user interfaces (screens and input).
Extension interfaces for
client
-only classes.-
Uses of ItemStack in net.minecraft.advancements
Fields in net.minecraft.advancements declared as ItemStackMethods in net.minecraft.advancements that return ItemStackMethods in net.minecraft.advancements with parameters of type ItemStackModifier and TypeMethodDescriptionAdvancement.Builder.display
(ItemStack pIcon, Component pTitle, Component pDescription, ResourceLocation pBackground, AdvancementType pType, boolean pShowToast, boolean pAnnounceChat, boolean pHidden) Constructors in net.minecraft.advancements with parameters of type ItemStackModifierConstructorDescriptionDisplayInfo
(ItemStack p_14969_, Component p_14970_, Component p_14971_, Optional<ResourceLocation> p_312452_, AdvancementType p_312497_, boolean p_14974_, boolean p_14975_, boolean p_14976_) -
Uses of ItemStack in net.minecraft.advancements.critereon
Fields in net.minecraft.advancements.critereon with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final Optional
<CollectionPredicate<ItemStack, ItemPredicate>> ItemBundlePredicate.items
The field for theitems
record component.private final Optional
<CollectionPredicate<ItemStack, ItemPredicate>> ItemContainerPredicate.items
The field for theitems
record component.Methods in net.minecraft.advancements.critereon that return types with arguments of type ItemStackModifier and TypeMethodDescriptionItemBundlePredicate.items()
Returns the value of theitems
record component.ItemContainerPredicate.items()
Returns the value of theitems
record component.Methods in net.minecraft.advancements.critereon with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
BeeNestDestroyedTrigger.TriggerInstance.matches
(BlockState pState, ItemStack pStack, int pNumBees) boolean
boolean
boolean
boolean
FishingRodHookedTrigger.TriggerInstance.matches
(ItemStack pRod, LootContext pContext, Collection<ItemStack> pStacks) boolean
InventoryChangeTrigger.TriggerInstance.matches
(Inventory pInventory, ItemStack pStack, int pFull, int pEmpty, int pOccupied) boolean
Neo: Override this method to reflect gameplay attribute modifiers instead of only NBT modifiers.boolean
ItemAttributeModifiersPredicate.matches
(ItemStack pStack, ItemAttributeModifiers pValue) boolean
ItemBundlePredicate.matches
(ItemStack pStack, BundleContents pValue) boolean
ItemContainerPredicate.matches
(ItemStack pStack, ItemContainerContents pValue) boolean
boolean
boolean
boolean
boolean
ItemEnchantmentsPredicate.matches
(ItemStack pStack, ItemEnchantments pEnchantments) boolean
ItemFireworkExplosionPredicate.matches
(ItemStack pStack, FireworkExplosion pValue) boolean
boolean
ItemJukeboxPlayablePredicate.matches
(ItemStack pStack, JukeboxPlayable pValue) boolean
ItemPotionsPredicate.matches
(ItemStack pStack, PotionContents pValue) boolean
boolean
boolean
ItemWritableBookPredicate.matches
(ItemStack pStack, WritableBookContent pValue) boolean
ItemWrittenBookPredicate.matches
(ItemStack pStack, WrittenBookContent pValue) boolean
boolean
PickedUpItemTrigger.TriggerInstance.matches
(ServerPlayer pPlayer, ItemStack pStack, LootContext pContext) boolean
PlayerInteractTrigger.TriggerInstance.matches
(ItemStack pItem, LootContext pLootContext) boolean
default boolean
boolean
boolean
TradeTrigger.TriggerInstance.matches
(LootContext pContext, ItemStack pStack) boolean
boolean
boolean
void
AnyBlockInteractionTrigger.trigger
(ServerPlayer pPlayer, BlockPos pPos, ItemStack pStack) void
BeeNestDestroyedTrigger.trigger
(ServerPlayer pPlayer, BlockState pState, ItemStack pStack, int pNumBees) void
ConsumeItemTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem) void
EnchantedItemTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem, int pLevelsSpent) void
FilledBucketTrigger.trigger
(ServerPlayer pPlayer, ItemStack pStack) void
FishingRodHookedTrigger.trigger
(ServerPlayer pPlayer, ItemStack pRod, FishingHook pEntity, Collection<ItemStack> pStacks) void
InventoryChangeTrigger.trigger
(ServerPlayer pPlayer, Inventory pInventory, ItemStack pStack) private void
InventoryChangeTrigger.trigger
(ServerPlayer pPlayer, Inventory pInventory, ItemStack pStack, int pFull, int pEmpty, int pOccupied) void
ItemDurabilityTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem, int pNewDurability) void
ItemUsedOnLocationTrigger.trigger
(ServerPlayer pPlayer, BlockPos pPos, ItemStack pStack) void
PickedUpItemTrigger.trigger
(ServerPlayer pPlayer, ItemStack pStack, Entity pEntity) void
PlayerInteractTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem, Entity pEntity) void
ShotCrossbowTrigger.trigger
(ServerPlayer pShooter, ItemStack pStack) void
TradeTrigger.trigger
(ServerPlayer pPlayer, AbstractVillager pVillager, ItemStack pStack) void
UsedTotemTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem) void
UsingItemTrigger.trigger
(ServerPlayer pPlayer, ItemStack pItem) Method parameters in net.minecraft.advancements.critereon with type arguments of type ItemStackModifier and TypeMethodDescriptionboolean
FishingRodHookedTrigger.TriggerInstance.matches
(ItemStack pRod, LootContext pContext, Collection<ItemStack> pStacks) (package private) boolean
RecipeCraftedTrigger.TriggerInstance.matches
(ResourceLocation pRecipeId, List<ItemStack> pItems) void
FishingRodHookedTrigger.trigger
(ServerPlayer pPlayer, ItemStack pRod, FishingHook pEntity, Collection<ItemStack> pStacks) void
RecipeCraftedTrigger.trigger
(ServerPlayer pPlayer, ResourceLocation pRecipeId, List<ItemStack> pItems) Constructor parameters in net.minecraft.advancements.critereon with type arguments of type ItemStackModifierConstructorDescriptionCreates an instance of aItemBundlePredicate
record class.Creates an instance of aItemContainerPredicate
record class. -
Uses of ItemStack in net.minecraft.client
Fields in net.minecraft.client with type parameters of type ItemStackModifier and TypeFieldDescriptionRecipeBookCategories.itemIcons
Deprecated.RecipeBookCategories.itemIconsSupplier
Methods in net.minecraft.client that return types with arguments of type ItemStackMethods in net.minecraft.client with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
Minecraft.addCustomNbtData
(ItemStack pStack, BlockEntity pBlockEntity, RegistryAccess pRegistryAccess) Constructors in net.minecraft.client with parameters of type ItemStackConstructor parameters in net.minecraft.client with type arguments of type ItemStackModifierConstructorDescriptionprivate
RecipeBookCategories
(Supplier<List<ItemStack>> itemIconsSupplier) -
Uses of ItemStack in net.minecraft.client.color.item
Methods in net.minecraft.client.color.item with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.client.gui
Fields in net.minecraft.client.gui declared as ItemStackMethods in net.minecraft.client.gui with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
GuiGraphics.renderComponentTooltip
(Font pFont, List<? extends FormattedText> pTooltipLines, int pMouseX, int pMouseY, ItemStack stack) Renders a tooltip with multiple lines of component-based text at the specified mouse coordinates.void
GuiGraphics.renderComponentTooltipFromElements
(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack) void
GuiGraphics.renderFakeItem
(ItemStack pStack, int pX, int pY) Renders a fake item stack at the specified coordinates.void
GuiGraphics.renderFakeItem
(ItemStack pStack, int pX, int pY, int pSeed) void
GuiGraphics.renderItem
(LivingEntity pEntity, ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack for a living entity at the specified coordinates with a random seed.private void
GuiGraphics.renderItem
(LivingEntity pEntity, Level pLevel, ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.private void
GuiGraphics.renderItem
(LivingEntity pEntity, Level pLevel, ItemStack pStack, int pX, int pY, int pSeed, int pGuiOffset) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed and a custom GUI offset.void
GuiGraphics.renderItem
(ItemStack pStack, int pX, int pY) Renders an item stack at the specified coordinates.void
GuiGraphics.renderItem
(ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack at the specified coordinates with a random seed.void
GuiGraphics.renderItem
(ItemStack pStack, int pX, int pY, int pSeed, int pGuiOffset) Renders an item stack at the specified coordinates with a random seed and a custom value.void
GuiGraphics.renderItemDecorations
(Font pFont, ItemStack pStack, int pX, int pY) Renders additional decorations for an item stack at the specified coordinates.void
GuiGraphics.renderItemDecorations
(Font pFont, ItemStack pStack, int pX, int pY, String pText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.private void
Gui.renderSlot
(GuiGraphics pGuiGraphics, int pX, int pY, DeltaTracker pDeltaTracker, Player pPlayer, ItemStack pStack, int pSeed) void
GuiGraphics.renderTooltip
(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY) void
GuiGraphics.renderTooltip
(Font pFont, ItemStack pStack, int pMouseX, int pMouseY) Renders a tooltip for an item stack at the specified mouse coordinates. -
Uses of ItemStack in net.minecraft.client.gui.screens
Methods in net.minecraft.client.gui.screens that return ItemStackModifier and TypeMethodDescriptionprivate ItemStack
CreateFlatWorldScreen.DetailsList.Entry.getDisplayItem
(BlockState pState) Methods in net.minecraft.client.gui.screens with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
CreateFlatWorldScreen.DetailsList.Entry.blitSlot
(GuiGraphics pGuiGraphics, int pX, int pY, ItemStack pStack) Screen.getTooltipFromItem
(Minecraft pMinecraft, ItemStack pItem) -
Uses of ItemStack in net.minecraft.client.gui.screens.advancements
Fields in net.minecraft.client.gui.screens.advancements declared as ItemStackMethods in net.minecraft.client.gui.screens.advancements with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
AdvancementTabType.drawIcon
(GuiGraphics pGuiGraphics, int pOffsetX, int pOffsetY, int pIndex, ItemStack pStack) -
Uses of ItemStack in net.minecraft.client.gui.screens.debug
Fields in net.minecraft.client.gui.screens.debug declared as ItemStackModifier and TypeFieldDescription(package private) final ItemStack
GameModeSwitcherScreen.GameModeIcon.renderStack
Constructors in net.minecraft.client.gui.screens.debug with parameters of type ItemStackModifierConstructorDescriptionprivate
GameModeIcon
(Component pName, String pCommand, ItemStack pRenderStack) -
Uses of ItemStack in net.minecraft.client.gui.screens.inventory
Fields in net.minecraft.client.gui.screens.inventory declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
LoomScreen.bannerStack
private final ItemStack
BookEditScreen.book
private ItemStack
AbstractContainerScreen.draggingItem
Used when touchscreen is enabledprivate ItemStack
LoomScreen.dyeStack
private ItemStack
EnchantmentScreen.last
private ItemStack
AbstractContainerScreen.lastQuickMoved
private ItemStack
LoomScreen.patternStack
private ItemStack
AbstractContainerScreen.snapbackItem
Used when touchscreen is enabledFields in net.minecraft.client.gui.screens.inventory with type parameters of type ItemStackModifier and TypeFieldDescriptionfinal NonNullList
<ItemStack> CreativeModeInventoryScreen.ItemPickerMenu.items
The list of items in this container.Methods in net.minecraft.client.gui.screens.inventory that return ItemStackModifier and TypeMethodDescriptionCreativeModeInventoryScreen.ItemPickerMenu.getCarried()
CreativeModeInventoryScreen.SlotWrapper.getItem()
CreativeModeInventoryScreen.ItemPickerMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.CreativeModeInventoryScreen.SlotWrapper.remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.Methods in net.minecraft.client.gui.screens.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
CreativeModeInventoryScreen.ItemPickerMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.static BookViewScreen.BookAccess
int
CreativeModeInventoryScreen.SlotWrapper.getMaxStackSize
(ItemStack pStack) AbstractContainerScreen.getTooltipFromContainerItem
(ItemStack pStack) CreativeModeInventoryScreen.getTooltipFromContainerItem
(ItemStack pStack) boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.void
private void
MerchantScreen.renderAndDecorateCostA
(GuiGraphics pGuiGraphics, ItemStack pRealCost, ItemStack pBaseCost, int pX, int pY) private void
AbstractContainerScreen.renderFloatingItem
(GuiGraphics pGuiGraphics, ItemStack pStack, int pX, int pY, String pText) protected void
AbstractContainerScreen.renderSlotContents
(GuiGraphics guiGraphics, ItemStack itemstack, Slot slot, String countString) void
Helper method to put a stack in the slot.void
CreativeModeInventoryScreen.SlotWrapper.setByPlayer
(ItemStack pNewStack, ItemStack pOldStack) void
CreativeModeInventoryScreen.ItemPickerMenu.setCarried
(ItemStack pStack) void
AnvilScreen.slotChanged
(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.void
CreativeInventoryListener.slotChanged
(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.void
ItemCombinerScreen.slotChanged
(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.void
SmithingScreen.slotChanged
(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.private void
SmithingScreen.updateArmorStandPreview
(ItemStack pStack) Method parameters in net.minecraft.client.gui.screens.inventory with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate void
CreativeModeInventoryScreen.refreshCurrentTabContents
(Collection<ItemStack> pItems) Constructors in net.minecraft.client.gui.screens.inventory with parameters of type ItemStackModifierConstructorDescriptionBookEditScreen
(Player pOwner, ItemStack pBook, InteractionHand pHand) -
Uses of ItemStack in net.minecraft.client.gui.screens.recipebook
Fields in net.minecraft.client.gui.screens.recipebook declared as ItemStackModifier and TypeFieldDescriptionfinal ItemStack[]
OverlayRecipeComponent.OverlayRecipeButton.Pos.ingredients
Methods in net.minecraft.client.gui.screens.recipebook that return ItemStackConstructors in net.minecraft.client.gui.screens.recipebook with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.client.model
Methods in net.minecraft.client.model with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
VexModel.setArmsCharging
(ItemStack pRightHandItem, ItemStack pLeftHandItem, float p_265125_) -
Uses of ItemStack in net.minecraft.client.multiplayer
Fields in net.minecraft.client.multiplayer declared as ItemStackFields in net.minecraft.client.multiplayer with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate CompletableFuture
<SearchTree<ItemStack>> SessionSearchTrees.creativeByNameSearch
private CompletableFuture
<SearchTree<ItemStack>> SessionSearchTrees.creativeByTagSearch
Methods in net.minecraft.client.multiplayer that return ItemStackMethods in net.minecraft.client.multiplayer that return types with arguments of type ItemStackModifier and TypeMethodDescriptionSessionSearchTrees.creativeNameSearch()
SessionSearchTrees.creativeNameSearch
(SessionSearchTrees.Key key) SessionSearchTrees.creativeTagSearch()
SessionSearchTrees.creativeTagSearch
(SessionSearchTrees.Key key) Methods in net.minecraft.client.multiplayer with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
MultiPlayerGameMode.handleCreativeModeItemAdd
(ItemStack pStack, int pSlotId) Used in PlayerControllerMP to update the server with an ItemStack in a slot.void
MultiPlayerGameMode.handleCreativeModeItemDrop
(ItemStack pStack) Sends a Packet107 to the server to drop the item on the groundMethod parameters in net.minecraft.client.multiplayer with type arguments of type ItemStackModifier and TypeMethodDescriptionSessionSearchTrees.getTooltipLines
(Stream<ItemStack> pItems, Item.TooltipContext pContext, TooltipFlag pTooltipFlag) void
SessionSearchTrees.updateCreativeTags
(List<ItemStack> pItems) void
SessionSearchTrees.updateCreativeTags
(List<ItemStack> pItems, SessionSearchTrees.Key key) void
SessionSearchTrees.updateCreativeTooltips
(HolderLookup.Provider pRegistries, List<ItemStack> pItems) void
SessionSearchTrees.updateCreativeTooltips
(HolderLookup.Provider pRegistries, List<ItemStack> pItems, SessionSearchTrees.Key key) -
Uses of ItemStack in net.minecraft.client.particle
Constructors in net.minecraft.client.particle with parameters of type ItemStackModifierConstructorDescriptionprotected
BreakingItemParticle
(ClientLevel pLevel, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed, ItemStack pStack) protected
BreakingItemParticle
(ClientLevel pLevel, double pX, double pY, double pZ, ItemStack pStack) -
Uses of ItemStack in net.minecraft.client.player
Methods in net.minecraft.client.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
LocalPlayer.openItemGui
(ItemStack pStack, InteractionHand pHand) void
LocalPlayer.updateTutorialInventoryAction
(ItemStack pCarried, ItemStack pClicked, ClickAction pAction) -
Uses of ItemStack in net.minecraft.client.player.inventory
Methods in net.minecraft.client.player.inventory that return types with arguments of type ItemStack -
Uses of ItemStack in net.minecraft.client.renderer
Fields in net.minecraft.client.renderer declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
GameRenderer.itemActivationItem
private ItemStack
ItemInHandRenderer.mainHandItem
private ItemStack
ItemInHandRenderer.offHandItem
Methods in net.minecraft.client.renderer with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
ItemInHandRenderer.applyBrushTransform
(PoseStack pPoseStack, float pPartialTick, HumanoidArm pArm, ItemStack pStack, Player pPlayer, float pEquippedProgress) private void
ItemInHandRenderer.applyEatTransform
(PoseStack pPoseStack, float pPartialTick, HumanoidArm pArm, ItemStack pStack, Player pPlayer) void
GameRenderer.displayItemActivation
(ItemStack pStack) ItemModelShaper.getItemModel
(ItemStack pStack) static RenderType
ItemBlockRenderTypes.getRenderType
(ItemStack pStack, boolean pCull) Deprecated.private static boolean
ItemInHandRenderer.isChargedCrossbow
(ItemStack pStack) private void
ItemInHandRenderer.renderArmWithItem
(AbstractClientPlayer pPlayer, float pPartialTicks, float pPitch, InteractionHand pHand, float pSwingProgress, ItemStack pStack, float pEquippedProgress, PoseStack pPoseStack, MultiBufferSource pBuffer, int pCombinedLight) void
BlockEntityWithoutLevelRenderer.renderByItem
(ItemStack pStack, ItemDisplayContext pDisplayContext, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay) void
ItemInHandRenderer.renderItem
(LivingEntity pEntity, ItemStack pItemStack, ItemDisplayContext pDisplayContext, boolean pLeftHand, PoseStack pPoseStack, MultiBufferSource pBuffer, int pSeed) private void
ItemInHandRenderer.renderMap
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pStack) private void
ItemInHandRenderer.renderOneHandedMap
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, float pEquippedProgress, HumanoidArm pHand, float pSwingProgress, ItemStack pStack) -
Uses of ItemStack in net.minecraft.client.renderer.block.model
Methods in net.minecraft.client.renderer.block.model with parameters of type ItemStackModifier and TypeMethodDescriptionItemOverrides.resolve
(BakedModel pModel, ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) -
Uses of ItemStack in net.minecraft.client.renderer.blockentity
Methods in net.minecraft.client.renderer.blockentity with parameters of type ItemStackModifier and TypeMethodDescriptionstatic void
VaultRenderer.renderItemInside
(float pPartialTick, Level pLevel, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pItem, ItemRenderer pItemRenderer, float pPreviousSpin, float pCurrentSpin, RandomSource pRandom) -
Uses of ItemStack in net.minecraft.client.renderer.entity
Methods in net.minecraft.client.renderer.entity with parameters of type ItemStackModifier and TypeMethodDescriptionprivate ModelResourceLocation
ItemFrameRenderer.getFrameModelResourceLoc
(T pEntity, ItemStack pItem) ItemRenderer.getModel
(ItemStack pStack, Level pLevel, LivingEntity pEntity, int pSeed) static int
ItemEntityRenderer.getSeedForItemStack
(ItemStack pStack) private static boolean
ItemRenderer.hasAnimatedTexture
(ItemStack pStack) void
ItemRenderer.render
(ItemStack pItemStack, ItemDisplayContext pDisplayContext, boolean pLeftHand, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pCombinedLight, int pCombinedOverlay, BakedModel pModel) void
ItemRenderer.renderModelLists
(BakedModel pModel, ItemStack pStack, int pCombinedLight, int pCombinedOverlay, PoseStack pPoseStack, VertexConsumer pBuffer) static void
ItemEntityRenderer.renderMultipleFromCount
(ItemRenderer pItemRenderer, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pItem, BakedModel pModel, boolean pIsGui3d, RandomSource pRandom) static void
ItemEntityRenderer.renderMultipleFromCount
(ItemRenderer pItemRenderer, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pItem, RandomSource pRandom, Level pLevel) void
ItemRenderer.renderQuadList
(PoseStack pPoseStack, VertexConsumer pBuffer, List<BakedQuad> pQuads, ItemStack pItemStack, int pCombinedLight, int pCombinedOverlay) void
ItemRenderer.renderStatic
(LivingEntity pEntity, ItemStack pItemStack, ItemDisplayContext pDiplayContext, boolean pLeftHand, PoseStack pPoseStack, MultiBufferSource pBufferSource, Level pLevel, int pCombinedLight, int pCombinedOverlay, int pSeed) void
ItemRenderer.renderStatic
(ItemStack pStack, ItemDisplayContext pDisplayContext, int pCombinedLight, int pCombinedOverlay, PoseStack pPoseStack, MultiBufferSource pBufferSource, Level pLevel, int pSeed) -
Uses of ItemStack in net.minecraft.client.renderer.entity.layers
Methods in net.minecraft.client.renderer.entity.layers with parameters of type ItemStackModifier and TypeMethodDescriptionprotected Model
HumanoidArmorLayer.getArmorModelHook
(T entity, ItemStack itemStack, EquipmentSlot slot, A model) Hook to allow item-sensitive armor model. for HumanoidArmorLayer.ElytraLayer.getElytraTexture
(ItemStack stack, T entity) Gets the texture to use with this ElytraLayer.private void
WolfArmorLayer.maybeRenderColoredLayer
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pArmorStack, AnimalArmorItem pArmorItem) private void
WolfArmorLayer.maybeRenderCracks
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, ItemStack pArmorStack) protected void
ItemInHandLayer.renderArmWithItem
(LivingEntity pLivingEntity, ItemStack pItemStack, ItemDisplayContext pDisplayContext, HumanoidArm pArm, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight) protected void
PlayerItemInHandLayer.renderArmWithItem
(LivingEntity pLivingEntity, ItemStack pItemStack, ItemDisplayContext pDisplayContext, HumanoidArm pArm, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight) private void
PlayerItemInHandLayer.renderArmWithSpyglass
(LivingEntity pEntity, ItemStack pStack, HumanoidArm pArm, PoseStack pPoseStack, MultiBufferSource pBuffer, int pCombinedLight) boolean
ElytraLayer.shouldRender
(ItemStack stack, T entity) Determines if the ElytraLayer should render. -
Uses of ItemStack in net.minecraft.client.renderer.item
Methods in net.minecraft.client.renderer.item with parameters of type ItemStackModifier and TypeMethodDescriptiondefault float
ClampedItemPropertyFunction.call
(ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) Deprecated.float
ItemPropertyFunction.call
(ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) Deprecated.private float
CompassItemPropertyFunction.getCompassRotation
(ItemStack pStack, ClientLevel pLevel, int pSeed, Entity pEntity) CompassItemPropertyFunction.CompassTarget.getPos
(ClientLevel pLevel, ItemStack pStack, Entity pEntity) static ItemPropertyFunction
ItemProperties.getProperty
(ItemStack pStack, ResourceLocation pLocation) float
ClampedItemPropertyFunction.unclampedCall
(ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) float
CompassItemPropertyFunction.unclampedCall
(ItemStack pStack, ClientLevel pLevel, LivingEntity pEntity, int pSeed) -
Uses of ItemStack in net.minecraft.client.resources.model
Methods in net.minecraft.client.resources.model with parameters of type ItemStackModifier and TypeMethodDescriptionSimpleBakedModel.getRenderTypes
(ItemStack itemStack, boolean fabulous) -
Uses of ItemStack in net.minecraft.client.tutorial
Methods in net.minecraft.client.tutorial with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Called when the player pick up an ItemStackvoid
Called when the player pick up an ItemStackvoid
Called when the player pick up an ItemStackvoid
Called when the player pick up an ItemStackdefault void
Called when the player pick up an ItemStackvoid
BundleTutorial.onInventoryAction
(ItemStack pCarriedStack, ItemStack pSlottedStack, ClickAction pAction) void
Tutorial.onInventoryAction
(ItemStack pCarriedStack, ItemStack pSlottedStack, ClickAction pAction) -
Uses of ItemStack in net.minecraft.commands.arguments.item
Fields in net.minecraft.commands.arguments.item with type parameters of type ItemStackModifier and TypeFieldDescriptionItemPredicateArgument.grammarWithContext
ItemPredicateArgument.ComponentWrapper.presenceChecker
The field for thepresenceChecker
record component.ItemPredicateArgument.PredicateWrapper.type
The field for thetype
record component.ItemPredicateArgument.ComponentWrapper.valueChecker
The field for thevalueChecker
record component.Methods in net.minecraft.commands.arguments.item that return ItemStackModifier and TypeMethodDescriptionItemInput.createItemStack
(int pCount, boolean pAllowOversizedStacks) Methods in net.minecraft.commands.arguments.item that return types with arguments of type ItemStackModifier and TypeMethodDescriptionItemPredicateArgument.Context.createComponentTest
(com.mojang.brigadier.ImmutableStringReader p_335602_, ItemPredicateArgument.ComponentWrapper p_335607_) ItemPredicateArgument.Context.createComponentTest
(com.mojang.brigadier.ImmutableStringReader p_335953_, ItemPredicateArgument.ComponentWrapper p_335824_, Tag p_335973_) ItemPredicateArgument.Context.createPredicateTest
(com.mojang.brigadier.ImmutableStringReader p_335414_, ItemPredicateArgument.PredicateWrapper p_335561_, Tag p_336073_) ItemPredicateArgument.ComponentWrapper.decode
(com.mojang.brigadier.ImmutableStringReader p_335970_, RegistryOps<Tag> p_335855_, Tag p_335892_) ItemPredicateArgument.PredicateWrapper.decode
(com.mojang.brigadier.ImmutableStringReader p_335497_, RegistryOps<Tag> p_335845_, Tag p_335487_) ItemPredicateArgument.Context.forElementType
(com.mojang.brigadier.ImmutableStringReader p_335407_, ResourceLocation p_335837_) ItemPredicateArgument.Context.forTagType
(com.mojang.brigadier.ImmutableStringReader p_335801_, ResourceLocation p_336117_) ItemPredicateArgument.ComponentWrapper.presenceChecker()
Returns the value of thepresenceChecker
record component.ItemPredicateArgument.PredicateWrapper.type()
Returns the value of thetype
record component.ItemPredicateArgument.ComponentWrapper.valueChecker()
Returns the value of thevalueChecker
record component.Method parameters in net.minecraft.commands.arguments.item with type arguments of type ItemStackModifier and TypeMethodDescriptionConstructor parameters in net.minecraft.commands.arguments.item with type arguments of type ItemStackModifierConstructorDescription(package private)
ComponentWrapper
(ResourceLocation id, Predicate<ItemStack> presenceChecker, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker) Creates an instance of aComponentWrapper
record class.(package private)
ComponentWrapper
(ResourceLocation id, Predicate<ItemStack> presenceChecker, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker) Creates an instance of aComponentWrapper
record class.(package private)
PredicateWrapper
(ResourceLocation id, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> type) Creates an instance of aPredicateWrapper
record class. -
Uses of ItemStack in net.minecraft.core.cauldron
Methods in net.minecraft.core.cauldron with parameters of type ItemStackModifier and TypeMethodDescriptionstatic ItemInteractionResult
CauldronInteraction.emptyBucket
(Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pFilledStack, BlockState pState, SoundEvent pEmptySound) static ItemInteractionResult
CauldronInteraction.fillBucket
(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pEmptyStack, ItemStack pFilledStack, Predicate<BlockState> pStatePredicate, SoundEvent pFillSound) CauldronInteraction.interact
(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pStack) -
Uses of ItemStack in net.minecraft.core.dispenser
Methods in net.minecraft.core.dispenser that return ItemStackModifier and TypeMethodDescriptionprotected ItemStack
DefaultDispenseItemBehavior.consumeWithRemainder
(BlockSource pBlockSource, ItemStack pStack, ItemStack pRemainder) final ItemStack
DefaultDispenseItemBehavior.dispense
(BlockSource pBlockSource, ItemStack pItem) DispenseItemBehavior.dispense
(BlockSource pBlockSource, ItemStack pItem) BoatDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
DefaultDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) ProjectileDispenseBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
ShearsDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
ShulkerBoxDispenseBehavior.execute
(BlockSource p_302426_, ItemStack p_123588_) Methods in net.minecraft.core.dispenser with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
DefaultDispenseItemBehavior.addToInventoryOrDispense
(BlockSource pBlockSource, ItemStack pRemainder) protected ItemStack
DefaultDispenseItemBehavior.consumeWithRemainder
(BlockSource pBlockSource, ItemStack pStack, ItemStack pRemainder) final ItemStack
DefaultDispenseItemBehavior.dispense
(BlockSource pBlockSource, ItemStack pItem) DispenseItemBehavior.dispense
(BlockSource pBlockSource, ItemStack pItem) BoatDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
DefaultDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) ProjectileDispenseBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
ShearsDispenseItemBehavior.execute
(BlockSource pBlockSource, ItemStack pItem) protected ItemStack
ShulkerBoxDispenseBehavior.execute
(BlockSource p_302426_, ItemStack p_123588_) static void
DefaultDispenseItemBehavior.spawnItem
(Level pLevel, ItemStack pStack, int pSpeed, Direction pFacing, Position pPosition) private static boolean
ShearsDispenseItemBehavior.tryShearLivingEntity
(ServerLevel pLevel, BlockPos pPos, ItemStack stack) -
Uses of ItemStack in net.minecraft.core.particles
Fields in net.minecraft.core.particles declared as ItemStackFields in net.minecraft.core.particles with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<ItemStack> ItemParticleOption.ITEM_CODEC
Methods in net.minecraft.core.particles that return ItemStackConstructors in net.minecraft.core.particles with parameters of type ItemStackModifierConstructorDescriptionItemParticleOption
(ParticleType<ItemParticleOption> pType, ItemStack pItemStack) -
Uses of ItemStack in net.minecraft.data.recipes
Fields in net.minecraft.data.recipes declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
ShapedRecipeBuilder.resultStack
private final ItemStack
ShapelessRecipeBuilder.resultStack
private final ItemStack
SimpleCookingRecipeBuilder.stackResult
Methods in net.minecraft.data.recipes with parameters of type ItemStackModifier and TypeMethodDescriptionstatic SimpleCookingRecipeBuilder
SimpleCookingRecipeBuilder.blasting
(Ingredient p_252115_, RecipeCategory p_249421_, ItemStack result, float p_250383_, int p_250476_) static SimpleCookingRecipeBuilder
SimpleCookingRecipeBuilder.campfireCooking
(Ingredient p_249393_, RecipeCategory p_249372_, ItemStack result, float p_252321_, int p_251916_) static <T extends AbstractCookingRecipe>
SimpleCookingRecipeBuilderSimpleCookingRecipeBuilder.generic
(Ingredient p_250999_, RecipeCategory p_248815_, ItemStack result, float p_251320_, int p_248693_, RecipeSerializer<T> p_250921_, AbstractCookingRecipe.Factory<T> p_312657_) static ShapedRecipeBuilder
ShapedRecipeBuilder.shaped
(RecipeCategory p_251325_, ItemStack result) static ShapelessRecipeBuilder
ShapelessRecipeBuilder.shapeless
(RecipeCategory p_252339_, ItemStack result) static SimpleCookingRecipeBuilder
SimpleCookingRecipeBuilder.smelting
(Ingredient p_249223_, RecipeCategory p_251240_, ItemStack result, float p_249452_, int p_250496_) static SimpleCookingRecipeBuilder
SimpleCookingRecipeBuilder.smoking
(Ingredient p_248930_, RecipeCategory p_250319_, ItemStack result, float p_252329_, int p_250482_) Constructors in net.minecraft.data.recipes with parameters of type ItemStackModifierConstructorDescriptionShapedRecipeBuilder
(RecipeCategory p_249996_, ItemStack result) ShapelessRecipeBuilder
(RecipeCategory p_250837_, ItemStack result) private
SimpleCookingRecipeBuilder
(RecipeCategory p_251345_, CookingBookCategory p_251607_, ItemStack result, Ingredient p_250362_, float p_251204_, int p_250189_, AbstractCookingRecipe.Factory<?> p_311960_) -
Uses of ItemStack in net.minecraft.gametest.framework
Methods in net.minecraft.gametest.framework that return ItemStackModifier and TypeMethodDescriptionprivate static ItemStack
ReportGameListener.createBook
(String pTestName, boolean pRequired, String pMessage) Methods in net.minecraft.gametest.framework with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.network.chat
Fields in net.minecraft.network.chat declared as ItemStackMethods in net.minecraft.network.chat that return ItemStackConstructors in net.minecraft.network.chat with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.network.protocol.game
Fields in net.minecraft.network.protocol.game declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
ClientboundContainerSetContentPacket.carriedItem
private final ItemStack
ServerboundContainerClickPacket.carriedItem
private final ItemStack
ClientboundContainerSetSlotPacket.itemStack
private final ItemStack
ServerboundSetCreativeModeSlotPacket.itemStack
The field for theitemStack
record component.Fields in net.minecraft.network.protocol.game with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap
<ItemStack> ServerboundContainerClickPacket.changedSlots
ClientboundContainerSetContentPacket.items
private final List
<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> ClientboundSetEquipmentPacket.slots
private static final StreamCodec
<RegistryFriendlyByteBuf, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack>> ServerboundContainerClickPacket.SLOTS_STREAM_CODEC
Methods in net.minecraft.network.protocol.game that return ItemStackModifier and TypeMethodDescriptionClientboundContainerSetContentPacket.getCarriedItem()
ServerboundContainerClickPacket.getCarriedItem()
ClientboundContainerSetSlotPacket.getItem()
ServerboundSetCreativeModeSlotPacket.itemStack()
Returns the value of theitemStack
record component.Methods in net.minecraft.network.protocol.game that return types with arguments of type ItemStackModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.ints.Int2ObjectMap
<ItemStack> ServerboundContainerClickPacket.getChangedSlots()
ClientboundContainerSetContentPacket.getItems()
List
<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> ClientboundSetEquipmentPacket.getSlots()
Constructors in net.minecraft.network.protocol.game with parameters of type ItemStackModifierConstructorDescriptionClientboundContainerSetContentPacket
(int pContainerId, int pStateId, NonNullList<ItemStack> pItems, ItemStack pCarriedItem) ClientboundContainerSetSlotPacket
(int pContainerId, int pStateId, int pSlot, ItemStack pItemStack) ServerboundContainerClickPacket
(int p_182734_, int p_182735_, int p_182736_, int p_182737_, ClickType p_182738_, ItemStack p_182739_, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack> p_182740_) ServerboundSetCreativeModeSlotPacket
(int p_134553_, ItemStack p_134554_) ServerboundSetCreativeModeSlotPacket
(short slotNum, ItemStack itemStack) Creates an instance of aServerboundSetCreativeModeSlotPacket
record class.Constructor parameters in net.minecraft.network.protocol.game with type arguments of type ItemStackModifierConstructorDescriptionClientboundContainerSetContentPacket
(int pContainerId, int pStateId, NonNullList<ItemStack> pItems, ItemStack pCarriedItem) ClientboundSetEquipmentPacket
(int pEntity, List<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> pSlots) ServerboundContainerClickPacket
(int p_182734_, int p_182735_, int p_182736_, int p_182737_, ClickType p_182738_, ItemStack p_182739_, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ItemStack> p_182740_) -
Uses of ItemStack in net.minecraft.network.syncher
Fields in net.minecraft.network.syncher with type parameters of type ItemStackModifier and TypeFieldDescriptionstatic final EntityDataSerializer
<ItemStack> EntityDataSerializers.ITEM_STACK
-
Uses of ItemStack in net.minecraft.recipebook
Methods in net.minecraft.recipebook with parameters of type ItemStackModifier and TypeMethodDescriptionprotected int
ServerPlaceRecipe.moveItemToGrid
(Slot pSlot, ItemStack pStack, int pMaxAmount) -
Uses of ItemStack in net.minecraft.server.commands
Methods in net.minecraft.server.commands that return ItemStackModifier and TypeMethodDescriptionprivate static ItemStack
ItemCommands.applyModifier
(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) private static ItemStack
ItemCommands.getBlockItem
(CommandSourceStack pSource, BlockPos pPos, int pSlot) private static ItemStack
ItemCommands.getEntityItem
(Entity pEntity, int pSlot) private static ItemStack
LootCommand.getSourceHandItem
(CommandSourceStack pSource, EquipmentSlot pSlot) Methods in net.minecraft.server.commands with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static ItemStack
ItemCommands.applyModifier
(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) private static boolean
LootCommand.canMergeItems
(ItemStack pFirst, ItemStack pSecond) private static boolean
LootCommand.distributeToContainer
(Container pContainer, ItemStack pItem) private static int
LootCommand.dropBlockLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137913_, BlockPos p_137914_, ItemStack p_137915_, LootCommand.DropConsumer p_137916_) private static int
LootCommand.dropFishingLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137927_, Holder<LootTable> p_335944_, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer p_137931_) private static int
ItemCommands.setBlockItem
(CommandSourceStack pSource, BlockPos pPos, int pSlot, ItemStack pItem) private static int
ItemCommands.setEntityItem
(CommandSourceStack pSource, Collection<? extends Entity> pTargets, int pSlot, ItemStack pItem) Method parameters in net.minecraft.server.commands with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
int
LootCommand.DropConsumer.accept
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_138050_, List<ItemStack> p_138051_, LootCommand.Callback p_138052_) private static int
LootCommand.blockDistribute
(CommandSourceStack pSource, BlockPos pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static int
LootCommand.blockReplace
(CommandSourceStack pSource, BlockPos pPos, int pSlot, int pNumSlots, List<ItemStack> pItems, LootCommand.Callback pCallback) private static void
LootCommand.callback
(CommandSourceStack pSource, List<ItemStack> pItems) private static void
LootCommand.callback
(CommandSourceStack pSource, List<ItemStack> pItems, ResourceKey<LootTable> pLootTable) private static int
ClearInventoryCommands.clearInventory
(CommandSourceStack pSource, Collection<ServerPlayer> pTargetPlayers, Predicate<ItemStack> pItemPredicate, int pMaxCount) private static int
ClearInventoryCommands.clearUnlimited
(CommandSourceStack pSource, Collection<ServerPlayer> pTargets, Predicate<ItemStack> pFilter) private static int
ExecuteCommand.countItems
(Iterable<? extends Entity> pTargets, SlotRange pSlotRange, Predicate<ItemStack> pFilter) private static int
ExecuteCommand.countItems
(CommandSourceStack pSource, BlockPos pPos, SlotRange pSlotRange, Predicate<ItemStack> pFilter) private static int
LootCommand.dropInWorld
(CommandSourceStack pSource, Vec3 pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static int
LootCommand.entityReplace
(Collection<? extends Entity> pTargets, int pStartSlot, int pNumSlots, List<ItemStack> pItems, LootCommand.Callback pCallback) private static int
LootCommand.playerGive
(Collection<ServerPlayer> pTargets, List<ItemStack> pItems, LootCommand.Callback pCallback) private static void
LootCommand.setSlots
(Entity pTarget, List<ItemStack> pItems, int pStartSlot, int pNumSlots, List<ItemStack> pSetItems) -
Uses of ItemStack in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type ItemStackModifier and TypeMethodDescriptionCreates and drops the provided item.void
ServerPlayer.onEnchantmentPerformed
(ItemStack pEnchantedItem, int pCost) void
ServerPlayer.openItemGui
(ItemStack pStack, InteractionHand pHand) protected void
ServerPlayer.updateUsingItem
(ItemStack pUsingItem) DemoMode.useItem
(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand) ServerPlayerGameMode.useItem
(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand) DemoMode.useItemOn
(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand, BlockHitResult pHitResult) ServerPlayerGameMode.useItemOn
(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand, BlockHitResult pHitResult) Method parameters in net.minecraft.server.level with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
ServerPlayer.triggerRecipeCrafted
(RecipeHolder<?> pRecipe, List<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.server.network
Methods in net.minecraft.server.network with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static boolean
ServerGamePacketListenerImpl.wasBlockPlacementAttempt
(ServerPlayer pPlayer, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world
Fields in net.minecraft.world with type parameters of type ItemStackMethods in net.minecraft.world that return ItemStackModifier and TypeMethodDescriptionCompoundContainer.getItem
(int pIndex) Returns the stack in the given slot.Container.getItem
(int pSlot) Returns the stack in the given slot.SimpleContainer.getItem
(int pIndex) Returns the stack in the given slot.CompoundContainer.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.Container.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.static ItemStack
ContainerHelper.removeItem
(List<ItemStack> pStacks, int pIndex, int pAmount) SimpleContainer.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.CompoundContainer.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.Container.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.SimpleContainer.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.SimpleContainer.removeItemType
(Item pItem, int pAmount) static ItemStack
Methods in net.minecraft.world that return types with arguments of type ItemStackMethods in net.minecraft.world with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
SimpleContainer.canAddItem
(ItemStack pStack) boolean
CompoundContainer.canPlaceItem
(int pIndex, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.default boolean
Container.canPlaceItem
(int pSlot, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
WorldlyContainer.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.default boolean
Container.canTakeItem
(Container pTarget, int pSlot, ItemStack pStack) Returnstrue
if the given stack can be extracted into the target inventory.boolean
WorldlyContainer.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.static int
ContainerHelper.clearOrCountMatchingItems
(ItemStack pStack, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) static void
Containers.dropItemStack
(Level pLevel, double pX, double pY, double pZ, ItemStack pStack) default int
Container.getMaxStackSize
(ItemStack pStack) private void
SimpleContainer.moveItemsBetweenStacks
(ItemStack pStack, ItemStack pOther) private void
SimpleContainer.moveItemToEmptySlots
(ItemStack pStack) private void
SimpleContainer.moveItemToOccupiedSlotsWithSameType
(ItemStack pStack) void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).boolean
LockCode.unlocksWith
(ItemStack pStack) Method parameters in net.minecraft.world with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic int
ContainerHelper.clearOrCountMatchingItems
(Container pContainer, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) Clears items from the inventory matching a predicate.static int
ContainerHelper.clearOrCountMatchingItems
(ItemStack pStack, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) static void
Containers.dropContents
(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pStackList) default boolean
Container.hasAnyMatching
(Predicate<ItemStack> pPredicate) static void
ContainerHelper.loadAllItems
(CompoundTag pTag, NonNullList<ItemStack> pItems, HolderLookup.Provider pLevelRegistry) static ItemStack
ContainerHelper.removeItem
(List<ItemStack> pStacks, int pIndex, int pAmount) static CompoundTag
ContainerHelper.saveAllItems
(CompoundTag pTag, NonNullList<ItemStack> pItems, boolean pAlwaysPutTag, HolderLookup.Provider pLevelRegistry) static CompoundTag
ContainerHelper.saveAllItems
(CompoundTag pTag, NonNullList<ItemStack> pItems, HolderLookup.Provider pLevelRegistry) static ItemStack
Constructors in net.minecraft.world with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.damagesource
Methods in net.minecraft.world.damagesource that return ItemStack -
Uses of ItemStack in net.minecraft.world.entity
Fields in net.minecraft.world.entity declared as ItemStackModifier and TypeFieldDescriptionprotected ItemStack
LivingEntity.autoSpinAttackItemStack
private ItemStack
Mob.bodyArmorItem
private final ItemStack
Display.ItemDisplay.ItemRenderState.itemStack
The field for theitemStack
record component.private final ItemStack
EntitySelector.MobCanWearArmorEntitySelector.itemStack
private ItemStack
LivingEntity.lastBodyItemStack
protected ItemStack
LivingEntity.useItem
Fields in net.minecraft.world.entity with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final NonNullList
<ItemStack> Mob.armorItems
private static final EntityDataAccessor
<ItemStack> OminousItemSpawner.DATA_ITEM
private static final EntityDataAccessor
<ItemStack> Display.ItemDisplay.DATA_ITEM_STACK_ID
private final NonNullList
<ItemStack> Mob.handItems
private final NonNullList
<ItemStack> LivingEntity.lastArmorItemStacks
private final NonNullList
<ItemStack> LivingEntity.lastHandItemStacks
Methods in net.minecraft.world.entity that return ItemStackModifier and TypeMethodDescriptionfinal ItemStack
LivingEntity.eat
(Level pLevel, ItemStack pFood, FoodProperties pFoodProperties) Mob.equipItemIfPossible
(ItemStack pStack) SlotAccess.get()
Mob.getBodyArmorItem()
OminousItemSpawner.getItem()
EquipmentUser.getItemBySlot
(EquipmentSlot pSlot) abstract ItemStack
LivingEntity.getItemBySlot
(EquipmentSlot pSlot) Mob.getItemBySlot
(EquipmentSlot pSlot) LivingEntity.getItemInHand
(InteractionHand pHand) private ItemStack
Display.ItemDisplay.getItemStack()
private ItemStack
LivingEntity.getLastArmorItem
(EquipmentSlot pSlot) private ItemStack
LivingEntity.getLastHandItem
(EquipmentSlot pSlot) LivingEntity.getMainHandItem()
LivingEntity.getOffhandItem()
Entity.getPickResult()
Mob.getPickResult()
LivingEntity.getProjectile
(ItemStack pWeaponStack) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.LivingEntity.getUseItem()
Entity.getWeaponItem()
LivingEntity.getWeaponItem()
Display.ItemDisplay.ItemRenderState.itemStack()
Returns the value of theitemStack
record component.Methods in net.minecraft.world.entity that return types with arguments of type ItemStackModifier and TypeMethodDescriptionprivate Map
<EquipmentSlot, ItemStack> LivingEntity.collectEquipmentChanges()
LivingEntity.getAllSlots()
LivingEntity.getArmorAndBodyArmorSlots()
LivingEntity.getArmorSlots()
Mob.getArmorSlots()
LivingEntity.getHandSlots()
Mob.getHandSlots()
Methods in net.minecraft.world.entity with parameters of type ItemStackModifier and TypeMethodDescriptionEntityType.appendCustomEntityStackConfig
(Consumer<T> pConsumer, ServerLevel pLevel, ItemStack pStack, Player pPlayer) EntityType.appendCustomNameConfig
(Consumer<T> pConsumer, ItemStack pStack) EntityType.appendDefaultStackConfig
(Consumer<T> pConsumer, ServerLevel pServerLevel, ItemStack pStack, Player pPlayer) private void
Renders broken item particles using the given ItemStackboolean
Mob.canHoldItem
(ItemStack pStack) protected boolean
Mob.canReplaceCurrentItem
(ItemStack pCandidate, ItemStack pExisting) boolean
Mob.canReplaceEqualItem
(ItemStack pCandidate, ItemStack pExisting) boolean
LivingEntity.canTakeItem
(ItemStack pStack) boolean
Mob.canTakeItem
(ItemStack pItemstack) static OminousItemSpawner
EntityType.createDefaultStackConfig
(ServerLevel pServerLevel, ItemStack pStack, Player pPlayer) final ItemStack
LivingEntity.eat
(Level pLevel, ItemStack pFood, FoodProperties pFoodProperties) Mob.equipItemIfPossible
(ItemStack pStack) boolean
LivingEntity.equipmentHasChanged
(ItemStack pOldItem, ItemStack pNewItem) void
Saddleable.equipSaddle
(ItemStack pStack, SoundSource pSoundSource) private double
Mob.getApproximateAttackDamageWithItem
(ItemStack pItemStack) protected SoundEvent
LivingEntity.getDrinkingSound
(ItemStack pStack) LivingEntity.getEatingSound
(ItemStack pStack) LivingEntity.getEquipmentSlotForItem
(ItemStack pStack) LivingEntity.getProjectile
(ItemStack pWeaponStack) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.private static boolean
Mob.hasAnyComponentExceptDamage
(ItemStack pStack) boolean
Mob.isBodyArmorItem
(ItemStack pStack) void
LivingEntity.onEquipItem
(EquipmentSlot pSlot, ItemStack pOldItem, ItemStack pNewItem) default EquipmentSlot
EquipmentUser.resolveSlot
(ItemStack pStack, List<EquipmentSlot> pExcludedSlots) boolean
void
Mob.setBodyArmorItem
(ItemStack pStack) private void
void
LivingEntity.setItemInHand
(InteractionHand pHand, ItemStack pStack) void
EquipmentUser.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) abstract void
LivingEntity.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) void
Mob.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) protected void
Mob.setItemSlotAndDropWhenKilled
(EquipmentSlot pSlot, ItemStack pStack) private void
Display.ItemDisplay.setItemStack
(ItemStack p_270310_) private void
LivingEntity.setLastArmorItem
(EquipmentSlot pSlot, ItemStack pStack) private void
LivingEntity.setLastHandItem
(EquipmentSlot pSlot, ItemStack pStack) EntityType.spawn
(ServerLevel pServerLevel, ItemStack pStack, Player pPlayer, BlockPos pPos, MobSpawnType pSpawnType, boolean pShouldOffsetY, boolean pShouldOffsetYMore) Entity.spawnAtLocation
(ItemStack pStack) Entity.spawnAtLocation
(ItemStack pStack, float pOffsetY) Drops an item at the position of the entity.private void
LivingEntity.spawnItemParticles
(ItemStack pStack, int pAmount) protected void
LivingEntity.triggerItemUseEffects
(ItemStack pStack, int pAmount) protected void
LivingEntity.updateUsingItem
(ItemStack pUsingItem) protected void
LivingEntity.verifyEquippedItem
(ItemStack pStack) boolean
Mob.wantsToPickUp
(ItemStack pStack) Method parameters in net.minecraft.world.entity with type arguments of type ItemStackModifier and TypeMethodDescriptionMob.dropPreservedEquipment
(Predicate<ItemStack> pPredicate) static SlotAccess
SlotAccess.forContainer
(Container pInventory, int pSlot, Predicate<ItemStack> pStackFilter) static SlotAccess
SlotAccess.forEquipmentSlot
(LivingEntity pEntity, EquipmentSlot pSlot, Predicate<ItemStack> pStackFilter) private void
LivingEntity.handleEquipmentChanges
(Map<EquipmentSlot, ItemStack> pEquipments) private void
LivingEntity.handleHandSwap
(Map<EquipmentSlot, ItemStack> pHands) boolean
static SlotAccess
static SlotAccess
Constructors in net.minecraft.world.entity with parameters of type ItemStackModifierConstructorDescriptionItemRenderState
(ItemStack itemStack, ItemDisplayContext itemTransform) Creates an instance of aItemRenderState
record class. -
Uses of ItemStack in net.minecraft.world.entity.ai.behavior
Fields in net.minecraft.world.entity.ai.behavior declared as ItemStackFields in net.minecraft.world.entity.ai.behavior with type parameters of type ItemStackMethods in net.minecraft.world.entity.ai.behavior that return ItemStackModifier and TypeMethodDescriptionprivate ItemStack
CelebrateVillagersSurvivedRaid.getFirework
(DyeColor pColor, int pFlightTime) Methods in net.minecraft.world.entity.ai.behavior that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.ai.behavior with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static void
ShowTradesToPlayer.displayAsHeldItem
(Villager pVillager, ItemStack pItem) static void
BehaviorUtils.throwItem
(LivingEntity pLivingEntity, ItemStack pStack, Vec3 pOffset) static void
BehaviorUtils.throwItem
(LivingEntity pEntity, ItemStack pStack, Vec3 pOffset, Vec3 pSpeedMultiplier, float pYOffset) static void
GoAndGiveItemsToTarget.throwItem
(LivingEntity pEntity, ItemStack pStack, Vec3 pThrowPos) private void
GoAndGiveItemsToTarget.triggerDropItemOnBlock
(PositionTracker pPositionTracker, ItemStack pStack, ServerPlayer pPlayer) -
Uses of ItemStack in net.minecraft.world.entity.ai.goal
Fields in net.minecraft.world.entity.ai.goal declared as ItemStackFields in net.minecraft.world.entity.ai.goal with type parameters of type ItemStackConstructors in net.minecraft.world.entity.ai.goal with parameters of type ItemStackModifierConstructorDescriptionUseItemGoal
(T pMob, ItemStack pItem, SoundEvent pFinishUsingSound, Predicate<? super T> pCanUseSelector) Constructor parameters in net.minecraft.world.entity.ai.goal with type arguments of type ItemStackModifierConstructorDescriptionTemptGoal
(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) -
Uses of ItemStack in net.minecraft.world.entity.ai.sensing
Fields in net.minecraft.world.entity.ai.sensing with type parameters of type ItemStackMethods in net.minecraft.world.entity.ai.sensing with parameters of type ItemStackConstructor parameters in net.minecraft.world.entity.ai.sensing with type arguments of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal
Methods in net.minecraft.world.entity.animal that return ItemStackModifier and TypeMethodDescriptionBucketable.getBucketItemStack()
Cod.getBucketItemStack()
Pufferfish.getBucketItemStack()
Salmon.getBucketItemStack()
TropicalFish.getBucketItemStack()
Methods in net.minecraft.world.entity.animal with parameters of type ItemStackModifier and TypeMethodDescriptionprivate boolean
boolean
Fox.canHoldItem
(ItemStack pStack) boolean
Dolphin.canTakeItem
(ItemStack pItemstack) boolean
Fox.canTakeItem
(ItemStack pItemstack) boolean
Panda.canTakeItem
(ItemStack pItemstack) private void
private void
Fox.dropItemStack
(ItemStack pStack) void
Pig.equipSaddle
(ItemStack pStack, SoundSource pSoundSource) Fox.getEatingSound
(ItemStack pItemStack) private Optional
<SuspiciousStewEffects> MushroomCow.getEffectsFromItemStack
(ItemStack pStack) abstract boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)private boolean
Panda.isFoodOrCake
(ItemStack pStack) static void
Bucketable.saveDefaultDataToBucketTag
(Mob pMob, ItemStack pBucket) Deprecated.void
AbstractFish.saveToBucketTag
(ItemStack pStack) void
Bucketable.saveToBucketTag
(ItemStack pStack) void
TropicalFish.saveToBucketTag
(ItemStack pStack) private void
Fox.spitOutItem
(ItemStack pStack) protected void
Animal.usePlayerItem
(Player pPlayer, InteractionHand pHand, ItemStack pStack) protected void
Cat.usePlayerItem
(Player pPlayer, InteractionHand pHand, ItemStack pStack) protected void
Fox.usePlayerItem
(Player pPlayer, InteractionHand pHand, ItemStack pStack) Constructor parameters in net.minecraft.world.entity.animal with type arguments of type ItemStackModifierConstructorDescriptionCatTemptGoal
(Cat pCat, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) OcelotTemptGoal
(Ocelot pOcelot, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) -
Uses of ItemStack in net.minecraft.world.entity.animal.allay
Methods in net.minecraft.world.entity.animal.allay with parameters of type ItemStackModifier and TypeMethodDescriptionprivate boolean
Allay.allayConsidersItemEqual
(ItemStack pFirst, ItemStack pSecond) boolean
Allay.canTakeItem
(ItemStack pItemstack) boolean
Allay.equipmentHasChanged
(ItemStack pOldItem, ItemStack pNewItem) private boolean
Allay.hasNonMatchingPotion
(ItemStack pFirst, ItemStack pSecond) private boolean
Allay.isDuplicationItem
(ItemStack pStack) private void
Allay.removeInteractionItem
(Player pPlayer, ItemStack pStack) boolean
Allay.wantsToPickUp
(ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.entity.animal.armadillo
Methods in net.minecraft.world.entity.animal.armadillo that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.armadillo with parameters of type ItemStackModifier and TypeMethodDescriptionArmadillo.getEatingSound
(ItemStack pStack) boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
Uses of ItemStack in net.minecraft.world.entity.animal.axolotl
Methods in net.minecraft.world.entity.animal.axolotl that return ItemStackMethods in net.minecraft.world.entity.animal.axolotl that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.axolotl with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)void
Axolotl.saveToBucketTag
(ItemStack pStack) protected void
Axolotl.usePlayerItem
(Player pPlayer, InteractionHand pHand, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.entity.animal.camel
Methods in net.minecraft.world.entity.animal.camel that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.camel with parameters of type ItemStackModifier and TypeMethodDescriptionprotected boolean
Camel.handleEating
(Player pPlayer, ItemStack pStack) boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
Uses of ItemStack in net.minecraft.world.entity.animal.frog
Methods in net.minecraft.world.entity.animal.frog that return ItemStackMethods in net.minecraft.world.entity.animal.frog that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.frog with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)private boolean
void
Tadpole.saveToBucketTag
(ItemStack pStack) private void
Tadpole.usePlayerItem
(Player pPlayer, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.entity.animal.goat
Methods in net.minecraft.world.entity.animal.goat that return ItemStackMethods in net.minecraft.world.entity.animal.goat that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.goat with parameters of type ItemStackModifier and TypeMethodDescriptionGoat.getEatingSound
(ItemStack pStack) boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
Uses of ItemStack in net.minecraft.world.entity.animal.horse
Methods in net.minecraft.world.entity.animal.horse with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
AbstractHorse.equipBodyArmor
(Player pPlayer, ItemStack pStack) private void
AbstractChestedHorse.equipChest
(Player pPlayer, ItemStack pChestStack) void
AbstractHorse.equipSaddle
(ItemStack pStack, SoundSource pSoundSource) private static DyeColor
Llama.getDyeColor
(ItemStack pStack) protected boolean
AbstractHorse.handleEating
(Player pPlayer, ItemStack pStack) protected boolean
Llama.handleEating
(Player pPlayer, ItemStack pStack) boolean
Horse.isBodyArmorItem
(ItemStack pStack) boolean
Llama.isBodyArmorItem
(ItemStack pStack) boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
Uses of ItemStack in net.minecraft.world.entity.animal.sniffer
Methods in net.minecraft.world.entity.animal.sniffer that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.sniffer with parameters of type ItemStackModifier and TypeMethodDescriptionSniffer.getEatingSound
(ItemStack pStack) boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
Uses of ItemStack in net.minecraft.world.entity.boss
Methods in net.minecraft.world.entity.boss that return ItemStack -
Uses of ItemStack in net.minecraft.world.entity.boss.enderdragon
Methods in net.minecraft.world.entity.boss.enderdragon that return ItemStack -
Uses of ItemStack in net.minecraft.world.entity.decoration
Fields in net.minecraft.world.entity.decoration with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final NonNullList
<ItemStack> ArmorStand.armorItems
private static final EntityDataAccessor
<ItemStack> ItemFrame.DATA_ITEM
private final NonNullList
<ItemStack> ArmorStand.handItems
Methods in net.minecraft.world.entity.decoration that return ItemStackModifier and TypeMethodDescriptionprotected ItemStack
GlowItemFrame.getFrameItemStack()
protected ItemStack
ItemFrame.getFrameItemStack()
ItemFrame.getItem()
ArmorStand.getItemBySlot
(EquipmentSlot pSlot) ArmorStand.getPickResult()
ItemFrame.getPickResult()
LeashFenceKnotEntity.getPickResult()
Painting.getPickResult()
Methods in net.minecraft.world.entity.decoration that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.decoration with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
ArmorStand.canTakeItem
(ItemStack pItemstack) ItemFrame.getFramedMapId
(ItemStack pStack) private void
ItemFrame.onItemChanged
(ItemStack pItem) private void
ItemFrame.removeFramedMap
(ItemStack pStack) Removes the dot representing this frame's position from the map when the item frame is broken.void
void
void
ArmorStand.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) HangingEntity.spawnAtLocation
(ItemStack pStack, float pOffsetY) Drops an item at the position of the entity.private boolean
ArmorStand.swapItem
(Player pPlayer, EquipmentSlot pSlot, ItemStack pStack, InteractionHand pHand) -
Uses of ItemStack in net.minecraft.world.entity.item
Fields in net.minecraft.world.entity.item with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor
<ItemStack> ItemEntity.DATA_ITEM
Methods in net.minecraft.world.entity.item that return ItemStackMethods in net.minecraft.world.entity.item with parameters of type ItemStackModifier and TypeMethodDescriptionstatic boolean
ItemEntity.areMergable
(ItemStack pDestinationStack, ItemStack pOriginStack) private static void
ItemEntity.merge
(ItemEntity pDestinationEntity, ItemStack pDestinationStack, ItemEntity pOriginEntity, ItemStack pOriginStack) private static void
ItemEntity.merge
(ItemEntity pDestinationEntity, ItemStack pDestinationStack, ItemStack pOriginStack) static ItemStack
void
Sets the item that this entity represents.Constructors in net.minecraft.world.entity.item with parameters of type ItemStackModifierConstructorDescriptionItemEntity
(Level pLevel, double pPosX, double pPosY, double pPosZ, ItemStack pItemStack) ItemEntity
(Level pLevel, double pPosX, double pPosY, double pPosZ, ItemStack pItemStack, double pDeltaX, double pDeltaY, double pDeltaZ) -
Uses of ItemStack in net.minecraft.world.entity.monster
Methods in net.minecraft.world.entity.monster that return ItemStackModifier and TypeMethodDescriptionMonster.getProjectile
(ItemStack pShootable) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.protected ItemStack
Drowned.getSkull()
protected ItemStack
Husk.getSkull()
protected ItemStack
Zombie.getSkull()
protected ItemStack
ZombieVillager.getSkull()
protected ItemStack
ZombifiedPiglin.getSkull()
Methods in net.minecraft.world.entity.monster with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
Zombie.canHoldItem
(ItemStack pStack) protected boolean
Drowned.canReplaceCurrentItem
(ItemStack pCandidate, ItemStack pExisting) void
Strider.equipSaddle
(ItemStack pStack, SoundSource pSoundSource) protected AbstractArrow
protected AbstractArrow
protected AbstractArrow
protected AbstractArrow
Monster.getProjectile
(ItemStack pShootable) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.boolean
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)void
AbstractSkeleton.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) private boolean
boolean
Zombie.wantsToPickUp
(ItemStack pStack) boolean
ZombifiedPiglin.wantsToPickUp
(ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.entity.monster.hoglin
Methods in net.minecraft.world.entity.monster.hoglin with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.monster.piglin
Methods in net.minecraft.world.entity.monster.piglin that return ItemStackModifier and TypeMethodDescriptionprotected ItemStack
Piglin.addToInventory
(ItemStack pStack) private ItemStack
Piglin.createSpawnWeapon()
private static ItemStack
PiglinAi.removeOneItemFromItemEntity
(ItemEntity pItemEntity) Methods in net.minecraft.world.entity.monster.piglin that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.monster.piglin with parameters of type ItemStackModifier and TypeMethodDescriptionprotected ItemStack
Piglin.addToInventory
(ItemStack pStack) protected boolean
Piglin.canAddToInventory
(ItemStack pStack) protected static boolean
protected boolean
Piglin.canReplaceCurrentItem
(ItemStack pCandidate) protected boolean
Piglin.canReplaceCurrentItem
(ItemStack pCandidate, ItemStack pExisting) protected void
Piglin.holdInMainHand
(ItemStack pStack) private static void
PiglinAi.holdInOffhand
(Piglin pPiglin, ItemStack pStack) protected void
Piglin.holdInOffHand
(ItemStack pStack) private static boolean
PiglinAi.isBarterCurrency
(ItemStack pStack) private static boolean
protected static boolean
PiglinAi.isLovedItem
(ItemStack p_149966_) private void
Piglin.maybeWearArmor
(EquipmentSlot pSlot, ItemStack pStack, RandomSource pRandom) private static void
PiglinAi.putInInventory
(Piglin pPiglin, ItemStack pStack) protected static boolean
PiglinAi.wantsToPickup
(Piglin pPiglin, ItemStack pStack) boolean
Piglin.wantsToPickUp
(ItemStack pStack) boolean
PiglinBrute.wantsToPickUp
(ItemStack pStack) Method parameters in net.minecraft.world.entity.monster.piglin with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate static void
PiglinAi.throwItems
(Piglin pPilgin, List<ItemStack> pStacks) private static void
PiglinAi.throwItemsTowardPlayer
(Piglin pPiglin, Player pPlayer, List<ItemStack> pStacks) private static void
PiglinAi.throwItemsTowardPos
(Piglin pPiglin, List<ItemStack> pStacks, Vec3 pPos) private static void
PiglinAi.throwItemsTowardRandomPos
(Piglin pPiglin, List<ItemStack> pStacks) -
Uses of ItemStack in net.minecraft.world.entity.npc
Fields in net.minecraft.world.entity.npc declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
VillagerTrades.EnchantedItemForEmeralds.itemStack
private final ItemStack
VillagerTrades.ItemsForEmeralds.itemStack
private final ItemStack
VillagerTrades.ItemsAndEmeraldsToItems.toItem
private final ItemStack
VillagerTrades.TippedArrowForItemsAndEmeralds.toItem
An ItemStack that can have potion effects written to it.Methods in net.minecraft.world.entity.npc that return ItemStackMethods in net.minecraft.world.entity.npc with parameters of type ItemStackModifier and TypeMethodDescriptionprotected SoundEvent
WanderingTrader.getDrinkingSound
(ItemStack pStack) void
AbstractVillager.notifyTradeUpdated
(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.void
ClientSideMerchant.notifyTradeUpdated
(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.boolean
Villager.wantsToPickUp
(ItemStack pStack) Constructors in net.minecraft.world.entity.npc with parameters of type ItemStackModifierConstructorDescriptionItemsAndEmeraldsToItems
(ItemCost pFromItem, int pEmeraldCost, ItemStack pToItem, int pMaxUses, int pVillagerXp, float pPriceMultiplier, Optional<ResourceKey<EnchantmentProvider>> pEnchantmentProvider) private
ItemsAndEmeraldsToItems
(ItemLike pFromItem, int pFromItemCount, int pEmeraldCost, ItemStack pToItem, int pToItemCount, int pMaxUses, int pVillagerXp, float pPriceMultiplier) ItemsForEmeralds
(ItemStack pItemStack, int pEmeraldCost, int pNumberOfItems, int pMaxUses, int pVillagerXp) ItemsForEmeralds
(ItemStack pItemStack, int pEmeraldCost, int pNumberOfItems, int pMaxUses, int pVillagerXp, float pPriceMultiplier) ItemsForEmeralds
(ItemStack pItemStack, int pEmeraldCost, int pNumberOfItems, int pMaxUses, int pVillagerXp, float pPriceMultiplier, Optional<ResourceKey<EnchantmentProvider>> pEnchantmentProvider) -
Uses of ItemStack in net.minecraft.world.entity.player
Fields in net.minecraft.world.entity.player declared as ItemStackFields in net.minecraft.world.entity.player with type parameters of type ItemStackModifier and TypeFieldDescriptionfinal NonNullList
<ItemStack> Inventory.armor
private final List
<NonNullList<ItemStack>> Inventory.compartments
final NonNullList
<ItemStack> Inventory.items
final NonNullList
<ItemStack> Inventory.offhand
Methods in net.minecraft.world.entity.player that return ItemStackModifier and TypeMethodDescriptionPlayer.eat
(Level pLevel, ItemStack pFood, FoodProperties pFoodProperties) static ItemStack
StackedContents.fromStackingIndex
(int pStackingIndex) Inventory.getArmor
(int pSlot) Inventory.getItem
(int pIndex) Returns the stack in the given slot.Player.getItemBySlot
(EquipmentSlot pSlot1) Player.getProjectile
(ItemStack pShootable) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.Inventory.getSelected()
Player.getWeaponItem()
Inventory.removeFromSelected
(boolean pRemoveStack) Inventory.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.Inventory.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.Methods in net.minecraft.world.entity.player that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
StackedContents.accountSimpleStack
(ItemStack pStack) void
StackedContents.accountStack
(ItemStack pStack) void
StackedContents.accountStack
(ItemStack pStack, int pAmount) boolean
Adds the stack to the specified slot in the player's inventory.boolean
Adds the stack to the first empty slot in the player's inventory.boolean
private int
Inventory.addResource
(int pSlot, ItemStack pStack) private int
Inventory.addResource
(ItemStack pStack) This function stores as many items of an ItemStack as possible in a matching slot and returns the quantity of left over items.boolean
Player.canTakeItem
(ItemStack pItemstack) boolean
Returnstrue
if the specifiedItemStack
exists in the inventory.Drops an item into the world.Creates and drops the provided item.Player.eat
(Level pLevel, ItemStack pFood, FoodProperties pFoodProperties) int
Inventory.findSlotMatchingItem
(ItemStack pStack) Finds the stack or an equivalent one in the main inventoryint
Inventory.findSlotMatchingUnusedItem
(ItemStack pStack) Player.getProjectile
(ItemStack pShootable) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.int
Inventory.getSlotWithRemainingSpace
(ItemStack pStack) Stores a stack in the player's inventory.static int
StackedContents.getStackingIndex
(ItemStack pStack) private boolean
Inventory.hasRemainingSpaceForItem
(ItemStack pDestination, ItemStack pOrigin) boolean
Player.mayUseItemAt
(BlockPos pPos, Direction pFacing, ItemStack pStack) Returns whether this player can modify the block at a certain location with the given stack.void
Player.onEnchantmentPerformed
(ItemStack pEnchantedItem, int pLevelCost) void
Player.openItemGui
(ItemStack pStack, InteractionHand pHand) void
Inventory.placeItemBackInInventory
(ItemStack pStack) void
Inventory.placeItemBackInInventory
(ItemStack pStack, boolean pSendPacket) void
Inventory.removeItem
(ItemStack pStack) void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Player.setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) void
Inventory.setPickedItem
(ItemStack pStack) void
Player.startAutoSpinAttack
(int pTicks, float pDamage, ItemStack pItemStack) Starts the attack used by the Riptide enchantment.void
Player.updateTutorialInventoryAction
(ItemStack pCarried, ItemStack pClicked, ClickAction pAction) Method parameters in net.minecraft.world.entity.player with type arguments of type ItemStackModifier and TypeMethodDescriptionint
Inventory.clearOrCountMatchingItems
(Predicate<ItemStack> pStackPredicate, int pMaxCount, Container pInventory) boolean
void
Player.triggerRecipeCrafted
(RecipeHolder<?> pRecipe, List<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.entity.projectile
Fields in net.minecraft.world.entity.projectile declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
AbstractArrow.firedFromWeapon
private ItemStack
AbstractArrow.pickupItemStack
Fields in net.minecraft.world.entity.projectile with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor
<ItemStack> FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM
private static final EntityDataAccessor
<ItemStack> EyeOfEnder.DATA_ITEM_STACK
private static final EntityDataAccessor
<ItemStack> Fireball.DATA_ITEM_STACK
private static final EntityDataAccessor
<ItemStack> ThrowableItemProjectile.DATA_ITEM_STACK
Methods in net.minecraft.world.entity.projectile that return ItemStackModifier and TypeMethodDescriptionprivate ItemStack
EyeOfEnder.getDefaultItem()
private ItemStack
Fireball.getDefaultItem()
private static ItemStack
FireworkRocketEntity.getDefaultItem()
protected abstract ItemStack
AbstractArrow.getDefaultPickupItem()
protected ItemStack
Arrow.getDefaultPickupItem()
protected ItemStack
SpectralArrow.getDefaultPickupItem()
protected ItemStack
ThrownTrident.getDefaultPickupItem()
EyeOfEnder.getItem()
Fireball.getItem()
FireworkRocketEntity.getItem()
ItemSupplier.getItem()
ThrowableItemProjectile.getItem()
protected ItemStack
AbstractArrow.getPickupItem()
AbstractArrow.getPickupItemStackOrigin()
AbstractArrow.getWeaponItem()
ThrownTrident.getWeaponItem()
Methods in net.minecraft.world.entity.projectile with parameters of type ItemStackModifier and TypeMethodDescriptionprivate byte
ThrownTrident.getLoyaltyFromItem
(ItemStack pStack) static AbstractArrow
ProjectileUtil.getMobArrow
(LivingEntity pShooter, ItemStack pArrow, float pVelocity, ItemStack pWeapon) protected void
AbstractArrow.hitBlockEnchantmentEffects
(ServerLevel pLevel, BlockHitResult pHitResult, ItemStack pStack) protected void
ThrownTrident.hitBlockEnchantmentEffects
(ServerLevel pLevel, BlockHitResult pHitResult, ItemStack pStack) int
void
void
void
protected void
AbstractArrow.setPickupItemStack
(ItemStack p_331486_) protected void
Arrow.setPickupItemStack
(ItemStack pPickupItemStack) Constructors in net.minecraft.world.entity.projectile with parameters of type ItemStackModifierConstructorDescriptionprotected
AbstractArrow
(EntityType<? extends AbstractArrow> pEntityType, double pX, double pY, double pZ, Level pLevel, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) protected
AbstractArrow
(EntityType<? extends AbstractArrow> pEntityType, LivingEntity pOwner, Level pLevel, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) Arrow
(Level pLevel, double pX, double pY, double pZ, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) Arrow
(Level pLevel, LivingEntity pOwner, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) FireworkRocketEntity
(Level pLevel, double pX, double pY, double pZ, ItemStack pStack) FireworkRocketEntity
(Level pLevel, Entity pShooter, double pX, double pY, double pZ, ItemStack pStack) FireworkRocketEntity
(Level pLevel, ItemStack pStack, double pX, double pY, double pZ, boolean pShotAtAngle) FireworkRocketEntity
(Level pLevel, ItemStack pStack, Entity pShooter, double pX, double pY, double pZ, boolean pShotAtAngle) FireworkRocketEntity
(Level pLevel, ItemStack pStack, LivingEntity pShooter) SpectralArrow
(Level pLevel, double pX, double pY, double pZ, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) SpectralArrow
(Level pLevel, LivingEntity pOwner, ItemStack pPickupItemStack, ItemStack pFiredFromWeapon) ThrownTrident
(Level pLevel, double pX, double pY, double pZ, ItemStack pPickupItemStack) ThrownTrident
(Level pLevel, LivingEntity pShooter, ItemStack pPickupItemStack) -
Uses of ItemStack in net.minecraft.world.entity.projectile.windcharge
Methods in net.minecraft.world.entity.projectile.windcharge that return ItemStack -
Uses of ItemStack in net.minecraft.world.entity.raid
Methods in net.minecraft.world.entity.raid that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
Raid.getLeaderBannerInstance
(HolderGetter<BannerPattern> pPatternRegistry) -
Uses of ItemStack in net.minecraft.world.entity.vehicle
Fields in net.minecraft.world.entity.vehicle with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate NonNullList
<ItemStack> AbstractMinecartContainer.itemStacks
private NonNullList
<ItemStack> ChestBoat.itemStacks
Methods in net.minecraft.world.entity.vehicle that return ItemStackModifier and TypeMethodDescriptiondefault ItemStack
ContainerEntity.getChestVehicleItem
(int pSlot) AbstractMinecartContainer.getItem
(int pIndex) Returns the stack in the given slot.ChestBoat.getItem
(int pSlot) Returns the stack in the given slot.AbstractMinecart.getPickResult()
Boat.getPickResult()
default ItemStack
ContainerEntity.removeChestVehicleItem
(int pSlot, int pAmount) default ItemStack
ContainerEntity.removeChestVehicleItemNoUpdate
(int pSlot) AbstractMinecartContainer.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.ChestBoat.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.AbstractMinecartContainer.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.ChestBoat.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.Methods in net.minecraft.world.entity.vehicle that return types with arguments of type ItemStackModifier and TypeMethodDescriptionAbstractMinecartContainer.getItemStacks()
ChestBoat.getItemStacks()
ContainerEntity.getItemStacks()
Methods in net.minecraft.world.entity.vehicle with parameters of type ItemStackModifier and TypeMethodDescriptionstatic AbstractMinecart
AbstractMinecart.createMinecart
(ServerLevel pLevel, double pX, double pY, double pZ, AbstractMinecart.Type pType, ItemStack pStack, Player pPlayer) default void
ContainerEntity.setChestVehicleItem
(int pSlot, ItemStack pStack) void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). -
Uses of ItemStack in net.minecraft.world.food
Fields in net.minecraft.world.food with type parameters of type ItemStackModifier and TypeFieldDescriptionFoodProperties.Builder.usingConvertsTo
FoodProperties.usingConvertsTo
The field for theusingConvertsTo
record component.Methods in net.minecraft.world.food that return types with arguments of type ItemStackModifier and TypeMethodDescriptionFoodProperties.usingConvertsTo()
Returns the value of theusingConvertsTo
record component.Constructor parameters in net.minecraft.world.food with type arguments of type ItemStackModifierConstructorDescriptionFoodProperties
(int nutrition, float saturation, boolean canAlwaysEat, float eatSeconds, Optional<ItemStack> usingConvertsTo, List<FoodProperties.PossibleEffect> effects) Creates an instance of aFoodProperties
record class. -
Uses of ItemStack in net.minecraft.world.inventory
Fields in net.minecraft.world.inventory declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
AbstractContainerMenu.carried
private ItemStack
StonecutterMenu.input
The ItemStack set in the input slot by the player.private ItemStack
AbstractContainerMenu.remoteCarried
Fields in net.minecraft.world.inventory with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final NonNullList
<ItemStack> TransientCraftingContainer.items
private final NonNullList
<ItemStack> MerchantContainer.itemStacks
private final NonNullList
<ItemStack> ResultContainer.itemStacks
private final NonNullList
<ItemStack> AbstractContainerMenu.lastSlots
ItemCombinerMenuSlotDefinition.SlotDefinition.mayPlace
The field for themayPlace
record component.private final NonNullList
<ItemStack> AbstractContainerMenu.remoteSlots
Methods in net.minecraft.world.inventory that return ItemStackModifier and TypeMethodDescriptionprivate ItemStack
GrindstoneMenu.computeResult
(ItemStack pInputItem, ItemStack pAdditionalItem) LecternMenu.getBook()
AbstractContainerMenu.getCarried()
MerchantContainer.getItem
(int pIndex) Returns the stack in the given slot.ResultContainer.getItem
(int pIndex) Returns the stack in the given slot.Slot.getItem()
TransientCraftingContainer.getItem
(int pSlot) Returns the stack in the given slot.private ItemStack
GrindstoneMenu.mergeItems
(ItemStack pInputItem, ItemStack pAdditionalItem) abstract ItemStack
AbstractContainerMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.AbstractFurnaceMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.BeaconMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.BrewingStandMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.CartographyTableMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.ChestMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.CrafterMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.CraftingMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.DispenserMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.EnchantmentMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.GrindstoneMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.HopperMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.HorseInventoryMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.InventoryMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.ItemCombinerMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.LecternMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.LoomMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.MerchantMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.ShulkerBoxMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.StonecutterMenu.quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.FurnaceResultSlot.remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.MerchantResultSlot.remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.NonInteractiveResultSlot.remove
(int p_307370_) ResultSlot.remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.Slot.remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.MerchantContainer.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.ResultContainer.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.TransientCraftingContainer.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.MerchantContainer.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.ResultContainer.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.TransientCraftingContainer.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.private ItemStack
GrindstoneMenu.removeNonCursesFrom
(ItemStack pItem) NonInteractiveResultSlot.safeInsert
(ItemStack p_307685_) NonInteractiveResultSlot.safeInsert
(ItemStack p_307656_, int p_307278_) Slot.safeInsert
(ItemStack pStack) Slot.safeInsert
(ItemStack pStack, int pIncrement) Methods in net.minecraft.world.inventory that return types with arguments of type ItemStackModifier and TypeMethodDescriptionAbstractContainerMenu.getItems()
CraftingContainer.getItems()
TransientCraftingContainer.getItems()
SmithingMenu.getRelevantItems()
ItemCombinerMenuSlotDefinition.SlotDefinition.mayPlace()
Returns the value of themayPlace
record component.Methods in net.minecraft.world.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionstatic boolean
AbstractContainerMenu.canItemQuickReplace
(Slot pSlot, ItemStack pStack, boolean pStackSizeMatters) Checks if it's possible to add the given itemstack to the given slot.protected boolean
ItemCombinerMenu.canMoveIntoInputSlots
(ItemStack pStack) boolean
SmithingMenu.canMoveIntoInputSlots
(ItemStack pStack) protected boolean
boolean
AbstractContainerMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
CartographyTableMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
CraftingMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
InventoryMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
MerchantMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
SmithingMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.boolean
StonecutterMenu.canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected void
FurnaceResultSlot.checkTakeAchievements
(ItemStack pStack) protected void
MerchantResultSlot.checkTakeAchievements
(ItemStack pStack) protected void
ResultSlot.checkTakeAchievements
(ItemStack pStack) protected void
Slot.checkTakeAchievements
(ItemStack pStack) private ItemStack
GrindstoneMenu.computeResult
(ItemStack pInputItem, ItemStack pAdditionalItem) private static OptionalInt
SmithingMenu.findSlotMatchingIngredient
(SmithingRecipe pRecipe, ItemStack pStack) private OptionalInt
SmithingMenu.findSlotToQuickMoveTo
(ItemStack pStack) private List
<EnchantmentInstance> EnchantmentMenu.getEnchantmentList
(RegistryAccess pRegistryAccess, ItemStack pStack, int pSlot, int pCost) int
FurnaceFuelSlot.getMaxStackSize
(ItemStack pStack) int
Slot.getMaxStackSize
(ItemStack pStack) static int
AbstractContainerMenu.getQuickCraftPlaceCount
(Set<Slot> pSlots, int pType, ItemStack pStack) private List
<Holder<BannerPattern>> LoomMenu.getSelectablePatterns
(ItemStack pStack) int
ItemCombinerMenu.getSlotToQuickMoveTo
(ItemStack pStack) int
SmithingMenu.getSlotToQuickMoveTo
(ItemStack pStack) void
AbstractContainerMenu.initializeContents
(int pStateId, List<ItemStack> pItems, ItemStack pCarried) static boolean
protected boolean
boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.static boolean
BrewingStandMenu.FuelSlot.mayPlaceItem
(ItemStack pItemStack) Returnstrue
if the givenItemStack
is usable as fuel in the brewing stand.static boolean
BrewingStandMenu.PotionSlot.mayPlaceItem
(PotionBrewing potionBrewing, ItemStack p_39134_) static boolean
BrewingStandMenu.PotionSlot.mayPlaceItem
(ItemStack pStack) Deprecated.private void
GrindstoneMenu.mergeEnchantsFrom
(ItemStack pInputItem, ItemStack pAdditionalItem) private ItemStack
GrindstoneMenu.mergeItems
(ItemStack pInputItem, ItemStack pAdditionalItem) protected boolean
AbstractContainerMenu.moveItemStackTo
(ItemStack pStack, int pStartIndex, int pEndIndex, boolean pReverseDirection) Merges provided ItemStack with the first available one in the container/player inventor between minIndex (included) and maxIndex (excluded).protected void
FurnaceResultSlot.onQuickCraft
(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item)
.protected void
MerchantResultSlot.onQuickCraft
(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item)
.void
NonInteractiveResultSlot.onQuickCraft
(ItemStack p_307668_, ItemStack p_307399_) protected void
ResultSlot.onQuickCraft
(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item)
.protected void
Slot.onQuickCraft
(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item)
.void
Slot.onQuickCraft
(ItemStack pOldStack, ItemStack pNewStack) if par2 has more items than par1, onCrafting(item,countIncrease) is calledprotected void
void
void
protected abstract void
void
void
void
void
protected void
private ItemStack
GrindstoneMenu.removeNonCursesFrom
(ItemStack pItem) NonInteractiveResultSlot.safeInsert
(ItemStack p_307685_) NonInteractiveResultSlot.safeInsert
(ItemStack p_307656_, int p_307278_) Slot.safeInsert
(ItemStack pStack) Slot.safeInsert
(ItemStack pStack, int pIncrement) void
ContainerSynchronizer.sendCarriedChange
(AbstractContainerMenu pContainerMenu, ItemStack pStack) void
ContainerSynchronizer.sendInitialData
(AbstractContainerMenu pContainer, NonNullList<ItemStack> pItems, ItemStack pCarriedItem, int[] pInitialData) void
ContainerSynchronizer.sendSlotChange
(AbstractContainerMenu pContainer, int pSlot, ItemStack pItemStack) void
Helper method to put a stack in the slot.void
ArmorSlot.setByPlayer
(ItemStack pNewStack, ItemStack pOldStack) void
Slot.setByPlayer
(ItemStack pStack) void
Slot.setByPlayer
(ItemStack pNewStack, ItemStack pOldStack) void
AbstractContainerMenu.setCarried
(ItemStack pStack) void
Puts an ItemStack in a slot.void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
AbstractContainerMenu.setRemoteCarried
(ItemStack pRemoteCarried) void
AbstractContainerMenu.setRemoteSlot
(int pSlot, ItemStack pStack) void
AbstractContainerMenu.setRemoteSlotNoCopy
(int pSlot, ItemStack pStack) private void
StonecutterMenu.setupRecipeList
(Container pContainer, ItemStack pStack) private void
CartographyTableMenu.setupResultSlot
(ItemStack pMap, ItemStack pFirstSlotStack, ItemStack pResultOutput) void
ContainerListener.slotChanged
(AbstractContainerMenu pContainerToSend, int pDataSlotIndex, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.void
CrafterMenu.slotChanged
(AbstractContainerMenu pContainerToSend, int pDataSlotIndex, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.private void
AbstractContainerMenu.synchronizeSlotToRemote
(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private void
AbstractContainerMenu.triggerSlotListeners
(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private boolean
AbstractContainerMenu.tryItemClickBehaviourOverride
(Player pPlayer, ClickAction pAction, Slot pSlot, ItemStack pClickedItem, ItemStack pCarriedItem) Method parameters in net.minecraft.world.inventory with type arguments of type ItemStackModifier and TypeMethodDescriptiondefault void
RecipeCraftingHolder.awardUsedRecipes
(Player pPlayer, List<ItemStack> pItems) void
AbstractContainerMenu.initializeContents
(int pStateId, List<ItemStack> pItems, ItemStack pCarried) void
ContainerSynchronizer.sendInitialData
(AbstractContainerMenu pContainer, NonNullList<ItemStack> pItems, ItemStack pCarriedItem, int[] pInitialData) private void
AbstractContainerMenu.synchronizeSlotToRemote
(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private void
AbstractContainerMenu.triggerSlotListeners
(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) ItemCombinerMenuSlotDefinition.Builder.withSlot
(int pSlotIndex, int pX, int pY, Predicate<ItemStack> pMayPlace) Constructor parameters in net.minecraft.world.inventory with type arguments of type ItemStackModifierConstructorDescriptionSlotDefinition
(int slotIndex, int x, int y, Predicate<ItemStack> mayPlace) Creates an instance of aSlotDefinition
record class.TransientCraftingContainer
(AbstractContainerMenu pMenu, int pWidth, int pHeight, NonNullList<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.item
Fields in net.minecraft.world.item declared as ItemStackModifier and TypeFieldDescriptionstatic final ItemStack
ItemStack.EMPTY
private ItemStack
CreativeModeTab.iconItemStack
Fields in net.minecraft.world.item with type parameters of type ItemStackModifier and TypeFieldDescriptionProjectileWeaponItem.ARROW_ONLY
ProjectileWeaponItem.ARROW_OR_FIREWORK
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.CODEC
private Collection
<ItemStack> CreativeModeTab.displayItems
CreativeModeTab.displayItemsSearchTab
CreativeModeTab.Builder.iconGenerator
CreativeModeTab.iconGenerator
static final StreamCodec
<RegistryFriendlyByteBuf, List<ItemStack>> ItemStack.LIST_STREAM_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.OPTIONAL_CODEC
static final StreamCodec
<RegistryFriendlyByteBuf, List<ItemStack>> ItemStack.OPTIONAL_LIST_STREAM_CODEC
static final StreamCodec
<RegistryFriendlyByteBuf, ItemStack> ItemStack.OPTIONAL_STREAM_CODEC
CreativeModeTab.ItemDisplayBuilder.searchTabContents
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.SIMPLE_ITEM_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.SINGLE_ITEM_CODEC
static final StreamCodec
<RegistryFriendlyByteBuf, ItemStack> ItemStack.STREAM_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.STRICT_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.STRICT_SINGLE_ITEM_CODEC
final Collection
<ItemStack> CreativeModeTab.ItemDisplayBuilder.tabContents
static final it.unimi.dsi.fastutil.Hash.Strategy
<? super ItemStack> ItemStackLinkedSet.TYPE_AND_TAG
Methods in net.minecraft.world.item that return ItemStackModifier and TypeMethodDescriptionItemStack.consumeAndReturn
(int pAmount, LivingEntity pEntity) ItemStack.copy()
ItemStack.copyAndClear()
ItemStack.copyWithCount
(int pCount) static ItemStack
InstrumentItem.create
(Item pItem, Holder<Instrument> pInstrument) static ItemStack
MapItem.create
(Level pLevel, int pLevelX, int pLevelZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking) static ItemStack
ItemUtils.createFilledResult
(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack) static ItemStack
ItemUtils.createFilledResult
(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack, boolean pPreventDuplicates) static ItemStack
EnchantedBookItem.createForEnchantment
(EnchantmentInstance pInstance) Returns the ItemStack of an enchanted version of this item.ChorusFruitItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).HoneyBottleItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).Item.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity) Called when the player finishes using this Item (E.g. finishes eating.).ItemStack.finishUsingItem
(Level pLevel, LivingEntity pLivingEntity) Called when the item in use count reach 0, e.g. item food eaten.MilkBucketItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).OminousBottleItem.finishUsingItem
(ItemStack p_338871_, Level p_338693_, LivingEntity p_338370_) PotionItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).SpyglassItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity) Called when the player finishes using this Item (E.g. finishes eating.).SuspiciousStewItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).ProjectileWeaponItem.getDefaultCreativeAmmo
(Player player, ItemStack projectileWeaponItem) Neo: Controls what ammo ItemStack that Creative Mode should return if the player has no valid ammo in inventory.Item.getDefaultInstance()
PotionItem.getDefaultInstance()
TippedArrowItem.getDefaultInstance()
static ItemStack
BucketItem.getEmptySuccessItem
(ItemStack pBucketStack, Player pPlayer) static ItemStack
ProjectileWeaponItem.getHeldProjectile
(LivingEntity pShooter, Predicate<ItemStack> pIsAmmo) CreativeModeTab.getIconItem()
ItemStack.hurtAndConvertOnBreak
(int pAmount, ItemLike pItem, LivingEntity pEntity, EquipmentSlot pSlot) static ItemStack
ItemStack.parseOptional
(HolderLookup.Provider pLookupProvider, CompoundTag pTag) ItemStack.split
(int pAmount) Splits off a stack of the given amount of this stack and reduces this stack by the amount.ItemStack.transmuteCopy
(ItemLike pItem) ItemStack.transmuteCopy
(ItemLike pItem, int pCount) private ItemStack
ItemStack.transmuteCopyIgnoreEmpty
(ItemLike pItem, int pCount) protected ItemStack
BottleItem.turnBottleIntoItem
(ItemStack pBottleStack, Player pPlayer, ItemStack pFilledBottleStack) protected static ItemStack
ProjectileWeaponItem.useAmmo
(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter, boolean pIntangable) Methods in net.minecraft.world.item that return types with arguments of type ItemStackModifier and TypeMethodDescriptionItemStackLinkedSet.createTypeAndComponentsSet()
ProjectileWeaponItem.draw
(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter) BowItem.getAllSupportedProjectiles()
CrossbowItem.getAllSupportedProjectiles()
ProjectileWeaponItem.getAllSupportedProjectiles()
Deprecated.Use ItemStack sensitive versionProjectileWeaponItem.getAllSupportedProjectiles(ItemStack)
ProjectileWeaponItem.getAllSupportedProjectiles
(ItemStack stack) Override this method if the allowed projectile is weapon stack dependent.CreativeModeTab.getDisplayItems()
CreativeModeTab.getSearchTabDisplayItems()
CrossbowItem.getSupportedHeldProjectiles()
ProjectileWeaponItem.getSupportedHeldProjectiles()
Deprecated.Use ItemStack sensitive versionProjectileWeaponItem.getSupportedHeldProjectiles(ItemStack)
ProjectileWeaponItem.getSupportedHeldProjectiles
(ItemStack stack) Override this method if the weapon stack allows special projectile that would only be used if it's in hand.static com.mojang.serialization.MapCodec
<ItemStack> ItemStack.lenientOptionalFieldOf
(String p_338501_) ItemStack.parse
(HolderLookup.Provider pLookupProvider, Tag pTag) static InteractionResultHolder
<ItemStack> ItemUtils.startUsingInstantly
(Level pLevel, Player pPlayer, InteractionHand pHand) default InteractionResultHolder
<ItemStack> Equipable.swapWithEquipmentSlot
(Item pItem, Level pLevel, Player pPlayer, InteractionHand pHand) ArmorItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.BoatItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.BottleItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.BowItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.BucketItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.BundleItem.use
(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior.CrossbowItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.EggItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.ElytraItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.EmptyMapItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.EnderEyeItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.EnderpearlItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.ExperienceBottleItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.FireworkRocketItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.FishingRodItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.FoodOnAStickItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.HoneyBottleItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.InstrumentItem.use
(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior.Item.use
(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior.ItemStack.use
(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called when theItemStack
is equipped and right-clicked.KnowledgeBookItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.LingeringPotionItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.MilkBucketItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.OminousBottleItem.use
(Level p_338229_, Player p_338350_, InteractionHand p_338729_) PlaceOnWaterBlockItem.use
(Level p_220231_, Player p_220232_, InteractionHand p_220233_) PotionItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.ShieldItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.SnowballItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.SpawnEggItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.SplashPotionItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.SpyglassItem.use
(Level pLevel, Player pPlayer, InteractionHand pUsedHand) Called to trigger the item's "innate" right click behavior.ThrowablePotionItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.TridentItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.WindChargeItem.use
(Level p_326306_, Player p_326042_, InteractionHand p_326470_) WritableBookItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.WrittenBookItem.use
(Level pLevel, Player pPlayer, InteractionHand pHand) Called to trigger the item's "innate" right click behavior.ItemStack.validatedStreamCodec
(StreamCodec<RegistryFriendlyByteBuf, ItemStack> pCodec) private static com.mojang.serialization.DataResult
<ItemStack> ItemStack.validateStrict
(ItemStack p_340966_) Methods in net.minecraft.world.item with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
CreativeModeTab.ItemDisplayBuilder.accept
(ItemStack pStack, CreativeModeTab.TabVisibility pTabVisibility) default void
void
CreativeModeTab.Output.accept
(ItemStack pStack, CreativeModeTab.TabVisibility pTabVisibility) void
AirItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
BannerItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
BannerPatternItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
BlockItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
BundleItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
CrossbowItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
DiscFragmentItem.appendHoverText
(ItemStack p_220031_, Item.TooltipContext p_339652_, List<Component> p_220033_, TooltipFlag p_220034_) void
FireworkRocketItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
FireworkStarItem.appendHoverText
(ItemStack p_41252_, Item.TooltipContext p_339685_, List<Component> p_41254_, TooltipFlag p_41255_) void
HangingEntityItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
InstrumentItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
Item.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
LingeringPotionItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
MapItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
MobBucketItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
OminousBottleItem.appendHoverText
(ItemStack p_338470_, Item.TooltipContext p_339656_, List<Component> p_338463_, TooltipFlag p_338317_) void
PotionItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
ShieldItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
SmithingTemplateItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
SuspiciousStewItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
TippedArrowItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
WrittenBookItem.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) static void
BannerItem.appendHoverTextFromBannerBlockEntityTag
(ItemStack pStack, List<Component> pTooltipComponents) static boolean
BoneMealItem.applyBonemeal
(ItemStack p_40628_, Level p_40629_, BlockPos p_40630_, Player player) ArrowItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) EggItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) ExperienceBottleItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) FireChargeItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) FireworkRocketItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) ProjectileItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) SnowballItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) SpectralArrowItem.asProjectile
(Level p_338332_, Position p_338313_, ItemStack p_338304_, Direction p_338842_) ThrowablePotionItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) TridentItem.asProjectile
(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) WindChargeItem.asProjectile
(Level p_338589_, Position p_338670_, ItemStack p_338308_, Direction p_338206_) boolean
ElytraItem.canElytraFly
(ItemStack stack, LivingEntity entity) boolean
AxeItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
BrushItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
FireChargeItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
FishingRodItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
FlintAndSteelItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
HoeItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
PickaxeItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
ShearsItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
ShieldItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
ShovelItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
SwordItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
TridentItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) void
BucketItem.checkExtraContent
(Player pPlayer, Level pLevel, ItemStack pContainerStack, BlockPos pPos) default void
DispensibleContainerItem.checkExtraContent
(Player pPlayer, Level pLevel, ItemStack pContainerStack, BlockPos pPos) void
MobBucketItem.checkExtraContent
(Player pPlayer, Level pLevel, ItemStack pContainerStack, BlockPos pPos) boolean
ArrowItem.createArrow
(Level pLevel, ItemStack pAmmo, LivingEntity pShooter, ItemStack pWeapon) SpectralArrowItem.createArrow
(Level p_43237_, ItemStack p_43238_, LivingEntity p_43239_, ItemStack p_345773_) static ItemStack
ItemUtils.createFilledResult
(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack) static ItemStack
ItemUtils.createFilledResult
(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack, boolean pPreventDuplicates) protected Projectile
CrossbowItem.createProjectile
(Level pLevel, LivingEntity pShooter, ItemStack pWeapon, ItemStack pAmmo, boolean pIsCrit) protected Projectile
ProjectileWeaponItem.createProjectile
(Level pLevel, LivingEntity pShooter, ItemStack pWeapon, ItemStack pAmmo, boolean pIsCrit) ProjectileWeaponItem.customArrow
(AbstractArrow arrow, ItemStack projectileStack, ItemStack weaponStack) static boolean
ArmorItem.dispenseArmor
(BlockSource pBlockSource, ItemStack pArmorItem) ProjectileWeaponItem.draw
(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter) private static boolean
BundleItem.dropContents
(ItemStack pStack, Player pPlayer) boolean
ElytraItem.elytraFlightTick
(ItemStack stack, LivingEntity entity, int flightTicks) boolean
BucketItem.emptyContents
(Player pPlayer, Level pLevel, BlockPos pPos, BlockHitResult pResult, ItemStack container) ChorusFruitItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).HoneyBottleItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).Item.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity) Called when the player finishes using this Item (E.g. finishes eating.).MilkBucketItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).OminousBottleItem.finishUsingItem
(ItemStack p_338871_, Level p_338693_, LivingEntity p_338370_) PotionItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).SpyglassItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity) Called when the player finishes using this Item (E.g. finishes eating.).SuspiciousStewItem.finishUsingItem
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving) Called when the player finishes using this Item (E.g. finishes eating.).static Optional
<Holder<JukeboxSong>> JukeboxSong.fromStack
(HolderLookup.Provider pRegistries, ItemStack pStack) static Equipable
ProjectileWeaponItem.getAllSupportedProjectiles
(ItemStack stack) Override this method if the allowed projectile is weapon stack dependent.int
BundleItem.getBarColor
(ItemStack pStack) int
Item.getBarColor
(ItemStack pStack) int
BundleItem.getBarWidth
(ItemStack pStack) int
Item.getBarWidth
(ItemStack pStack) private Boat
static int
CrossbowItem.getChargeDuration
(ItemStack pStack, LivingEntity pShooter) (package private) CrossbowItem.ChargingSounds
CrossbowItem.getChargingSounds
(ItemStack pStack) static DyeColor
protected MapItemSavedData
MapItem.getCustomMapData
(ItemStack p_42854_, Level p_42855_) ProjectileWeaponItem.getDefaultCreativeAmmo
(Player player, ItemStack projectileWeaponItem) Neo: Controls what ammo ItemStack that Creative Mode should return if the player has no valid ammo in inventory.CompassItem.getDescriptionId
(ItemStack pStack) Returns the unlocalized name of this item.Item.getDescriptionId
(ItemStack pStack) Returns the unlocalized name of this item.PotionItem.getDescriptionId
(ItemStack pStack) Returns the unlocalized name of this item.ShieldItem.getDescriptionId
(ItemStack pStack) Returns the unlocalized name of this item.TippedArrowItem.getDescriptionId
(ItemStack pStack) Returns the unlocalized name of this item.float
Item.getDestroySpeed
(ItemStack pStack, BlockState pState) protected int
CrossbowItem.getDurabilityUse
(ItemStack pStack) protected int
ProjectileWeaponItem.getDurabilityUse
(ItemStack pStack) static ItemStack
BucketItem.getEmptySuccessItem
(ItemStack pBucketStack, Player pPlayer) static float
BundleItem.getFullnessDisplay
(ItemStack pStack) private Optional
<Holder<Instrument>> InstrumentItem.getInstrument
(ItemStack pStack) Gets the title name of the bookprivate static float
CrossbowItem.getPowerForTime
(int pTimeLeft, ItemStack pStack, LivingEntity pShooter) static MapItemSavedData
MapItem.getSavedData
(ItemStack pStack, Level pLevel) ProjectileWeaponItem.getSupportedHeldProjectiles
(ItemStack stack) Override this method if the weapon stack allows special projectile that would only be used if it's in hand.BundleItem.getTooltipImage
(ItemStack pStack) Item.getTooltipImage
(ItemStack pStack) EntityType
<?> Packet
<?> ComplexItem.getUpdatePacket
(ItemStack pStack, Level pLevel, Player pPlayer) Packet
<?> MapItem.getUpdatePacket
(ItemStack pStack, Level pLevel, Player pPlayer) BowItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.BrushItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.CrossbowItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.HoneyBottleItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.InstrumentItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.Item.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.MilkBucketItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.OminousBottleItem.getUseAnimation
(ItemStack p_338722_) PotionItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.ShieldItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.SpyglassItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.TridentItem.getUseAnimation
(ItemStack pStack) Returns the action that specifies what animation to play when the item is being used.int
BowItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
BrushItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
CrossbowItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
EnderEyeItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
HoneyBottleItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
InstrumentItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
Item.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
MilkBucketItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
OminousBottleItem.getUseDuration
(ItemStack p_338822_, LivingEntity p_345182_) int
PotionItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
ShieldItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
SpyglassItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) int
TridentItem.getUseDuration
(ItemStack pStack, LivingEntity pEntity) static boolean
Deprecated.static boolean
BoneMealItem.growWaterPlant
(ItemStack pStack, Level pLevel, BlockPos pPos, Direction pClickedSide) private boolean
DebugStickItem.handleInteraction
(Player pPlayer, BlockState pStateClicked, LevelAccessor pAccessor, BlockPos pPos, boolean pShouldCycleState, ItemStack pDebugStack) static int
ItemStack.hashItemAndComponents
(ItemStack pStack) boolean
DiggerItem.hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.boolean
Item.hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.boolean
MaceItem.hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.boolean
SwordItem.hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.boolean
TridentItem.hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) Current implementations of this method in child classes do not use the entry argument beside ev.DyeItem.interactLivingEntity
(ItemStack pStack, Player pPlayer, LivingEntity pTarget, InteractionHand pHand) Try interacting with given entity.Item.interactLivingEntity
(ItemStack pStack, Player pPlayer, LivingEntity pInteractionTarget, InteractionHand pUsedHand) Try interacting with given entity.NameTagItem.interactLivingEntity
(ItemStack pStack, Player pPlayer, LivingEntity pTarget, InteractionHand pHand) Try interacting with given entity.SaddleItem.interactLivingEntity
(ItemStack pStack, Player pPlayer, LivingEntity pTarget, InteractionHand pHand) Try interacting with given entity.ShearsItem.interactLivingEntity
(ItemStack stack, Player player, LivingEntity entity, InteractionHand hand) Neo: Migrate shear behavior intoShearsItem.interactLivingEntity(net.minecraft.world.item.ItemStack, net.minecraft.world.entity.player.Player, net.minecraft.world.entity.LivingEntity, net.minecraft.world.InteractionHand)
to call into IShearable instead of relying onMob.mobInteract(net.minecraft.world.entity.player.Player, net.minecraft.world.InteractionHand)
void
CompassItem.inventoryTick
(ItemStack pStack, Level pLevel, Entity pEntity, int pItemSlot, boolean pIsSelected) Called each tick as long the item is in a player's inventory.void
Item.inventoryTick
(ItemStack pStack, Level pLevel, Entity pEntity, int pSlotId, boolean pIsSelected) Called each tick as long the item is in a player's inventory.void
MapItem.inventoryTick
(ItemStack pStack, Level pLevel, Entity pEntity, int pItemSlot, boolean pIsSelected) Called each tick as long the item is in a player's inventory.boolean
BundleItem.isBarVisible
(ItemStack pStack) boolean
Item.isBarVisible
(ItemStack pStack) static boolean
boolean
Item.isCorrectToolForDrops
(ItemStack pStack, BlockState pState) boolean
AnimalArmorItem.isEnchantable
(ItemStack pStack) Checks isDamagable and if it cannot be stackedboolean
BookItem.isEnchantable
(ItemStack pStack) Checks isDamagable and if it cannot be stackedboolean
EnchantedBookItem.isEnchantable
(ItemStack pStack) Checks isDamagable and if it cannot be stackedboolean
Item.isEnchantable
(ItemStack pStack) Checks isDamagable and if it cannot be stackedstatic boolean
ElytraItem.isFlyEnabled
(ItemStack pElytraStack) boolean
Returnstrue
if this item has an enchantment glint.boolean
Returnstrue
if this item has an enchantment glint.boolean
ArrowItem.isInfinite
(ItemStack ammo, ItemStack bow, LivingEntity livingEntity) Called to determine if this arrow will be infinite when fired.boolean
Item.isRepairable
(ItemStack stack) static boolean
ItemStack.isSameItem
(ItemStack pStack, ItemStack pOther) static boolean
ItemStack.isSameItemSameComponents
(ItemStack pStack, ItemStack pOther) private static boolean
TridentItem.isTooDamagedToUse
(ItemStack pStack) boolean
ArmorItem.isValidRepairItem
(ItemStack pToRepair, ItemStack pRepair) Return whether this item is repairable in an anvil.boolean
ElytraItem.isValidRepairItem
(ItemStack pToRepair, ItemStack pRepair) Return whether this item is repairable in an anvil.boolean
Item.isValidRepairItem
(ItemStack pStack, ItemStack pRepairCandidate) Return whether this item is repairable in an anvil.boolean
MaceItem.isValidRepairItem
(ItemStack pStack, ItemStack pRepairCandidate) Return whether this item is repairable in an anvil.boolean
ShieldItem.isValidRepairItem
(ItemStack pToRepair, ItemStack pRepair) Return whether this item is repairable in an anvil.boolean
TieredItem.isValidRepairItem
(ItemStack pToRepair, ItemStack pRepair) Return whether this item is repairable in an anvil.static void
static boolean
Compares bothItemStacks
, returnstrue
if bothItemStacks
are equal.protected boolean
HangingEntityItem.mayPlace
(Player pPlayer, Direction pDirection, ItemStack pHangingEntityStack, BlockPos pPos) protected boolean
boolean
Item.mineBlock
(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pMiningEntity) Called when aBlock
is destroyed using this Item.boolean
ShearsItem.mineBlock
(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pEntityLiving) Called when aBlock
is destroyed using this Item.void
Item.onCraftedBy
(ItemStack pStack, Level pLevel, Player pPlayer) Called when item is crafted/smelted.void
Item.onCraftedPostProcess
(ItemStack pStack, Level pLevel) void
MapItem.onCraftedPostProcess
(ItemStack pStack, Level pLevel) void
BrushItem.onUseTick
(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pRemainingUseDuration) Called as the item is being used by an entity.void
CrossbowItem.onUseTick
(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pCount) Called as the item is being used by an entity.void
Item.onUseTick
(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pRemainingUseDuration) Called as the item is being used by an entity.boolean
BundleItem.overrideOtherStackedOnMe
(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) boolean
Item.overrideOtherStackedOnMe
(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) boolean
ItemStack.overrideOtherStackedOnMe
(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) boolean
BundleItem.overrideStackedOnOther
(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) boolean
Item.overrideStackedOnOther
(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) void
CrossbowItem.performShooting
(Level pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, float pVelocity, float pInaccuracy, LivingEntity pTarget) void
DiggerItem.postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
Item.postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
MaceItem.postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
SwordItem.postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
TridentItem.postHurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) void
BowItem.releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving, int pTimeLeft) Called when the player stops using an Item (stops holding the right mouse button).void
CrossbowItem.releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving, int pTimeLeft) Called when the player stops using an Item (stops holding the right mouse button).void
Item.releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity, int pTimeCharged) Called when the player stops using an Item (stops holding the right mouse button).void
SpyglassItem.releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity, int pTimeCharged) Called when the player stops using an Item (stops holding the right mouse button).void
TridentItem.releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving, int pTimeLeft) Called when the player stops using an Item (stops holding the right mouse button).static void
MapItem.renderBiomePreviewMap
(ServerLevel pServerLevel, ItemStack pStack) static boolean
WrittenBookItem.resolveBookComponents
(ItemStack pBookStack, CommandSourceStack pResolvingSource, Player pResolvingPlayer) private static void
static void
BlockItem.setBlockEntityData
(ItemStack pStack, BlockEntityType<?> pBlockEntityType, CompoundTag pBlockEntityData) static void
InstrumentItem.setRandom
(ItemStack pStack, TagKey<Instrument> pInstrumentTag, RandomSource pRandom) protected void
ProjectileWeaponItem.shoot
(ServerLevel pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, List<ItemStack> pProjectileItems, float pVelocity, float pInaccuracy, boolean pIsCrit, LivingEntity pTarget) private void
MobBucketItem.spawn
(ServerLevel pServerLevel, ItemStack pBucketedMobStack, BlockPos pPos) SpawnEggItem.spawnOffspringFromSpawnEgg
(Player pPlayer, Mob pMob, EntityType<? extends Mob> pEntityType, ServerLevel pServerLevel, Vec3 pPos, ItemStack pStack) boolean
SpawnEggItem.spawnsEntity
(ItemStack pStack, EntityType<?> pEntityType) static ItemInteractionResult
JukeboxPlayable.tryInsertIntoJukebox
(Level pLevel, BlockPos pPos, ItemStack pStack, Player pPlayer) private static boolean
CrossbowItem.tryLoadProjectiles
(LivingEntity pShooter, ItemStack pCrossbowStack) protected ItemStack
BottleItem.turnBottleIntoItem
(ItemStack pBottleStack, Player pPlayer, ItemStack pFilledBottleStack) private static void
BlockItem.updateBlockEntityComponents
(Level pLevel, BlockPos pPoa, ItemStack pStack) private BlockState
BlockItem.updateBlockStateFromTag
(BlockPos pPos, Level pLevel, ItemStack pStack, BlockState pState) protected boolean
BlockItem.updateCustomBlockEntityTag
(BlockPos pPos, Level pLevel, Player pPlayer, ItemStack pStack, BlockState pState) static boolean
BlockItem.updateCustomBlockEntityTag
(Level pLevel, Player pPlayer, BlockPos pPos, ItemStack pStack) protected boolean
SignItem.updateCustomBlockEntityTag
(BlockPos pPos, Level pLevel, Player pPlayer, ItemStack pStack, BlockState pState) protected static ItemStack
ProjectileWeaponItem.useAmmo
(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter, boolean pIntangable) boolean
CrossbowItem.useOnRelease
(ItemStack pStack) If this stack's item is a crossbowboolean
Item.useOnRelease
(ItemStack pStack) If this stack's item is a crossbowprivate static com.mojang.serialization.DataResult
<ItemStack> ItemStack.validateStrict
(ItemStack p_340966_) void
Item.verifyComponentsAfterLoad
(ItemStack pStack) void
PlayerHeadItem.verifyComponentsAfterLoad
(ItemStack pStack) Method parameters in net.minecraft.world.item with type arguments of type ItemStackModifier and TypeMethodDescriptiondefault void
CreativeModeTab.Output.acceptAll
(Collection<ItemStack> pStacks) default void
CreativeModeTab.Output.acceptAll
(Collection<ItemStack> pStacks, CreativeModeTab.TabVisibility pTabVisibility) static ItemStack
ProjectileWeaponItem.getHeldProjectile
(LivingEntity pShooter, Predicate<ItemStack> pIsAmmo) static int
ItemStack.hashStackList
(List<ItemStack> pList) Deprecated.static boolean
ItemStack.listMatches
(List<ItemStack> pList, List<ItemStack> pOther) Deprecated.static void
ItemUtils.onContainerDestroyed
(ItemEntity pContainer, Iterable<ItemStack> pContents) protected void
ProjectileWeaponItem.shoot
(ServerLevel pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, List<ItemStack> pProjectileItems, float pVelocity, float pInaccuracy, boolean pIsCrit, LivingEntity pTarget) ItemStack.validatedStreamCodec
(StreamCodec<RegistryFriendlyByteBuf, ItemStack> pCodec) Constructor parameters in net.minecraft.world.item with type arguments of type ItemStackModifierConstructorDescription(package private)
CreativeModeTab
(CreativeModeTab.Row pRow, int pColumn, CreativeModeTab.Type pType, Component pDisplayName, Supplier<ItemStack> pIconGenerator, CreativeModeTab.DisplayItemsGenerator pDisplayItemGenerator, ResourceLocation scrollerSpriteLocation, boolean hasSearchBar, int searchBarWidth, ResourceLocation tabsImage, int labelColor, int slotColor, List<ResourceLocation> tabsBefore, List<ResourceLocation> tabsAfter) -
Uses of ItemStack in net.minecraft.world.item.alchemy
Methods in net.minecraft.world.item.alchemy that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
PotionContents.createItemStack
(Item pItem, Holder<Potion> pPotion) Methods in net.minecraft.world.item.alchemy with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
PotionBrewing.Builder.addRecipe
(Ingredient input, Ingredient ingredient, ItemStack output) Adds a new simple brewing recipe.boolean
PotionBrewing.hasContainerMix
(ItemStack pReagent, ItemStack pPotionItem) boolean
boolean
PotionBrewing.hasPotionMix
(ItemStack pReagent, ItemStack pPotionItem) private boolean
PotionBrewing.isContainer
(ItemStack pStack) boolean
PotionBrewing.isContainerIngredient
(ItemStack pStack) boolean
PotionBrewing.isIngredient
(ItemStack pStack) boolean
Checks if an item stack is a valid input for brewing, for use in the lower 3 slots where water bottles would normally go.boolean
PotionBrewing.isPotionIngredient
(ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.item.armortrim
Methods in net.minecraft.world.item.armortrim with parameters of type ItemStackModifier and TypeMethodDescriptionstatic Optional
<Holder.Reference<TrimMaterial>> TrimMaterials.getFromIngredient
(HolderLookup.Provider pRegustries, ItemStack pIngredient) static Optional
<Holder.Reference<TrimPattern>> TrimPatterns.getFromTemplate
(HolderLookup.Provider pRegistries, ItemStack pTemplate) -
Uses of ItemStack in net.minecraft.world.item.component
Fields in net.minecraft.world.item.component declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
ItemContainerContents.Slot.item
The field for theitem
record component.Fields in net.minecraft.world.item.component with type parameters of type ItemStackModifier and TypeFieldDescriptionBundleContents.items
BundleContents.Mutable.items
ChargedProjectiles.items
private final NonNullList
<ItemStack> ItemContainerContents.items
Methods in net.minecraft.world.item.component that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
ItemContainerContents.copyOne()
BundleContents.getItemUnsafe
(int pIndex) ItemContainerContents.getStackInSlot
(int slot) Neo: Gets a copy of the stack at a particular slot.ItemContainerContents.Slot.item()
Returns the value of theitem
record component.BundleContents.Mutable.removeOne()
Methods in net.minecraft.world.item.component that return types with arguments of type ItemStackModifier and TypeMethodDescriptionChargedProjectiles.getItems()
BundleContents.itemCopyStream()
CustomData.itemMatcher
(DataComponentType<CustomData> pComponentType, CompoundTag pTag) BundleContents.items()
BundleContents.itemsCopy()
ItemContainerContents.nonEmptyItems()
ItemContainerContents.nonEmptyItemsCopy()
ItemContainerContents.nonEmptyStream()
ItemContainerContents.stream()
Methods in net.minecraft.world.item.component with parameters of type ItemStackModifier and TypeMethodDescriptionstatic ItemStack
private int
BundleContents.Mutable.findStackIndex
(ItemStack pStack) private int
BundleContents.Mutable.getMaxAmountToAdd
(ItemStack pStack) static int
DyedItemColor.getOrDefault
(ItemStack pStack, int pDefaultValue) (package private) static org.apache.commons.lang3.math.Fraction
static ChargedProjectiles
static void
CustomData.set
(DataComponentType<CustomData> pComponentType, ItemStack pStack, CompoundTag pTag) int
static void
CustomData.update
(DataComponentType<CustomData> pComponentType, ItemStack pStack, Consumer<CompoundTag> pUpdater) Method parameters in net.minecraft.world.item.component with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate static org.apache.commons.lang3.math.Fraction
BundleContents.computeContentWeight
(List<ItemStack> p_331148_) void
ItemContainerContents.copyInto
(NonNullList<ItemStack> pList) private static int
ItemContainerContents.findLastNonEmptySlot
(List<ItemStack> pItems) static ItemContainerContents
static ChargedProjectiles
Constructors in net.minecraft.world.item.component with parameters of type ItemStackModifierConstructorDescription(package private)
Creates an instance of aSlot
record class.Constructor parameters in net.minecraft.world.item.component with type arguments of type ItemStackModifierConstructorDescriptionBundleContents
(List<ItemStack> p_331417_) (package private)
BundleContents
(List<ItemStack> p_331277_, org.apache.commons.lang3.math.Fraction p_339622_) private
ChargedProjectiles
(List<ItemStack> p_331523_) private
ItemContainerContents
(List<ItemStack> p_331046_) private
ItemContainerContents
(NonNullList<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.item.context
Fields in net.minecraft.world.item.context declared as ItemStackMethods in net.minecraft.world.item.context that return ItemStackConstructors in net.minecraft.world.item.context with parameters of type ItemStackModifierConstructorDescriptionBlockPlaceContext
(Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) BlockPlaceContext
(Level pLevel, Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) DirectionalPlaceContext
(Level pLevel, BlockPos pPos, Direction pDirection, ItemStack pItemStack, Direction pFace) UseOnContext
(Level pLevel, Player pPlayer, InteractionHand pHand, ItemStack pItemStack, BlockHitResult pHitResult) -
Uses of ItemStack in net.minecraft.world.item.crafting
Fields in net.minecraft.world.item.crafting declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
SmithingRecipeInput.addition
The field for theaddition
record component.private final ItemStack
SmithingRecipeInput.base
The field for thebase
record component.private final ItemStack
Ingredient.ItemValue.item
The field for theitem
record component.private final ItemStack
SingleRecipeInput.item
The field for theitem
record component.private ItemStack[]
Ingredient.itemStacks
protected final ItemStack
AbstractCookingRecipe.result
(package private) final ItemStack
ShapedRecipe.result
(package private) final ItemStack
ShapelessRecipe.result
protected final ItemStack
SingleItemRecipe.result
(package private) final ItemStack
SmithingTransformRecipe.result
private final ItemStack
SmithingRecipeInput.template
The field for thetemplate
record component.Fields in net.minecraft.world.item.crafting with type parameters of type ItemStackModifier and TypeFieldDescriptionCraftingInput.items
private final NonNullList
<ItemStack> RecipeCache.Entry.key
The field for thekey
record component.Methods in net.minecraft.world.item.crafting that return ItemStackModifier and TypeMethodDescriptionSmithingRecipeInput.addition()
Returns the value of theaddition
record component.AbstractCookingRecipe.assemble
(SingleRecipeInput pInput, HolderLookup.Provider pRegistries) ArmorDyeRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) BannerDuplicateRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) BookCloningRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) DecoratedPotRecipe.assemble
(CraftingInput p_345761_, HolderLookup.Provider p_335840_) FireworkRocketRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) FireworkStarFadeRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) FireworkStarRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) MapCloningRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) MapExtendingRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) Recipe.assemble
(T pInput, HolderLookup.Provider pRegistries) RepairItemRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) ShapedRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) ShapelessRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) ShieldDecorationRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) ShulkerBoxColoring.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) SingleItemRecipe.assemble
(SingleRecipeInput pInput, HolderLookup.Provider pRegistries) SmithingTransformRecipe.assemble
(SmithingRecipeInput pInput, HolderLookup.Provider pRegistries) SmithingTrimRecipe.assemble
(SmithingRecipeInput pInput, HolderLookup.Provider pRegistries) SuspiciousStewRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) TippedArrowRecipe.assemble
(CraftingInput pInput, HolderLookup.Provider pRegistries) SmithingRecipeInput.base()
Returns the value of thebase
record component.private static ItemStack
MapExtendingRecipe.findFilledMap
(CraftingInput pInput) CraftingInput.getItem
(int pIndex) CraftingInput.getItem
(int pRow, int pColumn) RecipeInput.getItem
(int pIndex) SingleRecipeInput.getItem
(int p_345528_) SmithingRecipeInput.getItem
(int p_346205_) Ingredient.getItems()
AbstractCookingRecipe.getResultItem
(HolderLookup.Provider pRegistries) CustomRecipe.getResultItem
(HolderLookup.Provider pRegistries) FireworkRocketRecipe.getResultItem
(HolderLookup.Provider pRegistries) FireworkStarRecipe.getResultItem
(HolderLookup.Provider pRegistries) Recipe.getResultItem
(HolderLookup.Provider pRegistries) ShapedRecipe.getResultItem
(HolderLookup.Provider pRegistries) ShapelessRecipe.getResultItem
(HolderLookup.Provider pRegistries) SingleItemRecipe.getResultItem
(HolderLookup.Provider pRegistries) SmithingTransformRecipe.getResultItem
(HolderLookup.Provider pRegistries) SmithingTrimRecipe.getResultItem
(HolderLookup.Provider pRegistries) BlastingRecipe.getToastSymbol()
CampfireCookingRecipe.getToastSymbol()
default ItemStack
Recipe.getToastSymbol()
SmeltingRecipe.getToastSymbol()
default ItemStack
SmithingRecipe.getToastSymbol()
SmokingRecipe.getToastSymbol()
StonecutterRecipe.getToastSymbol()
Ingredient.ItemValue.item()
Returns the value of theitem
record component.SingleRecipeInput.item()
Returns the value of theitem
record component.SmithingRecipeInput.template()
Returns the value of thetemplate
record component.Methods in net.minecraft.world.item.crafting that return types with arguments of type ItemStackModifier and TypeMethodDescriptionIngredient.ItemValue.getItems()
Ingredient.TagValue.getItems()
Ingredient.Value.getItems()
RepairItemRecipe.getItemsToCombine
(CraftingInput p_345543_) RepairItemRecipe.getItemsToCombine
(CraftingInput p_345543_) BannerDuplicateRecipe.getRemainingItems
(CraftingInput pInput) BookCloningRecipe.getRemainingItems
(CraftingInput pInput) default NonNullList
<ItemStack> Recipe.getRemainingItems
(T pInput) <I extends RecipeInput,
T extends Recipe<I>>
NonNullList<ItemStack> RecipeManager.getRemainingItemsFor
(RecipeType<T> pRecipeType, I pInput, Level pLvel) CraftingInput.items()
RecipeCache.Entry.key()
Returns the value of thekey
record component.Methods in net.minecraft.world.item.crafting with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static boolean
RepairItemRecipe.canCombine
(ItemStack pStack1, ItemStack pStack2) AbstractCookingRecipe.Factory.create
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) SimpleCookingSerializer.create
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) SingleItemRecipe.Factory.create
(String pGroup, Ingredient pIngredient, ItemStack pResult) boolean
SmithingRecipe.isAdditionIngredient
(ItemStack pStack) boolean
SmithingTransformRecipe.isAdditionIngredient
(ItemStack pStack) boolean
SmithingTrimRecipe.isAdditionIngredient
(ItemStack pStack) boolean
SmithingRecipe.isBaseIngredient
(ItemStack pStack) boolean
SmithingTransformRecipe.isBaseIngredient
(ItemStack pStack) boolean
SmithingTrimRecipe.isBaseIngredient
(ItemStack pStack) boolean
SmithingRecipe.isTemplateIngredient
(ItemStack pStack) boolean
SmithingTransformRecipe.isTemplateIngredient
(ItemStack pStack) boolean
SmithingTrimRecipe.isTemplateIngredient
(ItemStack pStack) static Ingredient
boolean
Method parameters in net.minecraft.world.item.crafting with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic CraftingInput
static Ingredient
static CraftingInput.Positioned
CraftingInput.ofPositioned
(int pWidth, int pHeight, List<ItemStack> pItems) Constructors in net.minecraft.world.item.crafting with parameters of type ItemStackModifierConstructorDescriptionAbstractCookingRecipe
(RecipeType<?> pType, String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) BlastingRecipe
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) CampfireCookingRecipe
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) Creates an instance of aItemValue
record class.ShapedRecipe
(String pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult) ShapedRecipe
(String pGroup, CraftingBookCategory pCategory, ShapedRecipePattern pPattern, ItemStack pResult, boolean pShowNotification) ShapelessRecipe
(String pGroup, CraftingBookCategory pCategory, ItemStack pResult, NonNullList<Ingredient> pIngredients) SingleItemRecipe
(RecipeType<?> pType, RecipeSerializer<?> pSerializer, String pGroup, Ingredient pIngredient, ItemStack pResult) SingleRecipeInput
(ItemStack item) Creates an instance of aSingleRecipeInput
record class.SmeltingRecipe
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) SmithingRecipeInput
(ItemStack template, ItemStack base, ItemStack addition) Creates an instance of aSmithingRecipeInput
record class.SmithingTransformRecipe
(Ingredient pTemplate, Ingredient pBase, Ingredient pAddition, ItemStack pResult) SmokingRecipe
(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) StonecutterRecipe
(String pGroup, Ingredient pIngredient, ItemStack pResult) Constructor parameters in net.minecraft.world.item.crafting with type arguments of type ItemStackModifierConstructorDescriptionprivate
CraftingInput
(int pWidth, int pHeight, List<ItemStack> pItem) (package private)
Entry
(NonNullList<ItemStack> key, int width, int height, RecipeHolder<CraftingRecipe> value) Creates an instance of aEntry
record class. -
Uses of ItemStack in net.minecraft.world.item.enchantment
Fields in net.minecraft.world.item.enchantment declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
EnchantedItemInUse.itemStack
The field for theitemStack
record component.Methods in net.minecraft.world.item.enchantment that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
EnchantmentHelper.enchantItem
(RandomSource pRandom, ItemStack pStack, int pLevel, Stream<Holder<Enchantment>> pPossibleEnchantments) static ItemStack
EnchantmentHelper.enchantItem
(RandomSource pRandom, ItemStack pStack, int pLevel, RegistryAccess pRegistryAccess, Optional<? extends HolderSet<Enchantment>> pPossibleEnchantments) EnchantedItemInUse.itemStack()
Returns the value of theitemStack
record component.Methods in net.minecraft.world.item.enchantment that return types with arguments of type ItemStackModifier and TypeMethodDescriptionEnchantment.getSlotItems
(LivingEntity pEntity) Creates a new map containing all items equipped by an entity ininvalid reference
slots that the enchantment cares about
Methods in net.minecraft.world.item.enchantment with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
Enchantment.canEnchant
(ItemStack pStack) Deprecated.static boolean
EnchantmentHelper.canStoreEnchantments
(ItemStack pStack) static void
EnchantmentHelper.doPostAttackEffectsWithItemSource
(ServerLevel pLevel, Entity pEntity, DamageSource pDamageSource, ItemStack pItemSource) static ItemStack
EnchantmentHelper.enchantItem
(RandomSource pRandom, ItemStack pStack, int pLevel, Stream<Holder<Enchantment>> pPossibleEnchantments) static ItemStack
EnchantmentHelper.enchantItem
(RandomSource pRandom, ItemStack pStack, int pLevel, RegistryAccess pRegistryAccess, Optional<? extends HolderSet<Enchantment>> pPossibleEnchantments) static void
EnchantmentHelper.enchantItemFromProvider
(ItemStack pStack, RegistryAccess pRegistries, ResourceKey<EnchantmentProvider> pKey, DifficultyInstance pDifficulty, RandomSource pRandom) static void
EnchantmentHelper.forEachModifier
(ItemStack pStack, EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) static void
EnchantmentHelper.forEachModifier
(ItemStack pStack, EquipmentSlot pSlot, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) static List
<EnchantmentInstance> EnchantmentHelper.getAvailableEnchantmentResults
(int pLevel, ItemStack pStack, Stream<Holder<Enchantment>> pPossibleEnchantments) static DataComponentType
<ItemEnchantments> EnchantmentHelper.getComponentType
(ItemStack pStack) static int
EnchantmentHelper.getEnchantmentCost
(RandomSource pRandom, int pEnchantNum, int pPower, ItemStack pStack) Returns the enchantability of itemstack, using a separate calculation for each enchantNum (0, 1 or 2), cutting to the max enchantability power of the table, which is locked to a max of 15.static ItemEnchantments
EnchantmentHelper.getEnchantmentsForCrafting
(ItemStack pStack) static int
EnchantmentHelper.getFishingLuckBonus
(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static float
EnchantmentHelper.getFishingTimeReduction
(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static <T> com.mojang.datafixers.util.Pair
<T, Integer> EnchantmentHelper.getHighestLevel
(ItemStack p_346269_, DataComponentType<T> p_345899_) static int
EnchantmentHelper.getItemEnchantmentLevel
(Holder<Enchantment> pEnchantment, ItemStack pStack) Deprecated.Neo: UseEnchantmentHelper.getTagEnchantmentLevel(Holder, ItemStack)
for NBT enchantments, orIItemStackExtension.getEnchantmentLevel(Holder)
for gameplay.static int
EnchantmentHelper.getPiercingCount
(ServerLevel pLevel, ItemStack pFiredFromWeapon, ItemStack pPickupItemStack) static int
EnchantmentHelper.getTagEnchantmentLevel
(Holder<Enchantment> p_346179_, ItemStack p_44845_) Gets the level of an enchantment from NBT.static int
EnchantmentHelper.getTridentReturnToOwnerAcceleration
(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static float
EnchantmentHelper.getTridentSpinAttackStrength
(ItemStack pStack, LivingEntity pEntity) static boolean
EnchantmentHelper.has
(ItemStack pStack, DataComponentType<?> pComponentType) static boolean
EnchantmentHelper.hasAnyEnchantments
(ItemStack pStack) static boolean
EnchantmentHelper.hasTag
(ItemStack pStack, TagKey<Enchantment> pTag) boolean
Enchantment.isPrimaryItem
(ItemStack pStack) Deprecated.Neo: UseIItemStackExtension.isPrimaryItemFor(Holder)
This method does not respectIItemStackExtension.supportsEnchantment(Holder)
since theHolder
is not available, which makes the result of calling it invalid.boolean
Enchantment.isSupportedItem
(ItemStack pItem) Deprecated.static LootContext
Enchantment.itemContext
(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool) void
Enchantment.modifyAmmoCount
(ServerLevel p_346007_, int p_345438_, ItemStack p_345581_, org.apache.commons.lang3.mutable.MutableFloat p_345594_) static float
EnchantmentHelper.modifyArmorEffectiveness
(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pArmorEffectiveness) void
Enchantment.modifyArmorEffectivness
(ServerLevel p_345449_, int p_346129_, ItemStack p_345436_, Entity p_345815_, DamageSource p_346172_, org.apache.commons.lang3.mutable.MutableFloat p_345265_) void
Enchantment.modifyBlockExperience
(ServerLevel p_344830_, int p_345513_, ItemStack p_344939_, org.apache.commons.lang3.mutable.MutableFloat p_344754_) static float
EnchantmentHelper.modifyCrossbowChargingTime
(ItemStack pStack, LivingEntity pEntity, float pCrossbowChargingTime) void
Enchantment.modifyDamage
(ServerLevel p_345743_, int p_345544_, ItemStack p_345269_, Entity p_346011_, DamageSource p_344755_, org.apache.commons.lang3.mutable.MutableFloat p_345551_) static float
EnchantmentHelper.modifyDamage
(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pDamage) void
Enchantment.modifyDamageFilteredValue
(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> p_345367_, ServerLevel p_345784_, int p_344796_, ItemStack p_345410_, Entity p_345673_, DamageSource p_345768_, org.apache.commons.lang3.mutable.MutableFloat p_345664_) void
Enchantment.modifyDamageProtection
(ServerLevel p_345336_, int p_345347_, ItemStack p_346270_, Entity p_346395_, DamageSource p_345595_, org.apache.commons.lang3.mutable.MutableFloat p_345579_) void
Enchantment.modifyDurabilityChange
(ServerLevel p_345412_, int p_344937_, ItemStack p_345854_, org.apache.commons.lang3.mutable.MutableFloat p_345948_) void
Enchantment.modifyDurabilityToRepairFromXp
(ServerLevel p_346275_, int p_346253_, ItemStack p_346008_, org.apache.commons.lang3.mutable.MutableFloat p_344922_) static int
EnchantmentHelper.modifyDurabilityToRepairFromXp
(ServerLevel pLevel, ItemStack pStack, int pDuabilityToRepairFromXp) void
Enchantment.modifyEntityFilteredValue
(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> p_345986_, ServerLevel p_345473_, int p_345352_, ItemStack p_345076_, Entity p_345170_, org.apache.commons.lang3.mutable.MutableFloat p_345910_) void
Enchantment.modifyFallBasedDamage
(ServerLevel p_345164_, int p_344793_, ItemStack p_345159_, Entity p_345653_, DamageSource p_344870_, org.apache.commons.lang3.mutable.MutableFloat p_346329_) static float
EnchantmentHelper.modifyFallBasedDamage
(ServerLevel pLevel, ItemStack pTool, Entity pEnity, DamageSource pDamageSource, float pFallBasedDamage) void
Enchantment.modifyFishingLuckBonus
(ServerLevel p_344932_, int p_346280_, ItemStack p_344733_, Entity p_346035_, org.apache.commons.lang3.mutable.MutableFloat p_345897_) void
Enchantment.modifyFishingTimeReduction
(ServerLevel p_344910_, int p_345466_, ItemStack p_345847_, Entity p_346092_, org.apache.commons.lang3.mutable.MutableFloat p_346295_) void
Enchantment.modifyItemFilteredCount
(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> p_345794_, ServerLevel p_345992_, int p_345038_, ItemStack p_345886_, org.apache.commons.lang3.mutable.MutableFloat p_345188_) void
Enchantment.modifyKnockback
(ServerLevel p_346266_, int p_344905_, ItemStack p_345602_, Entity p_346190_, DamageSource p_345911_, org.apache.commons.lang3.mutable.MutableFloat p_345127_) static float
EnchantmentHelper.modifyKnockback
(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pKnockback) void
Enchantment.modifyMobExperience
(ServerLevel p_346393_, int p_345762_, ItemStack p_345945_, Entity p_345849_, org.apache.commons.lang3.mutable.MutableFloat p_345252_) void
Enchantment.modifyPiercingCount
(ServerLevel p_346422_, int p_344854_, ItemStack p_345503_, org.apache.commons.lang3.mutable.MutableFloat p_345370_) void
Enchantment.modifyProjectileCount
(ServerLevel p_345353_, int p_344837_, ItemStack p_346382_, Entity p_345611_, org.apache.commons.lang3.mutable.MutableFloat p_344765_) void
Enchantment.modifyProjectileSpread
(ServerLevel p_346170_, int p_345846_, ItemStack p_346147_, Entity p_345832_, org.apache.commons.lang3.mutable.MutableFloat p_345361_) void
Enchantment.modifyTridentReturnToOwnerAcceleration
(ServerLevel p_345534_, int p_345845_, ItemStack p_345558_, Entity p_345333_, org.apache.commons.lang3.mutable.MutableFloat p_344912_) static void
EnchantmentHelper.onHitBlock
(ServerLevel pLevel, ItemStack pStack, LivingEntity pOwner, Entity pEntity, EquipmentSlot pSlot, Vec3 pPos, BlockState pState, Consumer<Item> pOnBreak) static void
EnchantmentHelper.onProjectileSpawned
(ServerLevel pLevel, ItemStack pFiredFromWeapon, AbstractArrow pArrow, Consumer<Item> pOnBreak) static <T> Optional
<T> EnchantmentHelper.pickHighestLevel
(ItemStack pStack, DataComponentType<List<T>> pComponentType) static int
EnchantmentHelper.processAmmoUse
(ServerLevel pLevel, ItemStack pWeapon, ItemStack pAmmo, int pCount) static int
EnchantmentHelper.processBlockExperience
(ServerLevel pLevel, ItemStack pStack, int pExperience) static int
EnchantmentHelper.processDurabilityChange
(ServerLevel pLevel, ItemStack pStack, int pDamage) static int
EnchantmentHelper.processProjectileCount
(ServerLevel pLevel, ItemStack pTool, Entity pEntity, int pProjectileCount) static float
EnchantmentHelper.processProjectileSpread
(ServerLevel pLevel, ItemStack pTool, Entity pEntity, float pProjectileSpread) static void
EnchantmentHelper.runIterationOnItem
(ItemStack pStack, EquipmentSlot pSlot, LivingEntity pEntity, EnchantmentHelper.EnchantmentInSlotVisitor pVisitor) static void
EnchantmentHelper.runIterationOnItem
(ItemStack pStack, EnchantmentHelper.EnchantmentVisitor pVisitor) static void
EnchantmentHelper.runLocationChangedEffects
(ServerLevel pLevel, ItemStack pStack, LivingEntity pEntity, EquipmentSlot pSlot) static List
<EnchantmentInstance> EnchantmentHelper.selectEnchantment
(RandomSource pRandom, ItemStack pStack, int pLevel, Stream<Holder<Enchantment>> pPossibleEnchantments) static void
EnchantmentHelper.setEnchantments
(ItemStack pStack, ItemEnchantments pEnchantments) static void
EnchantmentHelper.stopLocationBasedEffects
(ItemStack pStack, LivingEntity pEntity, EquipmentSlot pSlot) static ItemEnchantments
EnchantmentHelper.updateEnchantments
(ItemStack pStack, Consumer<ItemEnchantments.Mutable> pUpdater) Method parameters in net.minecraft.world.item.enchantment with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic Optional
<EnchantedItemInUse> EnchantmentHelper.getRandomItemWith
(DataComponentType<?> pComponentType, LivingEntity pEntity, Predicate<ItemStack> pFilter) Constructors in net.minecraft.world.item.enchantment with parameters of type ItemStackModifierConstructorDescriptionEnchantedItemInUse
(ItemStack p_344800_, EquipmentSlot p_344722_, LivingEntity p_345536_) EnchantedItemInUse
(ItemStack itemStack, EquipmentSlot inSlot, LivingEntity owner, Consumer<Item> onBreak) Creates an instance of aEnchantedItemInUse
record class. -
Uses of ItemStack in net.minecraft.world.item.enchantment.providers
Methods in net.minecraft.world.item.enchantment.providers with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
EnchantmentProvider.enchant
(ItemStack pStack, ItemEnchantments.Mutable pEnchantments, RandomSource pRandom, DifficultyInstance pDifficulty) void
EnchantmentsByCost.enchant
(ItemStack pStack, ItemEnchantments.Mutable pEnchantments, RandomSource pRandom, DifficultyInstance pDifficulty) void
EnchantmentsByCostWithDifficulty.enchant
(ItemStack pStack, ItemEnchantments.Mutable pEnchantments, RandomSource pRandom, DifficultyInstance pDifficulty) void
SingleEnchantment.enchant
(ItemStack pStack, ItemEnchantments.Mutable pEnchantments, RandomSource pRandom, DifficultyInstance pDifficulty) -
Uses of ItemStack in net.minecraft.world.item.trading
Fields in net.minecraft.world.item.trading declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
ItemCost.itemStack
The field for theitemStack
record component.private final ItemStack
MerchantOffer.result
The output of this offer.Methods in net.minecraft.world.item.trading that return ItemStackModifier and TypeMethodDescriptionMerchantOffer.assemble()
private static ItemStack
ItemCost.createStack
(Holder<Item> pItem, int pCount, DataComponentPredicate pComponentPredicate) MerchantOffer.getBaseCostA()
MerchantOffer.getCostA()
MerchantOffer.getCostB()
MerchantOffer.getResult()
ItemCost.itemStack()
Returns the value of theitemStack
record component.Methods in net.minecraft.world.item.trading with parameters of type ItemStackModifier and TypeMethodDescriptionMerchantOffers.getRecipeFor
(ItemStack pStackA, ItemStack pStackB, int pIndex) void
Merchant.notifyTradeUpdated
(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.boolean
MerchantOffer.satisfiedBy
(ItemStack pPlayerOfferA, ItemStack pPlayerOfferB) boolean
boolean
Constructors in net.minecraft.world.item.trading with parameters of type ItemStackModifierConstructorDescriptionItemCost
(Holder<Item> item, int count, DataComponentPredicate components, ItemStack itemStack) Creates an instance of aItemCost
record class.private
MerchantOffer
(ItemCost p_330734_, Optional<ItemCost> p_331500_, ItemStack p_45327_, int p_45330_, int p_45331_, boolean p_330754_, int p_332006_, int p_330432_, float p_45332_, int p_330282_) MerchantOffer
(ItemCost pBaseCostA, Optional<ItemCost> pCostB, ItemStack pResult, int pMaxUses, int pXp, float pPriceMultiplier) MerchantOffer
(ItemCost pBaseCostA, Optional<ItemCost> pCostB, ItemStack pResult, int pUses, int pMaxUses, int pXp, float pPriceMultiplier) MerchantOffer
(ItemCost pBaseCostA, Optional<ItemCost> pCostB, ItemStack pResult, int pUses, int pMaxUses, int pXp, float pPriceMultiplier, int pDemand) MerchantOffer
(ItemCost pBaseCostA, ItemStack pResult, int pMaxUses, int pXp, float pPriceMultiplier) -
Uses of ItemStack in net.minecraft.world.level
Methods in net.minecraft.world.level with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static void
Explosion.addOrAppendStack
(List<com.mojang.datafixers.util.Pair<ItemStack, BlockPos>> pDrops, ItemStack pStack, BlockPos pPos) static void
Spawner.appendHoverText
(ItemStack pStack, List<Component> pTooltipLines, String pSpawnDataKey) static Component
Spawner.getSpawnEntityDisplayName
(ItemStack pStack, String pSpawnDataKey) Method parameters in net.minecraft.world.level with type arguments of type ItemStack -
Uses of ItemStack in net.minecraft.world.level.block
Methods in net.minecraft.world.level.block that return ItemStackModifier and TypeMethodDescriptionAbstractBannerBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) AttachedStemBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) BambooSaplingBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) BigDripleafStemBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) Block.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) Deprecated.CandleCakeBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) CaveVinesBlock.getCloneItemStack
(LevelReader p_304590_, BlockPos p_152967_, BlockState p_152968_) CaveVinesPlantBlock.getCloneItemStack
(LevelReader p_304444_, BlockPos p_153008_, BlockState p_153009_) CropBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) DecoratedPotBlock.getCloneItemStack
(LevelReader p_304622_, BlockPos p_294412_, BlockState p_294723_) EndGatewayBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) EndPortalBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) FlowerPotBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) FrostedIceBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) GrowingPlantBodyBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) LightBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) NetherPortalBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) NetherWartBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) ShulkerBoxBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) StemBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) SweetBerryBushBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) TallSeagrassBlock.getCloneItemStack
(LevelReader p_304988_, BlockPos p_154750_, BlockState p_154751_) static ItemStack
ShulkerBoxBlock.getColoredItemStack
(DyeColor pColor) BarrierBlock.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) BubbleColumnBlock.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) BucketPickup.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) LiquidBlock.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) PowderSnowBlock.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) default ItemStack
SimpleWaterloggedBlock.pickupBlock
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos, BlockState pState) static ItemStack
LightBlock.setLightOnStack
(ItemStack pStack, int pLight) Methods in net.minecraft.world.level.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBeehiveBlock.getDrops
(BlockState pState, LootParams.Builder pParams) Block.getDrops
(BlockState pState, ServerLevel pLevel, BlockPos pPos, BlockEntity pBlockEntity) Block.getDrops
(BlockState pState, ServerLevel pLevel, BlockPos pPos, BlockEntity pBlockEntity, Entity pEntity, ItemStack pTool) DecoratedPotBlock.getDrops
(BlockState p_287683_, LootParams.Builder p_287582_) LiquidBlock.getDrops
(BlockState pState, LootParams.Builder pParams) ShulkerBoxBlock.getDrops
(BlockState pState, LootParams.Builder pParams) Methods in net.minecraft.world.level.block with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static void
ChiseledBookShelfBlock.addBook
(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, ItemStack pBookStack, int pSlot) (package private) static BlockState
ComposterBlock.addItem
(Entity pEntity, BlockState pState, LevelAccessor pLevel, BlockPos pPos, ItemStack pStack) void
Block.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
DecoratedPotBlock.appendHoverText
(ItemStack p_285238_, Item.TooltipContext p_339662_, List<Component> p_285448_, TooltipFlag p_284997_) void
ShulkerBoxBlock.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
SpawnerBlock.appendHoverText
(ItemStack pStack, Item.TooltipContext pContext, List<Component> pTooltipComponents, TooltipFlag pTooltipFlag) void
TrialSpawnerBlock.appendHoverText
(ItemStack p_312446_, Item.TooltipContext p_339621_, List<Component> p_312088_, TooltipFlag p_311895_) boolean
ComposterBlock.EmptyContainer.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
ComposterBlock.InputContainer.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
ComposterBlock.OutputContainer.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.static boolean
WitherSkullBlock.canSpawnMob
(Level pLevel, BlockPos pPos, ItemStack pStack) boolean
ComposterBlock.EmptyContainer.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.boolean
ComposterBlock.InputContainer.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.boolean
ComposterBlock.OutputContainer.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.private void
CrafterBlock.dispenseItem
(ServerLevel pLevel, BlockPos pPos, CrafterBlockEntity pCrafter, ItemStack pStack, BlockState pState, RecipeHolder<CraftingRecipe> pRecipe) static void
Block.dropResources
(BlockState pState, Level pLevel, BlockPos pPos, BlockEntity pBlockEntity, Entity pEntity, ItemStack pTool) protected DispenseItemBehavior
DispenserBlock.getDispenseMethod
(Level pLevel, ItemStack pItem) protected DispenseItemBehavior
DropperBlock.getDispenseMethod
(Level p_341227_, ItemStack p_52947_) Block.getDrops
(BlockState pState, ServerLevel pLevel, BlockPos pPos, BlockEntity pBlockEntity, Entity pEntity, ItemStack pTool) int
DropExperienceBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) int
RedStoneOreBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) int
SculkCatalystBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) int
SculkSensorBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) int
SculkShriekerBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) int
SpawnerBlock.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) static float
static BlockState
ComposterBlock.insertItem
(Entity pEntity, BlockState pState, ServerLevel pLevel, ItemStack pStack, BlockPos pPos) private static boolean
RespawnAnchorBlock.isRespawnFuel
(ItemStack pStack) private static void
LecternBlock.placeBook
(LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) void
BeehiveBlock.playerDestroy
(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pTe, ItemStack pStack) Called after a player has successfully harvested this block.void
Block.playerDestroy
(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pBlockEntity, ItemStack pTool) Called after a player has successfully harvested this block.void
DoublePlantBlock.playerDestroy
(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pTe, ItemStack pStack) Called after a player has successfully harvested this block.void
IceBlock.playerDestroy
(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pTe, ItemStack pStack) Called after a player has successfully harvested this block.void
TurtleEggBlock.playerDestroy
(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, BlockEntity pTe, ItemStack pStack) Called after a player has successfully harvested this block.private static void
Block.popResource
(Level pLevel, Supplier<ItemEntity> pItemEntitySupplier, ItemStack pStack) static void
Block.popResource
(Level pLevel, BlockPos pPos, ItemStack pStack) Spawns the given stack into the Level at the given position, respecting the doTileDrops gamerulestatic void
Block.popResourceFromFace
(Level pLevel, BlockPos pPos, Direction pDirection, ItemStack pStack) static ItemStack
LightBlock.setLightOnStack
(ItemStack pStack, int pLight) void
BedBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
Block.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
CommandBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
CrafterBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
DiodeBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
DoorBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
DoublePlantBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
JukeboxBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
PitcherCropBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
SmallDripleafBlock.setPlacedBy
(Level p_154599_, BlockPos p_154600_, BlockState p_154601_, LivingEntity p_154602_, ItemStack p_154603_) void
StructureBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
TripWireHookBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
WitherSkullBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.void
WitherWallSkullBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by ItemBlocks after a block is set in the world, to allow post-place logicprivate boolean
CeilingHangingSignBlock.shouldTryToChainAnotherHangingSign
(Player pPlayer, BlockHitResult pHitResult, SignBlockEntity pSign, ItemStack pStack) private boolean
WallHangingSignBlock.shouldTryToChainAnotherHangingSign
(BlockState pState, Player pPlayer, BlockHitResult pHitResult, SignBlockEntity pSign, ItemStack pStack) protected void
DropExperienceBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
InfestedBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
RedStoneOreBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
SculkCatalystBlock.spawnAfterBreak
(BlockState p_222109_, ServerLevel p_222110_, BlockPos p_222111_, ItemStack p_222112_, boolean p_222113_) protected void
SculkSensorBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
SculkShriekerBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
SpawnerBlock.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishprotected void
Block.tryDropExperience
(ServerLevel pLevel, BlockPos pPos, ItemStack pHeldItem, IntProvider pAmount) static boolean
LecternBlock.tryPlaceBook
(LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) protected ItemInteractionResult
AbstractCauldronBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
BeehiveBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
CakeBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
CampfireBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
CandleBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
CandleCakeBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
CeilingHangingSignBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
ChiseledBookShelfBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
ComposterBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
DecoratedPotBlock.useItemOn
(ItemStack p_316569_, BlockState p_316562_, Level p_316177_, BlockPos p_316898_, Player p_316632_, InteractionHand p_316424_, BlockHitResult p_316345_) protected ItemInteractionResult
FenceBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
FlowerPotBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
JukeboxBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
LecternBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
NoteBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
PumpkinBlock.useItemOn
(ItemStack p_316383_, BlockState p_316676_, Level p_316272_, BlockPos p_316484_, Player p_316367_, InteractionHand p_316216_, BlockHitResult p_316827_) protected ItemInteractionResult
RedStoneOreBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
RespawnAnchorBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
SignBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
SweetBerryBushBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
TntBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) VaultBlock.useItemOn
(ItemStack p_324161_, BlockState p_323816_, Level p_324403_, BlockPos p_324623_, Player p_324219_, InteractionHand p_324416_, BlockHitResult p_324261_) protected ItemInteractionResult
WallHangingSignBlock.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) Method parameters in net.minecraft.world.level.block with type arguments of type ItemStackModifier and TypeMethodDescriptionprotected void
AbstractCandleBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
BellBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
ButtonBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
DoorBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
FenceGateBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
LeverBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
TrapDoorBlock.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) Constructors in net.minecraft.world.level.block with parameters of type ItemStackModifierConstructorDescriptionOutputContainer
(BlockState pState, LevelAccessor pLevel, BlockPos pPos, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.level.block.entity
Fields in net.minecraft.world.level.block.entity declared as ItemStackModifier and TypeFieldDescription(package private) ItemStack
LecternBlockEntity.book
private ItemStack
BrushableBlockEntity.item
private ItemStack
DecoratedPotBlockEntity.item
private ItemStack
JukeboxBlockEntity.item
Fields in net.minecraft.world.level.block.entity with type parameters of type ItemStackModifier and TypeFieldDescriptionprotected NonNullList
<ItemStack> AbstractFurnaceBlockEntity.items
private NonNullList
<ItemStack> BarrelBlockEntity.items
private NonNullList
<ItemStack> BrewingStandBlockEntity.items
The items currently placed in the slots of the brewing stand.private final NonNullList
<ItemStack> CampfireBlockEntity.items
private NonNullList
<ItemStack> ChestBlockEntity.items
private final NonNullList
<ItemStack> ChiseledBookShelfBlockEntity.items
private NonNullList
<ItemStack> CrafterBlockEntity.items
private NonNullList
<ItemStack> DispenserBlockEntity.items
private NonNullList
<ItemStack> HopperBlockEntity.items
private NonNullList
<ItemStack> ShulkerBoxBlockEntity.itemStacks
Methods in net.minecraft.world.level.block.entity that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
HopperBlockEntity.addItem
(Container pSource, Container pDestination, ItemStack pStack, Direction pDirection) Attempts to place the passed stack in the container, using as many slots as required.static ItemStack
DecoratedPotBlockEntity.createDecoratedPotItem
(PotDecorations pDecorations) LecternBlockEntity.getBook()
BannerBlockEntity.getItem()
BaseContainerBlockEntity.getItem
(int pSlot) Returns the stack in the given slot.BrushableBlockEntity.getItem()
ChiseledBookShelfBlockEntity.getItem
(int pSlot) Returns the stack in the given slot.CrafterBlockEntity.getItem
(int pIndex) RandomizableContainerBlockEntity.getItem
(int pIndex) Returns the stack in the given slot.DecoratedPotBlockEntity.getPotAsItem()
DecoratedPotBlockEntity.getTheItem()
JukeboxBlockEntity.getTheItem()
DispenserBlockEntity.insertItem
(ItemStack pStack) BaseContainerBlockEntity.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.ChiseledBookShelfBlockEntity.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.HopperBlockEntity.removeItem
(int pIndex, int pCount) RandomizableContainerBlockEntity.removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.BaseContainerBlockEntity.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.ChiseledBookShelfBlockEntity.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.RandomizableContainerBlockEntity.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.private ItemStack
LecternBlockEntity.resolveBook
(ItemStack pStack, Player pPlayer) Resolves the contents of the passed ItemStack, if it is a bookDecoratedPotBlockEntity.splitTheItem
(int pAmount) JukeboxBlockEntity.splitTheItem
(int pAmount) private static ItemStack
HopperBlockEntity.tryMoveInItem
(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) Methods in net.minecraft.world.level.block.entity that return types with arguments of type ItemStackModifier and TypeMethodDescriptionprotected NonNullList
<ItemStack> AbstractFurnaceBlockEntity.getItems()
protected NonNullList
<ItemStack> BarrelBlockEntity.getItems()
protected abstract NonNullList
<ItemStack> BaseContainerBlockEntity.getItems()
protected NonNullList
<ItemStack> BrewingStandBlockEntity.getItems()
CampfireBlockEntity.getItems()
protected NonNullList
<ItemStack> ChestBlockEntity.getItems()
CrafterBlockEntity.getItems()
protected NonNullList
<ItemStack> DispenserBlockEntity.getItems()
protected NonNullList
<ItemStack> HopperBlockEntity.getItems()
protected NonNullList
<ItemStack> ShulkerBoxBlockEntity.getItems()
Methods in net.minecraft.world.level.block.entity with parameters of type ItemStackModifier and TypeMethodDescriptionstatic ItemStack
HopperBlockEntity.addItem
(Container pSource, Container pDestination, ItemStack pStack, Direction pDirection) Attempts to place the passed stack in the container, using as many slots as required.final void
BlockEntity.applyComponentsFromItemStack
(ItemStack pStack) private static boolean
HopperBlockEntity.canMergeItems
(ItemStack pStack1, ItemStack pStack2) boolean
AbstractFurnaceBlockEntity.canPlaceItem
(int pIndex, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
BrewingStandBlockEntity.canPlaceItem
(int pIndex, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
ChiseledBookShelfBlockEntity.canPlaceItem
(int pSlot, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
CrafterBlockEntity.canPlaceItem
(int pSlot, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.boolean
JukeboxBlockEntity.canPlaceItem
(int pSlot, ItemStack pStack) Returnstrue
if automation is allowed to insert the given stack (ignoring stack size) into the given slot.private static boolean
HopperBlockEntity.canPlaceItemInContainer
(Container pContainer, ItemStack pStack, int pSlot, Direction pDirection) boolean
AbstractFurnaceBlockEntity.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
BrewingStandBlockEntity.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
ShulkerBoxBlockEntity.canPlaceItemThroughFace
(int pIndex, ItemStack pItemStack, Direction pDirection) Returnstrue
if automation can insert the given item in the given slot from the given side.boolean
ChiseledBookShelfBlockEntity.canTakeItem
(Container pTarget, int pSlot, ItemStack pStack) Returnstrue
if the given stack can be extracted into the target inventory.boolean
JukeboxBlockEntity.canTakeItem
(Container pTarget, int pSlot, ItemStack pStack) Returnstrue
if the given stack can be extracted into the target inventory.private static boolean
HopperBlockEntity.canTakeItemFromContainer
(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) boolean
AbstractFurnaceBlockEntity.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.boolean
BrewingStandBlockEntity.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.boolean
ShulkerBoxBlockEntity.canTakeItemThroughFace
(int pIndex, ItemStack pStack, Direction pDirection) Returnstrue
if automation can extract the given item in the given slot from the given side.void
protected int
AbstractFurnaceBlockEntity.getBurnDuration
(ItemStack pFuel) protected int
BlastFurnaceBlockEntity.getBurnDuration
(ItemStack pFuel) protected int
SmokerBlockEntity.getBurnDuration
(ItemStack pFuel) CampfireBlockEntity.getCookableRecipe
(ItemStack pStack) private static int
LecternBlockEntity.getPageCount
(ItemStack pStack) DispenserBlockEntity.insertItem
(ItemStack pStack) static boolean
boolean
CampfireBlockEntity.placeFood
(LivingEntity pEntity, ItemStack pFood, int pCookTime) private ItemStack
LecternBlockEntity.resolveBook
(ItemStack pStack, Player pPlayer) Resolves the contents of the passed ItemStack, if it is a bookvoid
BlockEntity.saveToItem
(ItemStack pStack, HolderLookup.Provider pRegistries) void
Sets the ItemStack in this lectern.void
Sets the ItemStack in this lectern.void
DecoratedPotBlockEntity.setFromItem
(ItemStack pItem) void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
void
void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
JukeboxBlockEntity.setSongItemWithoutPlaying
(ItemStack pStack) void
DecoratedPotBlockEntity.setTheItem
(ItemStack pItem) void
JukeboxBlockEntity.setTheItem
(ItemStack pItem) private boolean
CrafterBlockEntity.smallerStackExist
(int pCurrentSize, ItemStack pStack, int pSlot) private static ItemStack
HopperBlockEntity.tryMoveInItem
(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) Method parameters in net.minecraft.world.level.block.entity with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
AbstractFurnaceBlockEntity.awardUsedRecipes
(Player pPlayer, List<ItemStack> pItems) private static boolean
AbstractFurnaceBlockEntity.burn
(RegistryAccess pRegistryAccess, RecipeHolder<?> pRecipe, NonNullList<ItemStack> pInventory, int pMaxStackSize, AbstractFurnaceBlockEntity furnace) private static boolean
AbstractFurnaceBlockEntity.canBurn
(RegistryAccess pRegistryAccess, RecipeHolder<?> pRecipe, NonNullList<ItemStack> pInventory, int pMaxStackSize, AbstractFurnaceBlockEntity furnace) private static void
BrewingStandBlockEntity.doBrew
(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pItems) private static boolean
BrewingStandBlockEntity.isBrewable
(PotionBrewing pPotionBrewing, NonNullList<ItemStack> pItems) protected void
AbstractFurnaceBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
BarrelBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected abstract void
BaseContainerBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
BrewingStandBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
ChestBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
CrafterBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
DispenserBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
HopperBlockEntity.setItems
(NonNullList<ItemStack> pItems) protected void
ShulkerBoxBlockEntity.setItems
(NonNullList<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.level.block.entity.trialspawner
Fields in net.minecraft.world.level.block.entity.trialspawner with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate SimpleWeightedRandomList
<ItemStack> TrialSpawnerData.dispensing
Methods in net.minecraft.world.level.block.entity.trialspawner that return types with arguments of type ItemStackModifier and TypeMethodDescription(package private) SimpleWeightedRandomList
<ItemStack> TrialSpawnerData.getDispensingItems
(ServerLevel pLevel, TrialSpawnerConfig pConfig, BlockPos pPos) -
Uses of ItemStack in net.minecraft.world.level.block.entity.vault
Fields in net.minecraft.world.level.block.entity.vault declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
VaultSharedData.displayItem
private final ItemStack
VaultConfig.keyItem
The field for thekeyItem
record component.Fields in net.minecraft.world.level.block.entity.vault with type parameters of type ItemStackMethods in net.minecraft.world.level.block.entity.vault that return ItemStackModifier and TypeMethodDescriptionVaultSharedData.getDisplayItem()
(package private) ItemStack
VaultServerData.getNextItemToEject()
private static ItemStack
VaultBlockEntity.Server.getRandomDisplayItemFromLootTable
(ServerLevel pLevel, BlockPos pPos, ResourceKey<LootTable> pLootTable) VaultConfig.keyItem()
Returns the value of thekeyItem
record component.(package private) ItemStack
VaultServerData.popNextItemToEject()
Methods in net.minecraft.world.level.block.entity.vault that return types with arguments of type ItemStackModifier and TypeMethodDescriptionVaultServerData.getItemsToEject()
VaultBlockEntity.Server.resolveItemsToEject
(ServerLevel pLevel, VaultConfig pConfig, BlockPos pPos, Player pPlayer) Methods in net.minecraft.world.level.block.entity.vault with parameters of type ItemStackModifier and TypeMethodDescriptionprivate void
VaultState.ejectResultItem
(ServerLevel pLevel, BlockPos pPos, ItemStack pStack, float pEjectionProgress) private static boolean
VaultBlockEntity.Server.isValidToInsert
(VaultConfig pConfig, ItemStack pStack) void
VaultSharedData.setDisplayItem
(ItemStack pDisplayItem) static void
VaultBlockEntity.Server.tryInsertKey
(ServerLevel pLevel, BlockPos pPos, BlockState pState, VaultConfig pConfig, VaultServerData pServerData, VaultSharedData pSharedData, Player pPlayer, ItemStack pStack) Method parameters in net.minecraft.world.level.block.entity.vault with type arguments of type ItemStackModifier and TypeMethodDescription(package private) void
VaultServerData.setItemsToEject
(List<ItemStack> pItemsToEject) private static void
VaultBlockEntity.Server.unlock
(ServerLevel pLevel, BlockState pState, BlockPos pPos, VaultConfig pConfig, VaultServerData pServerData, VaultSharedData pSharedData, List<ItemStack> pItemsToEject) Constructors in net.minecraft.world.level.block.entity.vault with parameters of type ItemStackModifierConstructorDescriptionVaultConfig
(ResourceKey<LootTable> p_335999_, double p_323704_, double p_323499_, ItemStack p_323661_, Optional<ResourceKey<LootTable>> p_323481_) VaultConfig
(ResourceKey<LootTable> lootTable, double activationRange, double deactivationRange, ItemStack keyItem, Optional<ResourceKey<LootTable>> overrideLootTableToDisplay, PlayerDetector playerDetector, PlayerDetector.EntitySelector entitySelector) Creates an instance of aVaultConfig
record class.(package private)
VaultSharedData
(ItemStack p_324245_, Set<UUID> p_324007_, double p_324069_) Constructor parameters in net.minecraft.world.level.block.entity.vault with type arguments of type ItemStackModifierConstructorDescription(package private)
VaultServerData
(Set<UUID> p_324455_, long p_324396_, List<ItemStack> p_324515_, int p_324586_) -
Uses of ItemStack in net.minecraft.world.level.block.piston
Methods in net.minecraft.world.level.block.piston that return ItemStackModifier and TypeMethodDescriptionMovingPistonBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) PistonHeadBlock.getCloneItemStack
(LevelReader pLevel, BlockPos pPos, BlockState pState) Methods in net.minecraft.world.level.block.piston that return types with arguments of type ItemStackModifier and TypeMethodDescriptionMovingPistonBlock.getDrops
(BlockState pState, LootParams.Builder pParams) Methods in net.minecraft.world.level.block.piston with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
PistonBaseBlock.setPlacedBy
(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed. -
Uses of ItemStack in net.minecraft.world.level.block.state
Methods in net.minecraft.world.level.block.state that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlockBehaviour.BlockStateBase.getDrops
(LootParams.Builder pLootParams) BlockBehaviour.getDrops
(BlockState pState, LootParams.Builder pParams) Methods in net.minecraft.world.level.block.state with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
BlockBehaviour.BlockStateBase.spawnAfterBreak
(ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) protected void
BlockBehaviour.spawnAfterBreak
(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) Perform side-effects from block dropping, such as creating silverfishBlockBehaviour.BlockStateBase.useItemOn
(ItemStack pStack, Level pLevel, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) protected ItemInteractionResult
BlockBehaviour.useItemOn
(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) Method parameters in net.minecraft.world.level.block.state with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
BlockBehaviour.BlockStateBase.onExplosionHit
(Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected void
BlockBehaviour.onExplosionHit
(BlockState pState, Level pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) -
Uses of ItemStack in net.minecraft.world.level.saveddata.maps
Methods in net.minecraft.world.level.saveddata.maps that return types with arguments of type ItemStackMethods in net.minecraft.world.level.saveddata.maps with parameters of type ItemStackModifier and TypeMethodDescriptionstatic void
MapItemSavedData.addTargetDecoration
(ItemStack pStack, BlockPos pPos, String pType, Holder<MapDecorationType> pMapDecorationType) MapItemSavedData.mapMatcher
(ItemStack pStack) void
MapItemSavedData.tickCarriedBy
(Player pPlayer, ItemStack pMapStack) Adds the player passed to the list of visible players and checks to see which players are visible -
Uses of ItemStack in net.minecraft.world.level.storage.loot
Fields in net.minecraft.world.level.storage.loot with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.compositeFunction
Methods in net.minecraft.world.level.storage.loot that return types with arguments of type ItemStackModifier and TypeMethodDescriptionLootTable.createStackSplitter
(ServerLevel pLevel, Consumer<ItemStack> pOutput) ContainerComponentManipulator.getContents
(T pContents) private it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootContext p_230923_) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootParams p_287616_) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootParams p_287574_, long p_287773_) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootParams p_347545_, RandomSource p_347680_) Methods in net.minecraft.world.level.storage.loot with parameters of type ItemStackModifier and TypeMethodDescriptiondefault void
ContainerComponentManipulator.modifyItems
(ItemStack pStack, UnaryOperator<ItemStack> pModifier) default void
ContainerComponentManipulator.setContents
(ItemStack pStack, Stream<ItemStack> pItems) default void
ContainerComponentManipulator.setContents
(ItemStack pStack, T pContents, Stream<ItemStack> pItems) Method parameters in net.minecraft.world.level.storage.loot with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
void
LootContext.addDynamicDrops
(ResourceLocation pName, Consumer<ItemStack> pConsumer) Add the dynamic drops for the given dynamic drops name to the given consumer.void
LootParams.addDynamicDrops
(ResourceLocation pLocation, Consumer<ItemStack> pConsumer) private void
LootPool.addRandomItem
(Consumer<ItemStack> pStackConsumer, LootContext pContext) void
LootPool.addRandomItems
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the random items from this LootPool to the givenstackConsumer
.LootTable.createStackSplitter
(ServerLevel pLevel, Consumer<ItemStack> pOutput) void
LootTable.getRandomItems
(LootContext pContextData, Consumer<ItemStack> pOutput) Generate random items to the given Consumer, ensuring they do not exceed their maximum stack size.void
LootTable.getRandomItems
(LootParams pParams, long pSeed, Consumer<ItemStack> pOutput) void
LootTable.getRandomItems
(LootParams pParams, Consumer<ItemStack> pOutput) void
LootTable.getRandomItemsRaw
(LootContext pContext, Consumer<ItemStack> pOutput) Deprecated.void
LootTable.getRandomItemsRaw
(LootParams pParams, Consumer<ItemStack> pOutput) Deprecated.default void
ContainerComponentManipulator.modifyItems
(ItemStack pStack, UnaryOperator<ItemStack> pModifier) default void
ContainerComponentManipulator.setContents
(ItemStack pStack, Stream<ItemStack> pItems) default void
ContainerComponentManipulator.setContents
(ItemStack pStack, T pContents, Stream<ItemStack> pItems) ContainerComponentManipulator.setContents
(T pContents, Stream<ItemStack> pItems) private void
LootTable.shuffleAndSplitItems
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> p_230925_, int p_230926_, RandomSource p_230927_) -
Uses of ItemStack in net.minecraft.world.level.storage.loot.entries
Fields in net.minecraft.world.level.storage.loot.entries with type parameters of type ItemStackModifier and TypeFieldDescription(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LootPoolSingletonContainer.compositeFunction
(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LootPoolSingletonContainer.compositeFunction
Method parameters in net.minecraft.world.level.storage.loot.entries with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
DynamicLoot.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
EmptyLootItem.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
LootItem.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
LootPoolEntry.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.protected abstract void
LootPoolSingletonContainer.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
NestedLootTable.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
TagEntry.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry. -
Uses of ItemStack in net.minecraft.world.level.storage.loot.functions
Fields in net.minecraft.world.level.storage.loot.functions with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> SequenceFunction.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> SequenceFunction.compositeFunction
static final BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITY
static final BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITY
Methods in net.minecraft.world.level.storage.loot.functions that return ItemStackModifier and TypeMethodDescriptionfinal ItemStack
LootItemConditionalFunction.apply
(ItemStack pStack, LootContext pContext) SequenceFunction.apply
(ItemStack pStack, LootContext pContext) private static ItemStack
EnchantRandomlyFunction.enchantItem
(ItemStack pStack, Holder<Enchantment> pEnchantment, RandomSource pRandom) ApplyBonusCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ApplyExplosionDecay.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
CopyBlockState.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantedCountIncreaseFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantRandomlyFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantWithLevelsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ExplorationMapFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FillPlayerHead.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FilteredFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
FunctionReference.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.LimitCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected abstract ItemStack
LootItemConditionalFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetAttributesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBannerPatternFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBookCoverFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerLootTable.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomModelDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetEnchantmentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworkExplosionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworksFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetInstrumentFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemCountFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemDamageFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetOminousBottleAmplifierFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetPotionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetStewEffectFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWritableBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWrittenBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SmeltItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
ToggleTooltips.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.Methods in net.minecraft.world.level.storage.loot.functions that return types with arguments of type ItemStackModifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> pFunctions) static BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> pFunctions) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) Create a decorated Consumer.Methods in net.minecraft.world.level.storage.loot.functions with parameters of type ItemStackModifier and TypeMethodDescriptionfinal ItemStack
LootItemConditionalFunction.apply
(ItemStack pStack, LootContext pContext) SequenceFunction.apply
(ItemStack pStack, LootContext pContext) void
ToggleTooltips.ComponentToggle.applyIfPresent
(ItemStack pStack, boolean pShowTooltip) private static ItemStack
EnchantRandomlyFunction.enchantItem
(ItemStack pStack, Holder<Enchantment> pEnchantment, RandomSource pRandom) ApplyBonusCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ApplyExplosionDecay.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
CopyBlockState.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantedCountIncreaseFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantRandomlyFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantWithLevelsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ExplorationMapFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FillPlayerHead.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FilteredFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
FunctionReference.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.LimitCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected abstract ItemStack
LootItemConditionalFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetAttributesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBannerPatternFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBookCoverFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerLootTable.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomModelDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetEnchantmentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworkExplosionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworksFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetInstrumentFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemCountFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemDamageFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetOminousBottleAmplifierFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetPotionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetStewEffectFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWritableBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWrittenBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SmeltItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
ToggleTooltips.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.Method parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> pFunctions) static BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> pFunctions) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) Create a decorated Consumer.LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) Create a decorated Consumer.LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) Create a decorated Consumer. -
Uses of ItemStack in net.minecraft.world.level.storage.loot.parameters
Fields in net.minecraft.world.level.storage.loot.parameters with type parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.phys.shapes
Fields in net.minecraft.world.phys.shapes declared as ItemStackConstructors in net.minecraft.world.phys.shapes with parameters of type ItemStackModifierConstructorDescriptionprotected
EntityCollisionContext
(boolean pDescending, double pEntityBottom, ItemStack pHeldItem, Predicate<FluidState> pCanStandOnFluid, Entity pEntity) -
Uses of ItemStack in net.minecraft.world.ticks
Methods in net.minecraft.world.ticks that return ItemStackModifier and TypeMethodDescriptiondefault ItemStack
ContainerSingleItem.getItem
(int pSlot) Returns the stack in the given slot.ContainerSingleItem.getTheItem()
default ItemStack
ContainerSingleItem.removeItem
(int pSlot, int pAmount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.default ItemStack
ContainerSingleItem.removeItemNoUpdate
(int pSlot) Removes a stack from the given slot and returns it.default ItemStack
ContainerSingleItem.removeTheItem()
default ItemStack
ContainerSingleItem.splitTheItem
(int pAmount) Methods in net.minecraft.world.ticks with parameters of type ItemStackModifier and TypeMethodDescriptiondefault void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
ContainerSingleItem.setTheItem
(ItemStack pItem) -
Uses of ItemStack in net.neoforged.neoforge.capabilities
Fields in net.neoforged.neoforge.capabilities with type parameters of type ItemStackMethods in net.neoforged.neoforge.capabilities with parameters of type ItemStackMethod parameters in net.neoforged.neoforge.capabilities with type arguments of type ItemStackModifier and TypeMethodDescription<T,
C extends @Nullable Object>
voidRegisterCapabilitiesEvent.registerItem
(ItemCapability<T, C> capability, ICapabilityProvider<ItemStack, C, T> provider, ItemLike... items) Register a capability provider for some items. -
Uses of ItemStack in net.neoforged.neoforge.client
Fields in net.neoforged.neoforge.client with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final CompletableFuture
<SearchTree<ItemStack>> CreativeModeTabSearchRegistry.DEFAULT_SEARCH
private static final Map
<SessionSearchTrees.Key, CompletableFuture<SearchTree<ItemStack>>> CreativeModeTabSearchRegistry.NAME_SEARCH_TREES
private static final Map
<SessionSearchTrees.Key, CompletableFuture<SearchTree<ItemStack>>> CreativeModeTabSearchRegistry.TAG_SEARCH_TREES
Methods in net.neoforged.neoforge.client that return types with arguments of type ItemStackModifier and TypeMethodDescriptionstatic CompletableFuture
<SearchTree<ItemStack>> CreativeModeTabSearchRegistry.getNameSearchTree
(SessionSearchTrees.Key key) static CompletableFuture
<SearchTree<ItemStack>> CreativeModeTabSearchRegistry.getTagSearchTree
(SessionSearchTrees.Key key) Methods in net.neoforged.neoforge.client with parameters of type ItemStackModifier and TypeMethodDescriptionstatic List
<ClientTooltipComponent> ClientHooks.gatherTooltipComponents
(ItemStack stack, List<? extends FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) static List
<ClientTooltipComponent> ClientHooks.gatherTooltipComponents
(ItemStack stack, List<? extends FormattedText> textElements, Optional<TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) static List
<ClientTooltipComponent> ClientHooks.gatherTooltipComponentsFromElements
(ItemStack stack, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) static Model
ClientHooks.getArmorModel
(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot slot, HumanoidModel<?> _default) static ResourceLocation
ClientHooks.getArmorTexture
(Entity entity, ItemStack armor, ArmorMaterial.Layer layer, boolean innerModel, EquipmentSlot slot) static RenderType
RenderTypeHelper.getFallbackItemRenderType
(ItemStack stack, BakedModel model, boolean cull) Provides a fallbackRenderType
for the givenItemStack
in the case that none is explicitly specified.static Font
ClientHooks.getTooltipFont
(ItemStack stack, Font fallbackFont) static ItemDecoratorHandler
static RenderTooltipEvent.Color
ClientHooks.onRenderTooltipColor
(ItemStack stack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components) static RenderTooltipEvent.Pre
ClientHooks.onRenderTooltipPre
(ItemStack stack, GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<ClientTooltipComponent> components, Font fallbackFont, ClientTooltipPositioner positioner) boolean
IItemDecorator.render
(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) Is called after GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) is done rendering.void
ItemDecoratorHandler.render
(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) static boolean
ClientHooks.renderSpecificFirstPersonHand
(InteractionHand hand, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, ItemStack stack) static boolean
ClientHooks.shouldCauseReequipAnimation
(ItemStack from, ItemStack to, int slot) Method parameters in net.neoforged.neoforge.client with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic void
CreativeModeTabSearchRegistry.putNameSearchTree
(SessionSearchTrees.Key key, CompletableFuture<SearchTree<ItemStack>> future) static void
CreativeModeTabSearchRegistry.putTagSearchTree
(SessionSearchTrees.Key key, CompletableFuture<SearchTree<ItemStack>> future) -
Uses of ItemStack in net.neoforged.neoforge.client.event
Fields in net.neoforged.neoforge.client.event declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
RenderItemInFrameEvent.itemStack
private final ItemStack
RenderTooltipEvent.GatherComponents.itemStack
protected final ItemStack
RenderTooltipEvent.itemStack
protected final ItemStack
AddAttributeTooltipsEvent.stack
protected final ItemStack
GatherSkippedAttributeTooltipsEvent.stack
private final ItemStack
RenderHandEvent.stack
Methods in net.neoforged.neoforge.client.event that return ItemStackModifier and TypeMethodDescriptionRenderHandEvent.getItemStack()
Returns the item stack to be rendered.RenderItemInFrameEvent.getItemStack()
Returns the item stack being rendered.RenderTooltipEvent.GatherComponents.getItemStack()
Returns the item stack which the tooltip is being rendered for, or an empty item stack if there is no associated item stack.RenderTooltipEvent.getItemStack()
Returns the item stack which the tooltip is being rendered for, or an empty item stack if there is no associated item stack.AddAttributeTooltipsEvent.getStack()
TheItemStack
with the tooltip.GatherSkippedAttributeTooltipsEvent.getStack()
TheItemStack
with the tooltip.Constructors in net.neoforged.neoforge.client.event with parameters of type ItemStackModifierConstructorDescriptionAddAttributeTooltipsEvent
(ItemStack stack, Consumer<Component> tooltip, AttributeTooltipContext ctx) Color
(ItemStack stack, GuiGraphics graphics, int x, int y, Font fr, int background, int borderStart, int borderEnd, List<ClientTooltipComponent> components) GatherComponents
(ItemStack itemStack, int screenWidth, int screenHeight, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> tooltipElements, int maxWidth) Pre
(ItemStack stack, GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, Font font, List<ClientTooltipComponent> components, ClientTooltipPositioner positioner) RenderHandEvent
(InteractionHand hand, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack) protected
RenderTooltipEvent
(ItemStack itemStack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components) -
Uses of ItemStack in net.neoforged.neoforge.client.extensions
Methods in net.neoforged.neoforge.client.extensions with parameters of type ItemStackModifier and TypeMethodDescriptiondefault List
<BakedModel> IBakedModelExtension.getRenderPasses
(ItemStack itemStack, boolean fabulous) Gets an ordered list of baked models used to render this model as an item.default List
<RenderType> IBakedModelExtension.getRenderTypes
(ItemStack itemStack, boolean fabulous) Gets an ordered list ofrender types
to use when drawing this item. -
Uses of ItemStack in net.neoforged.neoforge.client.extensions.common
Methods in net.neoforged.neoforge.client.extensions.common with parameters of type ItemStackModifier and TypeMethodDescriptiondefault boolean
IClientItemExtensions.applyForgeHandTransform
(PoseStack poseStack, LocalPlayer player, HumanoidArm arm, ItemStack itemInHand, float partialTick, float equipProcess, float swingProcess) Called right before when client applies transformations to item in hand and render it.default int
IClientItemExtensions.getArmorLayerTintColor
(ItemStack stack, LivingEntity entity, ArmorMaterial.Layer layer, int layerIdx, int fallbackColor) Called when armor layers are rendered byHumanoidArmorLayer
.default HumanoidModel.ArmPose
IClientItemExtensions.getArmPose
(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) This method returns an ArmPose that can be defined using theinvalid reference
net.minecraft.client.model.HumanoidModel.ArmPose#create(String, boolean, IArmPoseTransformer)
default int
IClientItemExtensions.getDefaultDyeColor
(ItemStack stack) Called once per render pass of equipped armor items, regardless of the number of layers; the return value of this method is passed toIClientItemExtensions.getArmorLayerTintColor(ItemStack, LivingEntity, ArmorMaterial.Layer, int, int)
as thefallbackColor
parameter.default @Nullable Font
IClientItemExtensions.getFont
(ItemStack stack, IClientItemExtensions.FontContext context) Returns the font used to render data related to this item as specified in thecontext
.default Model
IClientItemExtensions.getGenericArmorModel
(LivingEntity livingEntity, ItemStack itemStack, EquipmentSlot equipmentSlot, HumanoidModel<?> original) Queries the armor model for this item when it's equipped.default HumanoidModel
<?> IClientItemExtensions.getHumanoidArmorModel
(LivingEntity livingEntity, ItemStack itemStack, EquipmentSlot equipmentSlot, HumanoidModel<?> original) Queries the humanoid armor model for this item when it's equipped.static IClientItemExtensions
default void
IClientItemExtensions.renderHelmetOverlay
(ItemStack stack, Player player, int width, int height, float partialTick) Deprecated, for removal: This API element is subject to removal in a future version.default void
IClientItemExtensions.renderHelmetOverlay
(ItemStack stack, Player player, GuiGraphics guiGraphics, DeltaTracker deltaTracker) Called when the client starts rendering the HUD, and is wearing this item in the helmet slot.default void
IClientItemExtensions.setupModelAnimations
(LivingEntity livingEntity, ItemStack itemStack, EquipmentSlot equipmentSlot, Model model, float limbSwing, float limbSwingAmount, float partialTick, float ageInTicks, float netHeadYaw, float headPitch) Called when an armor piece is about to be rendered, allowing parts of the model to be animated or changed.default boolean
IClientItemExtensions.shouldBobAsEntity
(ItemStack stack) Returns Whether the item should bob when rendered in the world as an entity.default boolean
IClientItemExtensions.shouldSpreadAsEntity
(ItemStack stack) Returns Whether the item should be spread out when rendered in the world as an entity. -
Uses of ItemStack in net.neoforged.neoforge.client.model
Methods in net.neoforged.neoforge.client.model with parameters of type ItemStackModifier and TypeMethodDescriptionint
RegistryAwareItemModelShaper.getLocation
(ItemStack stack) BakedModelWrapper.getRenderPasses
(ItemStack itemStack, boolean fabulous) CompositeModel.Baked.getRenderPasses
(ItemStack itemStack, boolean fabulous) BakedModelWrapper.getRenderTypes
(ItemStack itemStack, boolean fabulous) DynamicFluidContainerModel.ContainedFluidOverrideHandler.resolve
(BakedModel originalModel, ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) -
Uses of ItemStack in net.neoforged.neoforge.common
Fields in net.neoforged.neoforge.common declared as ItemStackModifier and TypeFieldDescriptionprotected final ItemStack
BasicItemListing.forSale
protected final ItemStack
BasicItemListing.price
protected final ItemStack
BasicItemListing.price2
Methods in net.neoforged.neoforge.common that return ItemStackModifier and TypeMethodDescriptionstatic ItemStack
CommonHooks.getCraftingRemainingItem
(ItemStack stack) static ItemStack
CommonHooks.getProjectile
(LivingEntity entity, ItemStack projectileWeaponItem, ItemStack projectile) Hook to fireLivingGetProjectileEvent
.Methods in net.neoforged.neoforge.common that return types with arguments of type ItemStackModifier and TypeMethodDescriptionCommonHooks.modifyLoot
(List<ItemStack> list, LootContext context) Deprecated.static it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> CommonHooks.modifyLoot
(ResourceLocation lootTableId, it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Handles the modification of loot table drops via the registered Global Loot Modifiers, so that custom effects can be processed.Shears this object.Methods in net.neoforged.neoforge.common with parameters of type ItemStackModifier and TypeMethodDescriptionstatic boolean
CommonHooks.canContinueUsing
(ItemStack from, ItemStack to) boolean
SpecialPlantable.canPlacePlantAtPosition
(ItemStack itemStack, LevelReader level, BlockPos pos, @Nullable Direction direction) Checks location if this item can spawn a plant with the given direction attachment point.static ItemAttributeModifiers
CommonHooks.computeModifiedAttributes
(ItemStack stack, ItemAttributeModifiers defaultModifiers) Hook to fireItemAttributeModifierEvent
.static UseOnContext
CommonHooks.dispenseUseOnContext
(BlockSource source, ItemStack stack) Creates aUseOnContext
fordispense behavior
.static ItemStack
CommonHooks.getCraftingRemainingItem
(ItemStack stack) static @Nullable String
CommonHooks.getDefaultCreatorModId
(ItemStack itemStack) Used as the default implementation ofIItemExtension.getCreatorModId(net.minecraft.world.item.ItemStack)
.static ItemStack
CommonHooks.getProjectile
(LivingEntity entity, ItemStack projectileWeaponItem, ItemStack projectile) Hook to fireLivingGetProjectileEvent
.static void
CommonHooks.handleBlockDrops
(ServerLevel level, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, List<ItemEntity> drops, @Nullable Entity breaker, ItemStack tool) Fires theBlockDropsEvent
when block drops (items and experience) are determined.default boolean
IShearable.isShearable
(@Nullable Player player, ItemStack item, Level level, BlockPos pos) Checks if this object can be sheared.static boolean
CommonHooks.onAnvilChange
(AnvilMenu container, ItemStack left, ItemStack right, Container outputSlot, String name, long baseCost, Player player) static float
CommonHooks.onAnvilRepair
(Player player, ItemStack output, ItemStack left, ItemStack right) static int
CommonHooks.onGrindstoneChange
(ItemStack top, ItemStack bottom, Container outputSlot, int xp) static boolean
CommonHooks.onItemStackedOn
(ItemStack carriedItem, ItemStack stackedOnItem, Slot slot, ClickAction action, Player player, SlotAccess carriedSlotAccess) Fires theItemStackedOnOtherEvent
, allowing items to handle custom behavior relating to being stacked together (i.e. how the bundle operates).static boolean
CommonHooks.onLivingUseTotem
(LivingEntity entity, DamageSource damageSource, ItemStack totem, InteractionHand hand) static void
CommonHooks.onPlayerEnchantItem
(Player player, ItemStack stack, List<EnchantmentInstance> instances) FiresPlayerEnchantItemEvent
inEnchantmentMenu.clickMenuButton(Player, int)
after the enchants are applied to the item.static @Nullable ItemEntity
CommonHooks.onPlayerTossEvent
(Player player, ItemStack item, boolean includeName) Shears this object.static boolean
CommonHooks.shouldSuppressEnderManAnger
(EnderMan enderMan, Player player, ItemStack mask) void
SpecialPlantable.spawnPlantAtPosition
(ItemStack itemStack, LevelAccessor level, BlockPos pos, @Nullable Direction direction) Spawns the plant with the given direction attachment point at location.default void
IShearable.spawnShearedDrop
(Level level, BlockPos pos, ItemStack drop) Performs the logic used to drop a shear result into the world at the correct position and with the proper movement.static boolean
CommonHooks.tryDispenseShearsHarvestBlock
(BlockSource source, ItemStack stack, ServerLevel level, BlockPos pos) Attempts to modify target block usingItemAbilities.SHEARS_HARVEST
inShearsDispenseItemBehavior
, consistent with vanilla beehive harvest behavior (also controlled byItemAbilities.SHEARS_HARVEST
).Method parameters in net.neoforged.neoforge.common with type arguments of type ItemStackModifier and TypeMethodDescriptionCommonHooks.modifyLoot
(List<ItemStack> list, LootContext context) Deprecated.static it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> CommonHooks.modifyLoot
(ResourceLocation lootTableId, it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Handles the modification of loot table drops via the registered Global Loot Modifiers, so that custom effects can be processed.Constructors in net.neoforged.neoforge.common with parameters of type ItemStackModifierConstructorDescriptionBasicItemListing
(int emeralds, ItemStack forSale, int maxTrades, int xp) BasicItemListing
(int emeralds, ItemStack forSale, int maxTrades, int xp, float mult) BasicItemListing
(ItemStack price, ItemStack forSale, int maxTrades, int xp, float priceMult) BasicItemListing
(ItemStack price, ItemStack price2, ItemStack forSale, int maxTrades, int xp, float priceMult) -
Uses of ItemStack in net.neoforged.neoforge.common.advancements.critereon
Methods in net.neoforged.neoforge.common.advancements.critereon with parameters of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.common.brewing
Fields in net.neoforged.neoforge.common.brewing declared as ItemStackMethods in net.neoforged.neoforge.common.brewing that return ItemStackModifier and TypeMethodDescriptionBrewingRecipe.getOutput()
Returns the output ItemStack obtained by brewing the passed input and ingredient.Returns the output when the passed input is brewed with the passed ingredient.Methods in net.neoforged.neoforge.common.brewing with parameters of type ItemStackModifier and TypeMethodDescriptionReturns the output ItemStack obtained by brewing the passed input and ingredient.Returns the output when the passed input is brewed with the passed ingredient.boolean
Returns true if the passed input and ingredient have an outputboolean
BrewingRecipe.isIngredient
(ItemStack ingredient) boolean
IBrewingRecipe.isIngredient
(ItemStack ingredient) Returns true if the passed ItemStack is an ingredient for this recipe.boolean
boolean
Returns true is the passed ItemStack is an input for this recipe.boolean
BrewingRecipeRegistry.isValidIngredient
(ItemStack stack) Returns true if the passed ItemStack is a valid ingredient for any of the recipes in the registry.boolean
BrewingRecipeRegistry.isValidInput
(ItemStack stack) Returns true if the passed ItemStack is a valid input for any of the recipes in the registry.Constructors in net.neoforged.neoforge.common.brewing with parameters of type ItemStackModifierConstructorDescriptionBrewingRecipe
(Ingredient input, Ingredient ingredient, ItemStack output) -
Uses of ItemStack in net.neoforged.neoforge.common.crafting
Fields in net.neoforged.neoforge.common.crafting declared as ItemStackModifier and TypeFieldDescriptionprivate @Nullable ItemStack[]
SizedIngredient.cachedStacks
protected @Nullable ItemStack[]
BlockTagIngredient.itemStacks
private final ItemStack[]
DataComponentIngredient.stacks
Methods in net.neoforged.neoforge.common.crafting that return ItemStackModifier and TypeMethodDescriptionSizedIngredient.getItems()
Returns a list of the stacks from thisSizedIngredient.ingredient
, with an updatedSizedIngredient.count
.Methods in net.neoforged.neoforge.common.crafting that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlockTagIngredient.getItems()
CompoundIngredient.getItems()
DataComponentIngredient.getItems()
DifferenceIngredient.getItems()
ICustomIngredient.getItems()
Returns the list of stacks that this ingredient accepts.IntersectionIngredient.getItems()
Methods in net.neoforged.neoforge.common.crafting with parameters of type ItemStackModifier and TypeMethodDescriptionstatic Ingredient
Creates a new ingredient matching the given item, containing the given componentsboolean
boolean
boolean
boolean
boolean
Checks if a stack matches this ingredient.boolean
boolean
Performs a size-sensitive test on the given stack. -
Uses of ItemStack in net.neoforged.neoforge.common.data
Methods in net.neoforged.neoforge.common.data with parameters of type ItemStackMethod parameters in net.neoforged.neoforge.common.data with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
LanguageProvider.addItemStack
(Supplier<ItemStack> key, String name) -
Uses of ItemStack in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions that return ItemStackModifier and TypeMethodDescriptiondefault ItemStack
IItemExtension.applyEnchantments
(ItemStack stack, List<EnchantmentInstance> enchantments) Handles enchanting an item (i.e. in the enchanting table), potentially transforming it to a new item in the process.default ItemStack
IBlockExtension.getCloneItemStack
(BlockState state, HitResult target, LevelReader level, BlockPos pos, Player player) Called when A user uses the creative pick block button on this blockdefault ItemStack
IBlockStateExtension.getCloneItemStack
(HitResult target, LevelReader level, BlockPos pos, Player player) Called when A user uses the creative pick block button on this blockdefault ItemStack
IItemExtension.getCraftingRemainingItem
(ItemStack itemStack) ItemStack sensitive version ofItem.getCraftingRemainingItem()
.default ItemStack
IItemStackExtension.getCraftingRemainingItem()
ItemStack sensitive version ofItem.getCraftingRemainingItem()
.default @Nullable ItemStack
IEntityExtension.getPickedResult
(HitResult target) Called when a user uses the creative pick block button on this entity.private ItemStack
IItemStackExtension.self()
Methods in net.neoforged.neoforge.common.extensions with parameters of type ItemStackModifier and TypeMethodDescriptiondefault ItemStack
IItemExtension.applyEnchantments
(ItemStack stack, List<EnchantmentInstance> enchantments) Handles enchanting an item (i.e. in the enchanting table), potentially transforming it to a new item in the process.default boolean
IItemExtension.canBeHurtBy
(ItemStack stack, DamageSource source) Returns false to make item entity immune to the damage..default boolean
IItemExtension.canContinueUsing
(ItemStack oldStack, ItemStack newStack) Called while an item is in 'active' use to determine if usage should continue.default boolean
IItemExtension.canDisableShield
(ItemStack stack, ItemStack shield, LivingEntity entity, LivingEntity attacker) Can this Item disable a shielddefault boolean
IItemStackExtension.canDisableShield
(ItemStack shield, LivingEntity entity, LivingEntity attacker) Can this Item disable a shielddefault boolean
IItemExtension.canElytraFly
(ItemStack stack, LivingEntity entity) Used to determine if the player can use Elytra flight.default boolean
IItemExtension.canEquip
(ItemStack stack, EquipmentSlot armorType, LivingEntity entity) Determines if the specific ItemStack can be placed in the specified armor slot, for the entity.default boolean
IItemExtension.canGrindstoneRepair
(ItemStack stack) Returns true if the given ItemStack can be put into a grindstone to be repaired and/or stripped of its enchantments.default boolean
IItemExtension.canPerformAction
(ItemStack stack, ItemAbility itemAbility) Queries if an item can perform the given action.default boolean
IItemExtension.canWalkOnPowderedSnow
(ItemStack stack, LivingEntity wearer) Called by the powdered snow block to check if a living entity wearing this can walk on the snow, granting the same behavior as leather boots.default @Nullable Entity
IItemExtension.createEntity
(Level level, Entity location, ItemStack stack) This function should return a new entity to replace the dropped item.default <T extends LivingEntity>
intIItemExtension.damageItem
(ItemStack stack, int amount, T entity, Consumer<Item> onBroken) Reduce the durability of this item by the amount given.default boolean
IItemExtension.doesSneakBypassUse
(ItemStack stack, LevelReader level, BlockPos pos, Player player) Should this item, when held, allow sneak-clicks to pass through to the underlying block?default boolean
IItemExtension.elytraFlightTick
(ItemStack stack, LivingEntity entity, int flightTicks) Used to determine if the player can continue Elytra flight, this is called each tick, and can be used to apply ItemStack damage, consume Energy, or what have you.default boolean
IDispensibleContainerItemExtension.emptyContents
(@Nullable Player player, Level level, BlockPos pos, @Nullable BlockHitResult hitResult, @Nullable ItemStack container) Empties the contents of the container and returns whether it was successful.default ItemEnchantments
IItemExtension.getAllEnchantments
(ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) Gets a map of all enchantments present on the stack.default @Nullable ResourceLocation
IItemExtension.getArmorTexture
(ItemStack stack, Entity entity, EquipmentSlot slot, ArmorMaterial.Layer layer, boolean innerModel) Called by RenderBiped and RenderPlayer to determine the armor texture that should be use for the currently equipped item.default int
IItemExtension.getBurnTime
(ItemStack itemStack, @Nullable RecipeType<?> recipeType) default ItemStack
IItemExtension.getCraftingRemainingItem
(ItemStack itemStack) ItemStack sensitive version ofItem.getCraftingRemainingItem()
.default @Nullable String
IItemExtension.getCreatorModId
(ItemStack itemStack) Called to get the Mod ID of the mod that *created* the ItemStack, instead of the real Mod ID that *registered* it.default int
Return the itemDamage represented by this ItemStack.default ItemAttributeModifiers
IItemExtension.getDefaultAttributeModifiers
(ItemStack stack) ItemStack sensitive version of getDefaultAttributeModifiers.default int
IItemExtension.getEnchantmentLevel
(ItemStack stack, Holder<Enchantment> enchantment) Gets the level of the enchantment currently present on the stack.default int
IItemExtension.getEnchantmentValue
(ItemStack stack) ItemStack sensitive version ofItem.getEnchantmentValue()
.default int
IItemExtension.getEntityLifespan
(ItemStack itemStack, Level level) Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem.default @Nullable EquipmentSlot
IItemExtension.getEquipmentSlot
(ItemStack stack) Override this to set a non-default armor slot for an ItemStack, but do not use this to get the armor slot of said stack; for that, useLivingEntity.getEquipmentSlotForItem(ItemStack)
..default int
IBlockExtension.getExpDrop
(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) Returns how many experience points this block drops when broken, before application of enchantments.default int
IBlockStateExtension.getExpDrop
(LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) Returns how many experience points this block drops when broken, before application of enchantments.default @Nullable FoodProperties
IItemExtension.getFoodProperties
(ItemStack stack, @Nullable LivingEntity entity) Get the food properties for this item.default Component
IItemExtension.getHighlightTip
(ItemStack item, Component displayName) Allow the item one last chance to modify its name used for the tool highlight useful for adding something extra that can't be removed by a user in the displayed name, such as a mode of operation.default int
IItemExtension.getMaxDamage
(ItemStack stack) Return the maxDamage for this ItemStack.default int
IItemExtension.getMaxStackSize
(ItemStack stack) Gets the maximum number of items that this stack should be able to hold.default AABB
IItemExtension.getSweepHitBox
(ItemStack stack, Player player, Entity target) Get a bounding box (AABB
) of a sweep attack.default float
IItemExtension.getXpRepairRatio
(ItemStack stack) Determines the amount of durability the mending enchantment will repair, on average, per 0.5 points of experience.default boolean
IItemExtension.hasCraftingRemainingItem
(ItemStack stack) ItemStack sensitive version ofItem.hasCraftingRemainingItem()
.default boolean
IItemExtension.hasCustomEntity
(ItemStack stack) Determines if this Item has a special entity for when they are in the world.default boolean
IItemExtension.isBookEnchantable
(ItemStack stack, ItemStack book) Allow or forbid the specific book/item combination as an anvil enchantdefault boolean
IItemStackExtension.isBookEnchantable
(ItemStack book) Allow or forbid the specific book/item combination as an anvil enchantdefault boolean
IItemExtension.isDamageable
(ItemStack stack) Used to test if this item can be damaged, but with the ItemStack in question.default boolean
Return if this itemstack is damaged.default boolean
IItemExtension.isEnderMask
(ItemStack stack, Player player, EnderMan endermanEntity) Whether this Item can be used to hide player head for enderman.default boolean
IItemExtension.isNotReplaceableByPickAction
(ItemStack stack, Player player, int inventorySlot) Whether the given ItemStack should be excluded (if possible) when selecting the target hotbar slot of a "pick" action.default boolean
IItemExtension.isPiglinCurrency
(ItemStack stack) Called by Piglins when checking to see if they will give an item or something in exchange for this item.default boolean
IItemExtension.isPrimaryItemFor
(ItemStack stack, Holder<Enchantment> enchantment) Checks if an item should be treated as a primary item for a given enchantment.boolean
IItemExtension.isRepairable
(ItemStack stack) Called by CraftingManager to determine if an item is reparable.default boolean
IItemExtension.makesPiglinsNeutral
(ItemStack stack, LivingEntity wearer) Called by Piglins to check if a given item prevents hostility on sight.default void
IItemExtension.onAnimalArmorTick
(ItemStack stack, Level level, Mob horse) Called every tick when this item is equipped as an armor item by a horseinvalid reference
that can wear armor
default boolean
IItemExtension.onDroppedByPlayer
(ItemStack item, Player player) Called when a player drops the item into the world, returning false from this will prevent the item from being removed from the players inventory and spawning in the worlddefault boolean
IItemExtension.onEntityItemUpdate
(ItemStack stack, ItemEntity entity) Called by the default implemetation of EntityItem's onUpdate method, allowing for cleaner control over the update of the item without having to write a subclass.default boolean
IItemExtension.onEntitySwing
(ItemStack stack, LivingEntity entity) Deprecated, for removal: This API element is subject to removal in a future version.To be replaced with hand sensitive version in 21.2default boolean
IItemExtension.onEntitySwing
(ItemStack stack, LivingEntity entity, InteractionHand hand) Called when a entity tries to play the 'swing' animation.default InteractionResult
IItemExtension.onItemUseFirst
(ItemStack stack, UseOnContext context) This is called when the item is used, before the block is activated.default boolean
IItemExtension.onLeftClickEntity
(ItemStack stack, Player player, Entity entity) Called when the player Left Clicks (attacks) an entity.default void
IItemExtension.onStopUsing
(ItemStack stack, LivingEntity entity, int count) Called when an entity stops using an item for any reason, notably when selecting another item without releasing or finishing.default void
Set the damage for this itemstack.default boolean
IItemExtension.shouldCauseBlockBreakReset
(ItemStack oldStack, ItemStack newStack) Called when the player is mining a block and the item in his hand changes.default boolean
IItemStackExtension.shouldCauseBlockBreakReset
(ItemStack newStack) Called when the player is mining a block and the item in his hand changes.default boolean
IItemExtension.shouldCauseReequipAnimation
(ItemStack oldStack, ItemStack newStack, boolean slotChanged) Determine if the player switching between these two item stacksdefault boolean
IItemExtension.supportsEnchantment
(ItemStack stack, Holder<Enchantment> enchantment) Checks if the provided enchantment is applicable to the passed item stack. -
Uses of ItemStack in net.neoforged.neoforge.common.loot
Methods in net.neoforged.neoforge.common.loot that return types with arguments of type ItemStackModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> IGlobalLootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the list of generated loot.final it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> AddTableLootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected abstract it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the generated loot (all loot conditions have already been checked and have returned true).Method parameters in net.neoforged.neoforge.common.loot with type arguments of type ItemStackModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> IGlobalLootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the list of generated loot.final it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> AddTableLootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected abstract it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the generated loot (all loot conditions have already been checked and have returned true). -
Uses of ItemStack in net.neoforged.neoforge.common.util
Methods in net.neoforged.neoforge.common.util that return types with arguments of type ItemStackModifier and TypeMethodDescriptionItemStackMap.createTypeAndTagLinkedMap()
ItemStackMap.createTypeAndTagMap()
Methods in net.neoforged.neoforge.common.util with parameters of type ItemStackModifier and TypeMethodDescriptionstatic void
AttributeUtil.addAttributeTooltips
(ItemStack stack, Consumer<Component> tooltip, AttributeTooltipContext ctx) Checks if attribute modifier tooltips should show, and if they should, adds tooltips for all attribute modifiers present on an item stack to the stack's tooltip lines.static void
AttributeUtil.applyModifierTooltips
(ItemStack stack, Consumer<Component> tooltip, AttributeTooltipContext ctx) Applies the attribute modifier tooltips for all attribute modifiers present on the item stack.static void
AttributeUtil.applyTextFor
(ItemStack stack, Consumer<Component> tooltip, com.google.common.collect.Multimap<Holder<Attribute>, AttributeModifier> modifierMap, AttributeTooltipContext ctx) Applies the text for the provided attribute modifiers to the tooltip for a given item stack.static com.google.common.collect.Multimap
<Holder<Attribute>, AttributeModifier> AttributeUtil.getSortedModifiers
(ItemStack stack, EquipmentSlotGroup slot) Returns a sorted, mutableMultimap
containing all the attribute modifiers on an item stack for the given group. -
Uses of ItemStack in net.neoforged.neoforge.debug.crafting
Fields in net.neoforged.neoforge.debug.crafting declared as ItemStackModifier and TypeFieldDescriptionprivate static final ItemStack
AnvilUpdateEventTests.MOCK_OUTPUT
Methods in net.neoforged.neoforge.debug.crafting that return ItemStackConstructors in net.neoforged.neoforge.debug.crafting with parameters of type ItemStackModifierConstructorDescriptionCompressedShapelessRecipe
(String group, CraftingBookCategory category, ItemStack result, List<SizedIngredient> ingredients) CompressedShapelessRecipeBuilder
(RecipeCategory category, ItemStack result) -
Uses of ItemStack in net.neoforged.neoforge.debug.entity.player
Methods in net.neoforged.neoforge.debug.entity.player with parameters of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.debug.loot
Methods in net.neoforged.neoforge.debug.loot that return ItemStackModifier and TypeMethodDescriptionprivate static ItemStack
GlobalLootModifiersTest.SmeltingEnchantmentModifier.smelt
(ItemStack stack, LootContext context) Methods in net.neoforged.neoforge.debug.loot that return types with arguments of type ItemStackModifier and TypeMethodDescriptionprotected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.DungeonLootEnhancerModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SilkTouchTestModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SmeltingEnchantmentModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.WheatSeedsConverterModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Methods in net.neoforged.neoforge.debug.loot with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static ItemStack
GlobalLootModifiersTest.SmeltingEnchantmentModifier.smelt
(ItemStack stack, LootContext context) Method parameters in net.neoforged.neoforge.debug.loot with type arguments of type ItemStackModifier and TypeMethodDescriptionprotected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.DungeonLootEnhancerModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SilkTouchTestModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SmeltingEnchantmentModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.WheatSeedsConverterModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) -
Uses of ItemStack in net.neoforged.neoforge.event
Fields in net.neoforged.neoforge.event declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
GrindstoneEvent.bottom
private final ItemStack
ItemStackedOnOtherEvent.carriedItem
private final ItemStack
AnvilUpdateEvent.left
private ItemStack
GrindstoneEvent.OnTakeItem.newBottom
private ItemStack
GrindstoneEvent.OnTakeItem.newTop
private ItemStack
AnvilUpdateEvent.output
private ItemStack
GrindstoneEvent.OnPlaceItem.output
private final ItemStack
AnvilUpdateEvent.right
private final ItemStack
ItemAttributeModifierEvent.stack
private final ItemStack
ItemStackedOnOtherEvent.stackedOnItem
private final ItemStack
GrindstoneEvent.top
Fields in net.neoforged.neoforge.event with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final InsertableLinkedOpenCustomHashSet
<ItemStack> BuildCreativeModeTabContentsEvent.parentEntries
private final InsertableLinkedOpenCustomHashSet
<ItemStack> BuildCreativeModeTabContentsEvent.searchEntries
Methods in net.neoforged.neoforge.event that return ItemStackModifier and TypeMethodDescriptionGrindstoneEvent.getBottomItem()
ItemStackedOnOtherEvent.getCarriedItem()
Returns the stack being carried by the mouse.ItemAttributeModifierEvent.getItemStack()
Returns the item stack whose attribute modifiers are being computed.AnvilUpdateEvent.getLeft()
GrindstoneEvent.OnTakeItem.getNewBottomItem()
GrindstoneEvent.OnTakeItem.getNewTopItem()
AnvilUpdateEvent.getOutput()
This is the output as determined by the event, not by the vanilla behavior between these two items.GrindstoneEvent.OnPlaceItem.getOutput()
This is the output as determined by the event, not by the vanilla behavior between these two items.AnvilUpdateEvent.getRight()
ItemStackedOnOtherEvent.getStackedOnItem()
Returns the stack currently in the slot being clicked on.GrindstoneEvent.getTopItem()
static ItemStack
EventHooks.onItemUseFinish
(LivingEntity entity, ItemStack item, int duration, ItemStack result) Methods in net.neoforged.neoforge.event that return types with arguments of type ItemStackModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.objects.ObjectSortedSet
<ItemStack> BuildCreativeModeTabContentsEvent.getParentEntries()
The current immutable ordered set of the parent tab entries in the order to be added to the Creative Menu.it.unimi.dsi.fastutil.objects.ObjectSortedSet
<ItemStack> BuildCreativeModeTabContentsEvent.getSearchEntries()
The current immutable ordered set of the search tab entries in the order to be added to the Creative Menu.static InteractionResultHolder
<ItemStack> EventHooks.onArrowNock
(ItemStack item, Level level, Player player, InteractionHand hand, boolean hasAmmo) Methods in net.neoforged.neoforge.event with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
BuildCreativeModeTabContentsEvent.accept
(ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new stack at the end of the given tab at this point in time.private void
BuildCreativeModeTabContentsEvent.assertNewEntryDoesNotAlreadyExists
(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack newEntry) private static void
BuildCreativeModeTabContentsEvent.assertStackCount
(ItemStack newEntry) private void
BuildCreativeModeTabContentsEvent.assertTargetExists
(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack existingEntry) static BonemealEvent
EventHooks.fireBonemealEvent
(@Nullable Player player, Level level, BlockPos pos, BlockState state, ItemStack stack) Called when bone meal (or equivalent) is used on a block.static void
EventHooks.fireItemPickupPost
(ItemEntity itemEntity, Player player, ItemStack copy) Called inItemEntity.playerTouch(Player)
after an item was successfully picked up.static void
EventHooks.firePlayerCraftingEvent
(Player player, ItemStack crafted, Container craftMatrix) static void
EventHooks.firePlayerSmeltedEvent
(Player player, ItemStack smelted) static ItemEnchantments
EventHooks.getAllEnchantmentLevels
(ItemEnchantments enchantments, ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) FiresGetEnchantmentLevelEvent
and for all enchantments, returning the (possibly event-modified) enchantment map.static int
EventHooks.getEnchantmentLevelSpecific
(int level, ItemStack stack, Holder<Enchantment> ench) FiresGetEnchantmentLevelEvent
and for a single enchantment, returning the (possibly event-modified) level.static int
EventHooks.getItemBurnTime
(ItemStack itemStack, int burnTime, @Nullable RecipeType<?> recipeType) void
BuildCreativeModeTabContentsEvent.insertAfter
(ItemStack existingEntry, ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry after the specified existing entry.void
BuildCreativeModeTabContentsEvent.insertBefore
(ItemStack existingEntry, ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry before the specified existing entry.void
BuildCreativeModeTabContentsEvent.insertFirst
(ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry in the front of the tab's content.static int
EventHooks.onArrowLoose
(ItemStack stack, Level level, Player player, int charge, boolean hasAmmo) static InteractionResultHolder
<ItemStack> EventHooks.onArrowNock
(ItemStack item, Level level, Player player, InteractionHand hand, boolean hasAmmo) static int
EventHooks.onEnchantmentLevelSet
(Level level, BlockPos pos, int enchantRow, int power, ItemStack itemStack, int enchantmentLevel) static ItemTooltipEvent
EventHooks.onItemTooltip
(ItemStack itemStack, @Nullable Player entityPlayer, List<Component> list, TooltipFlag flags, Item.TooltipContext context) static ItemStack
EventHooks.onItemUseFinish
(LivingEntity entity, ItemStack item, int duration, ItemStack result) static int
EventHooks.onItemUseStart
(LivingEntity entity, ItemStack item, int duration) Deprecated, for removal: This API element is subject to removal in a future version.Usethe hand sensitive version
as this version provides wrong hand informationstatic int
EventHooks.onItemUseStart
(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) static int
EventHooks.onItemUseTick
(LivingEntity entity, ItemStack item, int duration) static void
EventHooks.onPlayerBrewedPotion
(Player player, ItemStack stack) static void
EventHooks.onPlayerDestroyItem
(Player player, ItemStack stack, @Nullable InteractionHand hand) static boolean
EventHooks.onUseItemStop
(LivingEntity entity, ItemStack item, int duration) void
BuildCreativeModeTabContentsEvent.remove
(ItemStack existingEntry, CreativeModeTab.TabVisibility visibility) Removes an entry from the tab's content.void
GrindstoneEvent.OnTakeItem.setNewBottomItem
(ItemStack newBottom) Sets the itemstack in the bottom slot.void
GrindstoneEvent.OnTakeItem.setNewTopItem
(ItemStack newTop) Sets the itemstack in the top slot.void
Sets the output slot to a specific itemstack.void
Sets the output slot to a specific itemstack.Method parameters in net.neoforged.neoforge.event with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate void
BuildCreativeModeTabContentsEvent.assertNewEntryDoesNotAlreadyExists
(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack newEntry) private void
BuildCreativeModeTabContentsEvent.assertTargetExists
(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack existingEntry) static boolean
EventHooks.onPotionAttemptBrew
(NonNullList<ItemStack> stacks) static void
EventHooks.onPotionBrewed
(NonNullList<ItemStack> brewingItemStacks) Constructors in net.neoforged.neoforge.event with parameters of type ItemStackModifierConstructorDescriptionAnvilUpdateEvent
(ItemStack left, ItemStack right, String name, long cost, Player player) protected
GrindstoneEvent
(ItemStack top, ItemStack bottom, int xp) ItemAttributeModifierEvent
(ItemStack stack, ItemAttributeModifiers defaultModifiers) ItemStackedOnOtherEvent
(ItemStack carriedItem, ItemStack stackedOnItem, Slot slot, ClickAction action, Player player, SlotAccess carriedSlotAccess) OnPlaceItem
(ItemStack top, ItemStack bottom, int xp) OnTakeItem
(ItemStack top, ItemStack bottom, int xp) Constructor parameters in net.neoforged.neoforge.event with type arguments of type ItemStackModifierConstructorDescriptionBuildCreativeModeTabContentsEvent
(CreativeModeTab tab, ResourceKey<CreativeModeTab> tabKey, CreativeModeTab.ItemDisplayParameters parameters, InsertableLinkedOpenCustomHashSet<ItemStack> parentEntries, InsertableLinkedOpenCustomHashSet<ItemStack> searchEntries) -
Uses of ItemStack in net.neoforged.neoforge.event.brewing
Fields in net.neoforged.neoforge.event.brewing declared as ItemStackFields in net.neoforged.neoforge.event.brewing with type parameters of type ItemStackMethods in net.neoforged.neoforge.event.brewing that return ItemStackModifier and TypeMethodDescriptionPotionBrewEvent.getItem
(int index) PlayerBrewedPotionEvent.getStack()
The ItemStack of the potion.Methods in net.neoforged.neoforge.event.brewing with parameters of type ItemStackConstructors in net.neoforged.neoforge.event.brewing with parameters of type ItemStackConstructor parameters in net.neoforged.neoforge.event.brewing with type arguments of type ItemStackModifierConstructorDescriptionPost
(NonNullList<ItemStack> stacks) protected
PotionBrewEvent
(NonNullList<ItemStack> stacks) Pre
(NonNullList<ItemStack> stacks) -
Uses of ItemStack in net.neoforged.neoforge.event.enchanting
Fields in net.neoforged.neoforge.event.enchanting declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
EnchantmentLevelSetEvent.itemStack
protected final ItemStack
GetEnchantmentLevelEvent.stack
Methods in net.neoforged.neoforge.event.enchanting that return ItemStackModifier and TypeMethodDescriptionEnchantmentLevelSetEvent.getItem()
Get the item being enchantedGetEnchantmentLevelEvent.getStack()
Returns the item stack that is being queried against.Constructors in net.neoforged.neoforge.event.enchanting with parameters of type ItemStackModifierConstructorDescriptionEnchantmentLevelSetEvent
(Level level, BlockPos pos, int enchantRow, int power, ItemStack itemStack, int enchantLevel) GetEnchantmentLevelEvent
(ItemStack stack, ItemEnchantments.Mutable enchantments, @Nullable Holder<Enchantment> targetEnchant, HolderLookup.RegistryLookup<Enchantment> lookup) -
Uses of ItemStack in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as ItemStackModifier and TypeFieldDescriptionArmorHurtEvent.ArmorEntry.armorItemStack
private final ItemStack
LivingEquipmentChangeEvent.from
private final ItemStack
LivingEntityUseItemEvent.item
private ItemStack
LivingGetProjectileEvent.projectileItemStack
private final ItemStack
LivingGetProjectileEvent.projectileWeaponItemStack
private ItemStack
LivingEntityUseItemEvent.Finish.result
private final ItemStack
LivingEquipmentChangeEvent.to
private ItemStack
LivingSwapItemsEvent.Hands.toMainHand
private ItemStack
LivingSwapItemsEvent.Hands.toOffHand
private final ItemStack
LivingUseTotemEvent.totem
Methods in net.neoforged.neoforge.event.entity.living that return ItemStackModifier and TypeMethodDescriptionArmorHurtEvent.getArmorItemStack
(EquipmentSlot slot) Provides the Itemstack for the given slot.LivingEquipmentChangeEvent.getFrom()
LivingEntityUseItemEvent.getItem()
LivingSwapItemsEvent.Hands.getItemSwappedToMainHand()
Gets the item that will be swapped to the main hand of the entity.LivingSwapItemsEvent.Hands.getItemSwappedToOffHand()
Gets the item that will be swapped to the offhand of the entity.LivingGetProjectileEvent.getProjectileItemStack()
LivingGetProjectileEvent.getProjectileWeaponItemStack()
LivingEntityUseItemEvent.Finish.getResultStack()
LivingEquipmentChangeEvent.getTo()
LivingUseTotemEvent.getTotem()
Returns the totem of undying being used from the entity's inventory.Methods in net.neoforged.neoforge.event.entity.living with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
LivingSwapItemsEvent.Hands.setItemSwappedToMainHand
(ItemStack item) Sets the item that will be swapped to the main hand of the entity.void
LivingSwapItemsEvent.Hands.setItemSwappedToOffHand
(ItemStack item) Sets the item that will be swapped to the offhand of the entity.void
LivingGetProjectileEvent.setProjectileItemStack
(ItemStack projectileItemStack) Sets the projectile itemstack to be used.void
LivingEntityUseItemEvent.Finish.setResultStack
(ItemStack result) Constructors in net.neoforged.neoforge.event.entity.living with parameters of type ItemStackModifierConstructorDescriptionArmorEntry
(ItemStack armorStack, float damageIn) Finish
(LivingEntity entity, ItemStack item, int duration, ItemStack result) private
LivingEntityUseItemEvent
(LivingEntity entity, ItemStack item, int duration) private
LivingEntityUseItemEvent
(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) LivingEquipmentChangeEvent
(LivingEntity entity, EquipmentSlot slot, ItemStack from, ItemStack to) LivingGetProjectileEvent
(LivingEntity livingEntity, ItemStack projectileWeaponItemStack, ItemStack ammo) LivingUseTotemEvent
(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand) Start
(LivingEntity entity, ItemStack item, int duration) Deprecated, for removal: This API element is subject to removal in a future version.Usethe hand sensitive version
as this version provides wrong hand informationStart
(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) Stop
(LivingEntity entity, ItemStack item, int duration) Tick
(LivingEntity entity, ItemStack item, int duration) -
Uses of ItemStack in net.neoforged.neoforge.event.entity.player
Fields in net.neoforged.neoforge.event.entity.player declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
ArrowLooseEvent.bow
private final ItemStack
ArrowNockEvent.bow
private final ItemStack
PlayerEvent.ItemCraftedEvent.crafting
private final ItemStack
PlayerEnchantItemEvent.enchantedItem
private final ItemStack
UseItemOnBlockEvent.heldItem
private final ItemStack
ItemTooltipEvent.itemStack
private final ItemStack
AnvilRepairEvent.left
private final ItemStack
PlayerDestroyItemEvent.original
private final ItemStack
ItemEntityPickupEvent.Post.originalStack
private final ItemStack
AnvilRepairEvent.output
private final ItemStack
AnvilRepairEvent.right
private final ItemStack
PlayerEvent.ItemSmeltedEvent.smelting
private final ItemStack
BonemealEvent.stack
Fields in net.neoforged.neoforge.event.entity.player with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate InteractionResultHolder
<ItemStack> ArrowNockEvent.action
private final NonNullList
<ItemStack> ItemFishedEvent.stacks
Methods in net.neoforged.neoforge.event.entity.player that return ItemStackModifier and TypeMethodDescriptionArrowLooseEvent.getBow()
ArrowNockEvent.getBow()
PlayerEvent.ItemCraftedEvent.getCrafting()
ItemEntityPickupEvent.Post.getCurrentStack()
Returns a live reference to the remaining stack held by theItemEntity
.PlayerEnchantItemEvent.getEnchantedItem()
ItemTooltipEvent.getItemStack()
TheItemStack
with the tooltip.PlayerInteractEvent.getItemStack()
UseItemOnBlockEvent.getItemStack()
AnvilRepairEvent.getLeft()
Get the first item input into the anvilPlayerDestroyItemEvent.getOriginal()
ItemEntityPickupEvent.Post.getOriginalStack()
Returns a copy of the original stack, before it was added to the player's inventory.AnvilRepairEvent.getOutput()
Get the output result from the anvilAnvilRepairEvent.getRight()
Get the second item input into the anvilPlayerEvent.ItemSmeltedEvent.getSmelting()
BonemealEvent.getStack()
Returns the bone meal item stack.Methods in net.neoforged.neoforge.event.entity.player that return types with arguments of type ItemStackModifier and TypeMethodDescriptionArrowNockEvent.getAction()
ItemFishedEvent.getDrops()
Use this to get the items the player will receive.Method parameters in net.neoforged.neoforge.event.entity.player with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
ArrowNockEvent.setAction
(InteractionResultHolder<ItemStack> action) Constructors in net.neoforged.neoforge.event.entity.player with parameters of type ItemStackModifierConstructorDescriptionAnvilRepairEvent
(Player player, ItemStack left, ItemStack right, ItemStack output) ArrowLooseEvent
(Player player, ItemStack bow, Level level, int charge, boolean hasAmmo) ArrowNockEvent
(Player player, ItemStack item, InteractionHand hand, Level level, boolean hasAmmo) BonemealEvent
(@Nullable Player player, Level level, BlockPos pos, BlockState state, ItemStack stack) ItemCraftedEvent
(Player player, ItemStack crafting, Container craftMatrix) ItemSmeltedEvent
(Player player, ItemStack crafting) ItemTooltipEvent
(ItemStack itemStack, @Nullable Player player, List<Component> list, TooltipFlag flags, Item.TooltipContext context) This event is fired ingetTooltipLines(TooltipContext, Player, TooltipFlag)
, which in turn is called from its respective GUIContainer.PlayerDestroyItemEvent
(Player player, ItemStack original, @Nullable InteractionHand hand) PlayerEnchantItemEvent
(Player player, ItemStack enchantedItem, List<EnchantmentInstance> enchantments) Post
(Player player, ItemEntity item, ItemStack originalStack) Constructor parameters in net.neoforged.neoforge.event.entity.player with type arguments of type ItemStackModifierConstructorDescriptionItemFishedEvent
(List<ItemStack> stacks, int rodDamage, FishingHook hook) -
Uses of ItemStack in net.neoforged.neoforge.event.furnace
Fields in net.neoforged.neoforge.event.furnace declared as ItemStackMethods in net.neoforged.neoforge.event.furnace that return ItemStackModifier and TypeMethodDescriptionFurnaceFuelBurnTimeEvent.getItemStack()
Get the ItemStack "fuel" in question.Constructors in net.neoforged.neoforge.event.furnace with parameters of type ItemStackModifierConstructorDescriptionFurnaceFuelBurnTimeEvent
(ItemStack itemStack, int burnTime, @Nullable RecipeType<?> recipeType) -
Uses of ItemStack in net.neoforged.neoforge.event.level
Fields in net.neoforged.neoforge.event.level declared as ItemStackMethods in net.neoforged.neoforge.event.level that return ItemStackModifier and TypeMethodDescriptionBlockEvent.BlockToolModificationEvent.getHeldItemStack()
BlockDropsEvent.getTool()
Returns the tool used when breaking this block; may be empty.Constructors in net.neoforged.neoforge.event.level with parameters of type ItemStackModifierConstructorDescriptionBlockDropsEvent
(ServerLevel level, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, List<ItemEntity> drops, @Nullable Entity breaker, ItemStack tool) Constructs a new BlockDropsEvent -
Uses of ItemStack in net.neoforged.neoforge.fluids
Fields in net.neoforged.neoforge.fluids declared as ItemStackMethods in net.neoforged.neoforge.fluids that return ItemStackModifier and TypeMethodDescriptionprivate ItemStack
DispenseFluidContainer.dumpContainer
(BlockSource source, ItemStack stack) Drains a filled container and places the fluid in front of the Dispenser.DispenseFluidContainer.execute
(BlockSource source, ItemStack stack) private ItemStack
DispenseFluidContainer.fillContainer
(BlockSource source, ItemStack stack) Picks up fluid in front of a Dispenser and fills a container with it.FluidType.getBucket
(FluidStack stack) Returns the bucket containing the fluid.static ItemStack
FluidUtil.getFilledBucket
(FluidStack fluidStack) FluidActionResult.getResult()
Methods in net.neoforged.neoforge.fluids with parameters of type ItemStackModifier and TypeMethodDescriptionprivate ItemStack
DispenseFluidContainer.dumpContainer
(BlockSource source, ItemStack stack) Drains a filled container and places the fluid in front of the Dispenser.DispenseFluidContainer.execute
(BlockSource source, ItemStack stack) private ItemStack
DispenseFluidContainer.fillContainer
(BlockSource source, ItemStack stack) Picks up fluid in front of a Dispenser and fills a container with it.static Optional
<FluidStack> FluidUtil.getFluidContained
(ItemStack container) Helper method to get the fluid contained in an itemStackstatic Optional
<IFluidHandlerItem> FluidUtil.getFluidHandler
(ItemStack itemStack) Helper method to get anIFluidHandlerItem
for an itemStack.boolean
FluidStack.isFluidEqual
(ItemStack other) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResult
FluidUtil.tryEmptyContainer
(ItemStack container, IFluidHandler fluidDestination, int maxAmount, @Nullable Player player, boolean doDrain) Takes a filled container and tries to empty it into the given tank.static FluidActionResult
FluidUtil.tryEmptyContainerAndStow
(ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable Player player, boolean doDrain) Takes an Fluid Container Item, tries to empty it into the fluid handler, and stows it in the given inventory.static FluidActionResult
FluidUtil.tryFillContainer
(ItemStack container, IFluidHandler fluidSource, int maxAmount, @Nullable Player player, boolean doFill) Fill a container from the given fluidSource.static FluidActionResult
FluidUtil.tryFillContainerAndStow
(ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable Player player, boolean doFill) Takes an Fluid Container Item and tries to fill it from the given tank.static FluidActionResult
FluidUtil.tryPickUpFluid
(ItemStack emptyContainer, @Nullable Player playerIn, Level level, BlockPos pos, Direction side) Attempts to pick up a fluid in the level and put it in an empty container item.static FluidActionResult
FluidUtil.tryPlaceFluid
(@Nullable Player player, Level level, InteractionHand hand, BlockPos pos, ItemStack container, FluidStack resource) Constructors in net.neoforged.neoforge.fluids with parameters of type ItemStackModifierConstructorDescriptionprivate
FluidActionResult
(boolean success, ItemStack result) FluidActionResult
(ItemStack result) -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability
Methods in net.neoforged.neoforge.fluids.capability that return ItemStackModifier and TypeMethodDescriptionIFluidHandlerItem.getContainer()
Get the container currently acted on by this fluid handler. -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability.templates
Fields in net.neoforged.neoforge.fluids.capability.templates declared as ItemStackModifier and TypeFieldDescriptionprotected ItemStack
FluidHandlerItemStack.container
protected ItemStack
FluidHandlerItemStackSimple.container
protected final ItemStack
FluidHandlerItemStack.SwapEmpty.emptyContainer
protected final ItemStack
FluidHandlerItemStackSimple.SwapEmpty.emptyContainer
Methods in net.neoforged.neoforge.fluids.capability.templates that return ItemStackModifier and TypeMethodDescriptionFluidHandlerItemStack.getContainer()
FluidHandlerItemStackSimple.getContainer()
Constructors in net.neoforged.neoforge.fluids.capability.templates with parameters of type ItemStackModifierConstructorDescriptionConsumable
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Consumable
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) FluidHandlerItemStack
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) FluidHandlerItemStackSimple
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) SwapEmpty
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity) SwapEmpty
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity) -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability.wrappers
Fields in net.neoforged.neoforge.fluids.capability.wrappers declared as ItemStackMethods in net.neoforged.neoforge.fluids.capability.wrappers that return ItemStackConstructors in net.neoforged.neoforge.fluids.capability.wrappers with parameters of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.items
Fields in net.neoforged.neoforge.items declared as ItemStackFields in net.neoforged.neoforge.items with type parameters of type ItemStackMethods in net.neoforged.neoforge.items that return ItemStackModifier and TypeMethodDescriptionComponentItemHandler.extractItem
(int slot, int amount, boolean simulate) IItemHandler.extractItem
(int slot, int amount, boolean simulate) Extracts an ItemStack from the given slot.ItemStackHandler.extractItem
(int slot, int amount, boolean simulate) SlotItemHandler.getItem()
final ItemStack
StackCopySlot.getItem()
protected ItemStack
ItemHandlerCopySlot.getStackCopy()
protected abstract ItemStack
StackCopySlot.getStackCopy()
Gets the itemstack from the storage.protected ItemStack
ComponentItemHandler.getStackFromContents
(ItemContainerContents contents, int slot) Retrieves a copy of a single stack from the underlying data component, returningEMPTY
if the component does not have a slot present.ComponentItemHandler.getStackInSlot
(int slot) IItemHandler.getStackInSlot
(int slot) Returns the ItemStack in a given slot.ItemStackHandler.getStackInSlot
(int slot) static ItemStack
VanillaInventoryCodeHooks.insertCrafterOutput
(Level level, BlockPos pos, CrafterBlockEntity crafterBlockEntity, ItemStack stack) Added capability support for the Crafter dispensing the resultComponentItemHandler.insertItem
(int slot, ItemStack toInsert, boolean simulate) IItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) Inserts an ItemStack into the given slot and return the remainder.static ItemStack
ItemHandlerHelper.insertItem
(IItemHandler dest, ItemStack stack, boolean simulate) ItemStackHandler.insertItem
(int slot, ItemStack stack, boolean simulate) VanillaHopperItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) static ItemStack
ItemHandlerHelper.insertItemStacked
(IItemHandler inventory, ItemStack stack, boolean simulate) Inserts the ItemStack into the inventory, filling up already present stacks first.private static ItemStack
VanillaInventoryCodeHooks.insertStack
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability supportprivate static ItemStack
VanillaInventoryCodeHooks.putStackInInventoryAllSlots
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) SlotItemHandler.remove
(int amount) final ItemStack
StackCopySlot.remove
(int amount) Methods in net.neoforged.neoforge.items with parameters of type ItemStackModifier and TypeMethodDescriptionstatic boolean
VanillaInventoryCodeHooks.dropperInsertHook
(Level level, BlockPos pos, DispenserBlockEntity dropper, int slot, ItemStack stack) Copied from BlockDropper#dispense and added capability supportint
ItemHandlerCopySlot.getMaxStackSize
(ItemStack stack) int
SlotItemHandler.getMaxStackSize
(ItemStack stack) protected int
ItemStackHandler.getStackLimit
(int slot, ItemStack stack) static void
ItemHandlerHelper.giveItemToPlayer
(Player player, ItemStack stack) giveItemToPlayer without preferred slotstatic void
ItemHandlerHelper.giveItemToPlayer
(Player player, ItemStack stack, int preferredSlot) Inserts the given itemstack into the players inventory.void
SlotItemHandler.initialize
(ItemStack stack) static ItemStack
VanillaInventoryCodeHooks.insertCrafterOutput
(Level level, BlockPos pos, CrafterBlockEntity crafterBlockEntity, ItemStack stack) Added capability support for the Crafter dispensing the resultComponentItemHandler.insertItem
(int slot, ItemStack toInsert, boolean simulate) IItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) Inserts an ItemStack into the given slot and return the remainder.static ItemStack
ItemHandlerHelper.insertItem
(IItemHandler dest, ItemStack stack, boolean simulate) ItemStackHandler.insertItem
(int slot, ItemStack stack, boolean simulate) VanillaHopperItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) static ItemStack
ItemHandlerHelper.insertItemStacked
(IItemHandler inventory, ItemStack stack, boolean simulate) Inserts the ItemStack into the inventory, filling up already present stacks first.private static ItemStack
VanillaInventoryCodeHooks.insertStack
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability supportboolean
ComponentItemHandler.isItemValid
(int slot, ItemStack stack) boolean
IItemHandler.isItemValid
(int slot, ItemStack stack) This function re-implements the vanilla functionContainer.canPlaceItem(int, ItemStack)
.boolean
ItemStackHandler.isItemValid
(int slot, ItemStack stack) boolean
boolean
protected void
ComponentItemHandler.onContentsChanged
(int slot, ItemStack oldStack, ItemStack newStack) Called fromComponentItemHandler.updateContents(net.minecraft.world.item.component.ItemContainerContents, net.minecraft.world.item.ItemStack, int)
after the stack stored in a slot has been updated.void
ItemHandlerCopySlot.onQuickCraft
(ItemStack oldStackIn, ItemStack newStackIn) void
SlotItemHandler.onQuickCraft
(ItemStack oldStackIn, ItemStack newStackIn) private static ItemStack
VanillaInventoryCodeHooks.putStackInInventoryAllSlots
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) void
final void
protected void
ItemHandlerCopySlot.setStackCopy
(ItemStack stack) protected abstract void
StackCopySlot.setStackCopy
(ItemStack stack) Sets the itemstack from the storage.void
ComponentItemHandler.setStackInSlot
(int slot, ItemStack stack) void
IItemHandlerModifiable.setStackInSlot
(int slot, ItemStack stack) Overrides the stack in the given slot.void
ItemStackHandler.setStackInSlot
(int slot, ItemStack stack) protected void
ComponentItemHandler.updateContents
(ItemContainerContents contents, ItemStack stack, int slot) Performs a copy and write operation on the underlying data component, changing the stack in the target slot.Constructor parameters in net.neoforged.neoforge.items with type arguments of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.items.wrapper
Methods in net.neoforged.neoforge.items.wrapper that return ItemStackModifier and TypeMethodDescriptionCombinedInvWrapper.extractItem
(int slot, int amount, boolean simulate) EmptyItemHandler.extractItem
(int slot, int amount, boolean simulate) EntityEquipmentInvWrapper.extractItem
(int slot, int amount, boolean simulate) ForwardingItemHandler.extractItem
(int slot, int amount, boolean simulate) InvWrapper.extractItem
(int slot, int amount, boolean simulate) RangedWrapper.extractItem
(int slot, int amount, boolean simulate) SidedInvWrapper.extractItem
(int slot, int amount, boolean simulate) RecipeWrapper.getItem
(int slot) Returns the stack in this slot.CombinedInvWrapper.getStackInSlot
(int slot) EmptyItemHandler.getStackInSlot
(int slot) EntityEquipmentInvWrapper.getStackInSlot
(int slot) ForwardingItemHandler.getStackInSlot
(int slot) InvWrapper.getStackInSlot
(int slot) RangedWrapper.getStackInSlot
(int slot) SidedInvWrapper.getStackInSlot
(int slot) CombinedInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) EmptyItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) EntityEquipmentInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) ForwardingItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) InvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) PlayerArmorInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) PlayerMainInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) RangedWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) SidedInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) Methods in net.neoforged.neoforge.items.wrapper with parameters of type ItemStackModifier and TypeMethodDescriptionprotected int
EntityEquipmentInvWrapper.getStackLimit
(int slot, ItemStack stack) CombinedInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) EmptyItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) EntityEquipmentInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) ForwardingItemHandler.insertItem
(int slot, ItemStack stack, boolean simulate) InvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) PlayerArmorInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) PlayerMainInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) RangedWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) SidedInvWrapper.insertItem
(int slot, ItemStack stack, boolean simulate) boolean
CombinedInvWrapper.isItemValid
(int slot, ItemStack stack) boolean
EmptyItemHandler.isItemValid
(int slot, ItemStack stack) boolean
EntityEquipmentInvWrapper.isItemValid
(int slot, ItemStack stack) boolean
ForwardingItemHandler.isItemValid
(int slot, ItemStack stack) boolean
InvWrapper.isItemValid
(int slot, ItemStack stack) boolean
RangedWrapper.isItemValid
(int slot, ItemStack stack) boolean
SidedInvWrapper.isItemValid
(int slot, ItemStack stack) int
SidedInvWrapper.InsertLimit.limitInsert
(int wrapperSlot, int invSlot, ItemStack stack) private void
SidedInvWrapper.setInventorySlotContents
(int slot, ItemStack stack) void
CombinedInvWrapper.setStackInSlot
(int slot, ItemStack stack) void
EmptyItemHandler.setStackInSlot
(int slot, ItemStack stack) void
EntityEquipmentInvWrapper.setStackInSlot
(int slot, ItemStack stack) void
InvWrapper.setStackInSlot
(int slot, ItemStack stack) void
RangedWrapper.setStackInSlot
(int slot, ItemStack stack) void
SidedInvWrapper.setStackInSlot
(int slot, ItemStack stack) -
Uses of ItemStack in net.neoforged.neoforge.oldtest
Fields in net.neoforged.neoforge.oldtest declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack[]
CreativeModeTabTest.CreativeModeColorTab.iconItems
Methods in net.neoforged.neoforge.oldtest that return ItemStackModifier and TypeMethodDescriptionCreativeModeTabTest.CreativeModeColorTab.getIconItem()
private static ItemStack
Methods in net.neoforged.neoforge.oldtest with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static void
FluidUtilTest.checkItemStack
(ItemStack stack, Item item, int count) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.block
Methods in net.neoforged.neoforge.oldtest.block with parameters of type ItemStackModifier and TypeMethodDescriptionFullPotsAccessorDemo.DioriteFlowerPotBlock.useItemOn
(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.client
Fields in net.neoforged.neoforge.oldtest.client declared as ItemStackMethods in net.neoforged.neoforge.oldtest.client that return types with arguments of type ItemStackModifier and TypeMethodDescriptionCustomTooltipTest.CustomItemWithTooltip.use
(Level level, Player player, InteractionHand hand) Methods in net.neoforged.neoforge.oldtest.client with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
CustomTooltipTest.CustomItemWithTooltip.appendHoverText
(ItemStack stack, Item.TooltipContext context, List<Component> components, TooltipFlag flag) @Nullable ResourceLocation
CustomArmorModelTest.EndermanArmorItem.getArmorTexture
(ItemStack stack, Entity entity, EquipmentSlot slot, ArmorMaterial.Layer layer, boolean innerModel) CustomTooltipTest.CustomItemWithTooltip.getTooltipImage
(ItemStack stack) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.client.model
Fields in net.neoforged.neoforge.oldtest.client.model declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStack
CustomItemDisplayContextTest.ItemHangerBlockEntity.heldItem
Methods in net.neoforged.neoforge.oldtest.client.model with parameters of type ItemStackModifier and TypeMethodDescriptionprotected ItemInteractionResult
MegaModelTest.TestBlock.useItemOn
(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.client.rendering
Methods in net.neoforged.neoforge.oldtest.client.rendering that return ItemStackModifier and TypeMethodDescriptionEntityRendererEventsTest.MyEntity.getItemBySlot
(EquipmentSlot p_21127_) Methods in net.neoforged.neoforge.oldtest.client.rendering that return types with arguments of type ItemStackMethods in net.neoforged.neoforge.oldtest.client.rendering with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
CustomItemDecorationsTest.StackSizeDurabilityBar.render
(GuiGraphics graphics, Font font, ItemStack stack, int xOffset, int yOffset) void
EntityRendererEventsTest.MyEntity.setItemSlot
(EquipmentSlot p_21036_, ItemStack p_21037_) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.entity.player
Methods in net.neoforged.neoforge.oldtest.entity.player with parameters of type ItemStackModifier and TypeMethodDescriptionItemUseAnimationTest.ThingItem.getUseAnimation
(ItemStack stack) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.fluid
Methods in net.neoforged.neoforge.oldtest.fluid that return ItemStackModifier and TypeMethodDescriptionNewFluidTest.FluidloggableBlock.pickupBlock
(@Nullable Player player, LevelAccessor worldIn, BlockPos pos, BlockState state) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.item
Methods in net.neoforged.neoforge.oldtest.item that return types with arguments of type ItemStackModifier and TypeMethodDescriptionCustomFluidContainerTest.CustomFluidContainer.use
(Level level, Player player, InteractionHand hand) CustomShieldTest.CustomShieldItem.use
(Level world, Player player, InteractionHand hand) StopUsingItemTest.InvertedTelescope.use
(Level level, Player player, InteractionHand hand) Methods in net.neoforged.neoforge.oldtest.item with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
CustomElytraTest.CustomElytra.canElytraFly
(ItemStack stack, LivingEntity entity) boolean
CustomShieldTest.CustomShieldItem.canPerformAction
(ItemStack stack, ItemAbility itemAbility) boolean
CustomElytraTest.CustomElytra.elytraFlightTick
(ItemStack stack, LivingEntity entity, int flightTicks) MayFlyAttributeTest.InvertedTelescope.getDefaultAttributeModifiers
(ItemStack stack) CustomElytraTest.CustomElytraLayer.getElytraTexture
(ItemStack stack, AbstractClientPlayer entity) @Nullable EquipmentSlot
CustomElytraTest.CustomElytra.getEquipmentSlot
(ItemStack stack) CustomShieldTest.CustomShieldItem.getUseAnimation
(ItemStack stack) StopUsingItemTest.InvertedTelescope.getUseAnimation
(ItemStack stack) int
CustomShieldTest.CustomShieldItem.getUseDuration
(ItemStack stack, LivingEntity entity) int
StopUsingItemTest.InvertedTelescope.getUseDuration
(ItemStack stack, LivingEntity entity) boolean
CustomElytraTest.CustomElytraLayer.shouldRender
(ItemStack stack, AbstractClientPlayer entity) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.misc
Methods in net.neoforged.neoforge.oldtest.misc that return ItemStackModifier and TypeMethodDescriptionContainerTypeTest.TestContainer.quickMoveStack
(Player p_38941_, int p_38942_) -
Uses of ItemStack in net.neoforged.neoforge.oldtest.recipebook
Fields in net.neoforged.neoforge.oldtest.recipebook declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStack
RecipeBookTestRecipe.Ingredients.result
The field for theresult
record component.Methods in net.neoforged.neoforge.oldtest.recipebook that return ItemStackModifier and TypeMethodDescriptionRecipeBookTestRecipe.assemble
(CraftingInput p_44001_, HolderLookup.Provider registryAccess) RecipeBookTestRecipe.getResultItem
(HolderLookup.Provider registryAccess) RecipeBookTestRecipe.getToastSymbol()
RecipeBookTestMenu.quickMoveStack
(Player player, int idx) Mostly copied fromCraftingMenu.quickMoveStack(net.minecraft.world.entity.player.Player, int)
RecipeBookTestRecipe.Ingredients.result()
Returns the value of theresult
record component.Methods in net.neoforged.neoforge.oldtest.recipebook with parameters of type ItemStackModifier and TypeMethodDescriptionboolean
RecipeBookTestMenu.canTakeItemForPickAll
(ItemStack stack, Slot slot) Constructors in net.neoforged.neoforge.oldtest.recipebook with parameters of type ItemStackModifierConstructorDescriptionIngredients
(String group, List<String> pattern, Map<String, Ingredient> recipe, ItemStack result) Creates an instance of aIngredients
record class. -
Uses of ItemStack in net.neoforged.neoforge.registries
Methods in net.neoforged.neoforge.registries that return ItemStack -
Uses of ItemStack in net.neoforged.testframework.condition
Methods in net.neoforged.testframework.condition that return types with arguments of type ItemStackMethods in net.neoforged.testframework.condition with parameters of type ItemStack -
Uses of ItemStack in net.neoforged.testframework.gametest
Methods in net.neoforged.testframework.gametest with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
ExtendedGameTestHelper.breakBlock
(BlockPos relativePos, ItemStack tool, @Nullable Entity breakingEntity) void
void
void
invalid @link
IBakedModelExtension.getRenderTypes(ItemStack, boolean)
.