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).
-
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, @Nullable Identifier pBackground, AdvancementType pType, boolean pShowToast, boolean pAnnounceChat, boolean pHidden) Constructors in net.minecraft.advancements with parameters of type ItemStackModifierConstructorDescriptionDisplayInfo(ItemStack pIcon, Component pTitle, Component pDescription, Optional<ClientAsset.ResourceTexture> pBackground, AdvancementType pType, boolean pShowToast, boolean pAnnounceChat, boolean pHidden) -
Uses of ItemStack in net.minecraft.advancements.criterion
Methods in net.minecraft.advancements.criterion with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanBeeNestDestroyedTrigger.TriggerInstance.matches(BlockState pState, ItemStack pStack, int pNumBees) booleanbooleanbooleanbooleanFishingRodHookedTrigger.TriggerInstance.matches(ItemStack pRod, LootContext pContext, Collection<ItemStack> pStacks) booleanInventoryChangeTrigger.TriggerInstance.matches(Inventory pInventory, ItemStack pStack, int pFull, int pEmpty, int pOccupied) booleanbooleanKilledByArrowTrigger.TriggerInstance.matches(Collection<LootContext> pContext, int pUniqueEntityTypes, @Nullable ItemStack pFiredFromWeapon) booleanPickedUpItemTrigger.TriggerInstance.matches(ServerPlayer pPlayer, ItemStack pStack, LootContext pContext) booleanPlayerInteractTrigger.TriggerInstance.matches(ItemStack pItem, LootContext pLootContext) booleanbooleanTradeTrigger.TriggerInstance.matches(LootContext pContext, ItemStack pStack) booleanbooleanbooleanvoidAnyBlockInteractionTrigger.trigger(ServerPlayer pPlayer, BlockPos pPos, ItemStack pStack) voidBeeNestDestroyedTrigger.trigger(ServerPlayer pPlayer, BlockState pState, ItemStack pStack, int pNumBees) voidConsumeItemTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem) voidEnchantedItemTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem, int pLevelsSpent) voidFilledBucketTrigger.trigger(ServerPlayer pPlayer, ItemStack pStack) voidFishingRodHookedTrigger.trigger(ServerPlayer pPlayer, ItemStack pRod, FishingHook pEntity, Collection<ItemStack> pStacks) voidInventoryChangeTrigger.trigger(ServerPlayer pPlayer, Inventory pInventory, ItemStack pStack) private voidInventoryChangeTrigger.trigger(ServerPlayer pPlayer, Inventory pInventory, ItemStack pStack, int pFull, int pEmpty, int pOccupied) voidItemDurabilityTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem, int pNewDurability) voidItemUsedOnLocationTrigger.trigger(ServerPlayer pPlayer, BlockPos pPos, ItemStack pStack) voidKilledByArrowTrigger.trigger(ServerPlayer pPlayer, Collection<Entity> pVictims, @Nullable ItemStack pFiredFromWeapon) voidPickedUpItemTrigger.trigger(ServerPlayer pPlayer, ItemStack pStack, @Nullable Entity pEntity) voidPlayerInteractTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem, Entity pEntity) voidShotCrossbowTrigger.trigger(ServerPlayer pShooter, ItemStack pStack) voidTradeTrigger.trigger(ServerPlayer pPlayer, AbstractVillager pVillager, ItemStack pItem) voidUsedTotemTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem) voidUsingItemTrigger.trigger(ServerPlayer pPlayer, ItemStack pItem) Method parameters in net.minecraft.advancements.criterion with type arguments of type ItemStackModifier and TypeMethodDescriptionbooleanFishingRodHookedTrigger.TriggerInstance.matches(ItemStack pRod, LootContext pContext, Collection<ItemStack> pStacks) (package private) booleanRecipeCraftedTrigger.TriggerInstance.matches(ResourceKey<Recipe<?>> pRecipeId, List<ItemStack> pIngredients) voidFishingRodHookedTrigger.trigger(ServerPlayer pPlayer, ItemStack pRod, FishingHook pEntity, Collection<ItemStack> pStacks) voidRecipeCraftedTrigger.trigger(ServerPlayer pPlayer, ResourceKey<Recipe<?>> pRecipeId, List<ItemStack> pIngredients) -
Uses of ItemStack in net.minecraft.client.color.item
Methods in net.minecraft.client.color.item with parameters of type ItemStackModifier and TypeMethodDescriptionintConstant.calculate(ItemStack p_387612_, @Nullable ClientLevel p_390387_, @Nullable LivingEntity p_390469_) intCustomModelDataSource.calculate(ItemStack p_387541_, @Nullable ClientLevel p_390516_, @Nullable LivingEntity p_390366_) intDye.calculate(ItemStack p_387455_, @Nullable ClientLevel p_390508_, @Nullable LivingEntity p_390428_) intFirework.calculate(ItemStack p_387104_, @Nullable ClientLevel p_390445_, @Nullable LivingEntity p_390517_) intGrassColorSource.calculate(ItemStack p_388684_, @Nullable ClientLevel p_390380_, @Nullable LivingEntity p_390527_) intItemTintSource.calculate(ItemStack pStack, @Nullable ClientLevel pLevel, @Nullable LivingEntity pEntity) intMapColor.calculate(ItemStack p_388784_, @Nullable ClientLevel p_390518_, @Nullable LivingEntity p_390370_) intPotion.calculate(ItemStack p_387621_, @Nullable ClientLevel p_390426_, @Nullable LivingEntity p_390389_) intTeamColor.calculate(ItemStack p_390385_, @Nullable ClientLevel p_390462_, @Nullable LivingEntity p_390429_) -
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 TypeMethodDescriptionbooleanBundleMouseActions.onMouseScrolled(double p_360390_, double p_362650_, int p_363161_, ItemStack p_364763_) booleanItemSlotMouseAction.onMouseScrolled(double pXOffset, double pYOffset, int pHoveredSlotIndex, ItemStack pHoveredSlotItem) voidGuiGraphics.renderFakeItem(ItemStack pStack, int pX, int pY) Renders a fake item stack at the specified coordinates.voidGuiGraphics.renderFakeItem(ItemStack pStack, int pX, int pY, int pSeed) private voidGuiGraphics.renderItem(@Nullable LivingEntity pEntity, @Nullable 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.voidGuiGraphics.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.voidGuiGraphics.renderItem(ItemStack pStack, int pX, int pY) Renders an item stack at the specified coordinates.voidGuiGraphics.renderItem(ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack at the specified coordinates with a random seed.private voidGuiGraphics.renderItemBar(ItemStack pStack, int pX, int pY) private voidGuiGraphics.renderItemCooldown(ItemStack pStack, int pX, int pY) private voidGuiGraphics.renderItemCount(Font pFont, ItemStack pStack, int pX, int pY, @Nullable String pText) voidGuiGraphics.renderItemDecorations(Font pFont, ItemStack pStack, int pX, int pY) Renders additional decorations for an item stack at the specified coordinates.voidGuiGraphics.renderItemDecorations(Font pFont, ItemStack pStack, int pX, int pY, @Nullable String pText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.private voidGui.renderSlot(GuiGraphics pGuiGraphics, int pX, int pY, DeltaTracker pDeltaTracker, Player pPlayer, ItemStack pStack, int pSeed) voidGuiGraphics.renderTooltip(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, @Nullable Identifier pBackground, ItemStack tooltipStack) voidGuiGraphics.setComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack) voidGuiGraphics.setComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack, @Nullable Identifier backgroundTexture) voidGuiGraphics.setComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack) voidGuiGraphics.setComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack, @Nullable Identifier backgroundTexture) voidGuiGraphics.setTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY) voidGuiGraphics.setTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, @Nullable Identifier backgroundTexture) voidGuiGraphics.setTooltipForNextFrame(Font pFont, ItemStack pStack, int pX, int pY) private voidBundleMouseActions.toggleSelectedBundleItem(ItemStack pStack, int pIndex, int pNextIndex) voidBundleMouseActions.unselectedBundleItem(ItemStack pBundle, int pSlotIndex) -
Uses of ItemStack in net.minecraft.client.gui.components
Fields in net.minecraft.client.gui.components declared as ItemStackConstructors in net.minecraft.client.gui.components with parameters of type ItemStackModifierConstructorDescriptionItemDisplayWidget(Minecraft pMinecraft, int pOffsetX, int pOffsetY, int pWidth, int pHeight, Component pMessage, ItemStack pItemStack, boolean pDecorations, boolean pTooltip) -
Uses of ItemStack in net.minecraft.client.gui.components.toasts
Fields in net.minecraft.client.gui.components.toasts declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackRecipeToast.Entry.categoryItemThe field for thecategoryItemrecord component.private final ItemStackRecipeToast.Entry.unlockedItemThe field for theunlockedItemrecord component.Methods in net.minecraft.client.gui.components.toasts that return ItemStackModifier and TypeMethodDescriptionRecipeToast.Entry.categoryItem()Returns the value of thecategoryItemrecord component.RecipeToast.Entry.unlockedItem()Returns the value of theunlockedItemrecord component.Methods in net.minecraft.client.gui.components.toasts with parameters of type ItemStackModifier and TypeMethodDescriptionprivate voidConstructors in net.minecraft.client.gui.components.toasts with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.client.gui.screens
Methods in net.minecraft.client.gui.screens that return ItemStackModifier and TypeMethodDescriptionprivate ItemStackCreateFlatWorldScreen.DetailsList.LayerEntry.getDisplayItem(BlockState pState) Methods in net.minecraft.client.gui.screens with parameters of type ItemStackModifier and TypeMethodDescriptionprivate voidCreateFlatWorldScreen.DetailsList.LayerEntry.blitSlot(GuiGraphics pGuiGraphics, int pX, int pY, ItemStack pDisplayItem) Screen.getTooltipFromItem(Minecraft pMinecraft, ItemStack pItem) -
Uses of ItemStack in net.minecraft.client.gui.screens.achievement
Constructors in net.minecraft.client.gui.screens.achievement with parameters of type ItemStack -
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 TypeMethodDescriptionvoidAdvancementTabType.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 TypeFieldDescriptionprivate final ItemStackGameModeSwitcherScreen.GameModeIcon.renderStackConstructors in net.minecraft.client.gui.screens.debug with parameters of type ItemStackModifierConstructorDescriptionprivateGameModeIcon(Component pName, GameType pMode, 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 ItemStackLoomScreen.bannerStackprivate final ItemStackBookEditScreen.bookprivate ItemStackAbstractContainerScreen.draggingItemUsed when touchscreen is enabledprivate ItemStackLoomScreen.dyeStackprivate final ItemStackAbstractContainerScreen.SnapbackData.itemThe field for theitemrecord component.private ItemStackEnchantmentScreen.lastprivate ItemStackAbstractContainerScreen.lastQuickMovedprivate ItemStackLoomScreen.patternStackFields in net.minecraft.client.gui.screens.inventory with type parameters of type ItemStackModifier and TypeFieldDescriptionfinal NonNullList<ItemStack> CreativeModeInventoryScreen.ItemPickerMenu.itemsThe list of items in this container.Methods in net.minecraft.client.gui.screens.inventory that return ItemStackModifier and TypeMethodDescriptionCreativeModeInventoryScreen.ItemPickerMenu.getCarried()CreativeModeInventoryScreen.SlotWrapper.getItem()AbstractContainerScreen.SnapbackData.item()Returns the value of theitemrecord component.CreativeModeInventoryScreen.ItemPickerMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis 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 TypeMethodDescriptionbooleanCreativeModeInventoryScreen.ItemPickerMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.static @Nullable BookViewScreen.BookAccessintCreativeModeInventoryScreen.SlotWrapper.getMaxStackSize(ItemStack pStack) AbstractContainerScreen.getTooltipFromContainerItem(ItemStack pStack) CreativeModeInventoryScreen.getTooltipFromContainerItem(ItemStack p_281769_) booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.voidprivate voidMerchantScreen.renderAndDecorateCostA(GuiGraphics pGuiGraphics, ItemStack pRealCost, ItemStack pBaseCost, int pX, int pY) private voidAbstractContainerScreen.renderFloatingItem(GuiGraphics pGuiGraphics, ItemStack pStack, int pX, int pY, @Nullable String pText) protected voidAbstractContainerScreen.renderSlotContents(GuiGraphics guiGraphics, ItemStack itemstack, Slot slot, @Nullable String countString) voidHelper method to put a stack in the slot.voidCreativeModeInventoryScreen.SlotWrapper.setByPlayer(ItemStack p_271008_, ItemStack p_299868_) voidCreativeModeInventoryScreen.ItemPickerMenu.setCarried(ItemStack p_169751_) private booleanAbstractContainerScreen.showTooltipWithItemInHand(ItemStack pStack) voidAnvilScreen.slotChanged(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.voidCreativeInventoryListener.slotChanged(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.voidItemCombinerScreen.slotChanged(AbstractContainerMenu pContainerToSend, int pSlotInd, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.voidSmithingScreen.slotChanged(AbstractContainerMenu p_267217_, int p_266842_, ItemStack p_267208_) private voidSmithingScreen.updateArmorStandPreview(ItemStack pStack) Method parameters in net.minecraft.client.gui.screens.inventory with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate voidCreativeModeInventoryScreen.refreshCurrentTabContents(Collection<ItemStack> pItems) Constructors in net.minecraft.client.gui.screens.inventory with parameters of type ItemStackModifierConstructorDescriptionBookEditScreen(Player pOwner, ItemStack pBook, InteractionHand pHand, WritableBookContent pContent) (package private)SnapbackData(ItemStack item, Vector2i start, Vector2i end, long time) Creates an instance of aSnapbackDatarecord class. -
Uses of ItemStack in net.minecraft.client.gui.screens.inventory.tooltip
Methods in net.minecraft.client.gui.screens.inventory.tooltip that return types with arguments of type ItemStackMethod parameters in net.minecraft.client.gui.screens.inventory.tooltip with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate intClientBundleTooltip.getAmountOfHiddenItems(List<ItemStack> pShownItems) private voidClientBundleTooltip.renderSlot(int pSlotIndex, int pX, int pY, List<ItemStack> pShownItems, int pSeed, Font pFont, GuiGraphics pGuiGraphics) private static booleanClientBundleTooltip.shouldRenderItemSlot(List<ItemStack> pShownItems, int pSlotIndex) -
Uses of ItemStack in net.minecraft.client.gui.screens.recipebook
Fields in net.minecraft.client.gui.screens.recipebook declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackRecipeBookComponent.TabInfo.primaryIconThe field for theprimaryIconrecord component.Fields in net.minecraft.client.gui.screens.recipebook with type parameters of type ItemStackModifier and TypeFieldDescriptionRecipeButton.ResolvedEntry.displayItemsThe field for thedisplayItemsrecord component.OverlayRecipeComponent.OverlayRecipeButton.Pos.ingredientsThe field for theingredientsrecord component.GhostSlots.GhostSlot.itemsThe field for theitemsrecord component.RecipeBookComponent.TabInfo.secondaryIconThe field for thesecondaryIconrecord component.Methods in net.minecraft.client.gui.screens.recipebook that return ItemStackModifier and TypeMethodDescriptionRecipeButton.getDisplayStack()GhostSlots.GhostSlot.getItem(int pIndex) RecipeBookComponent.TabInfo.primaryIcon()Returns the value of theprimaryIconrecord component.OverlayRecipeComponent.OverlayRecipeButton.Pos.selectIngredient(int pIndex) RecipeButton.ResolvedEntry.selectItem(int pIndex) Methods in net.minecraft.client.gui.screens.recipebook that return types with arguments of type ItemStackModifier and TypeMethodDescriptionRecipeButton.ResolvedEntry.displayItems()Returns the value of thedisplayItemsrecord component.OverlayRecipeComponent.OverlayRecipeButton.Pos.ingredients()Returns the value of theingredientsrecord component.GhostSlots.GhostSlot.items()Returns the value of theitemsrecord component.RecipeBookComponent.TabInfo.secondaryIcon()Returns the value of thesecondaryIconrecord component.Methods in net.minecraft.client.gui.screens.recipebook with parameters of type ItemStackMethod parameters in net.minecraft.client.gui.screens.recipebook with type arguments of type ItemStackModifier and TypeMethodDescriptionprotected static OverlayRecipeComponent.OverlayRecipeButton.PosOverlayRecipeComponent.OverlayRecipeButton.createGridPos(int pX, int pY, List<ItemStack> pPossibleItems) Constructors in net.minecraft.client.gui.screens.recipebook with parameters of type ItemStackModifierConstructorDescriptionTabInfo(ItemStack primaryIcon, Optional<ItemStack> secondaryIcon, ExtendedRecipeBookCategory category) Creates an instance of aTabInforecord class.Constructor parameters in net.minecraft.client.gui.screens.recipebook with type arguments of type ItemStackModifierConstructorDescription(package private)Creates an instance of aGhostSlotrecord class.Creates an instance of aPosrecord class.(package private)ResolvedEntry(RecipeDisplayId id, List<ItemStack> displayItems) Creates an instance of aResolvedEntryrecord class.TabInfo(ItemStack primaryIcon, Optional<ItemStack> secondaryIcon, ExtendedRecipeBookCategory category) Creates an instance of aTabInforecord class. -
Uses of ItemStack in net.minecraft.client.model
Methods in net.minecraft.client.model with parameters of type ItemStackModifier and TypeMethodDescription<S extends ArmedEntityRenderState>
voidHumanoidModel.ArmPose.animateUseItem(S pRenderState, PoseStack pPoseStack, float pUseTime, HumanoidArm pArm, ItemStack pItem) -
Uses of ItemStack in net.minecraft.client.model.effects
Methods in net.minecraft.client.model.effects with parameters of type ItemStackModifier and TypeMethodDescriptionstatic voidSpearAnimations.firstPersonUse(float pTicksSinceEnemyHit, PoseStack pPoseStack, float pUseTime, HumanoidArm pArm, ItemStack pItem) static <T extends HumanoidRenderState>
voidSpearAnimations.thirdPersonHandUse(ModelPart pArm, ModelPart pHead, boolean pIsLeftArm, ItemStack pStack, T pRenderState) static <S extends ArmedEntityRenderState>
voidSpearAnimations.thirdPersonUseItem(S pRenderState, PoseStack pPoseStack, float pUseTime, HumanoidArm pArm, ItemStack pItem) -
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.creativeByNameSearchprivate CompletableFuture<SearchTree<ItemStack>> SessionSearchTrees.creativeByTagSearchMethods 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 TypeMethodDescriptionvoidMultiPlayerGameMode.handleCreativeModeItemAdd(ItemStack pStack, int pSlotId) Used in PlayerControllerMP to update the server with an ItemStack in a slot.voidMultiPlayerGameMode.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) voidSessionSearchTrees.updateCreativeTags(List<ItemStack> pItems) voidSessionSearchTrees.updateCreativeTags(List<ItemStack> pItems, SessionSearchTrees.Key key) voidSessionSearchTrees.updateCreativeTooltips(HolderLookup.Provider pRegistries, List<ItemStack> pItems) voidSessionSearchTrees.updateCreativeTooltips(HolderLookup.Provider pRegistries, List<ItemStack> pItems, SessionSearchTrees.Key key) -
Uses of ItemStack in net.minecraft.client.particle
Methods in net.minecraft.client.particle with parameters of type ItemStackModifier and TypeMethodDescriptionprotected TextureAtlasSpriteBreakingItemParticle.ItemParticleProvider.getSprite(ItemStack pStack, ClientLevel pLevel, RandomSource pRandom) -
Uses of ItemStack in net.minecraft.client.player
Methods in net.minecraft.client.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoidLocalPlayer.handleCreativeModeItemDrop(ItemStack p_365052_) voidLocalPlayer.openItemGui(ItemStack pStack, InteractionHand pHand) voidLocalPlayer.updateTutorialInventoryAction(ItemStack p_172532_, ItemStack p_172533_, ClickAction p_172534_) -
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 @Nullable ItemStackScreenEffectRenderer.itemActivationItemprivate ItemStackItemInHandRenderer.mainHandItemprivate ItemStackItemInHandRenderer.offHandItemMethods in net.minecraft.client.renderer with parameters of type ItemStackModifier and TypeMethodDescriptionprivate voidItemInHandRenderer.applyEatTransform(PoseStack pPoseStack, float pPartialTick, HumanoidArm pArm, ItemStack pStack, Player pPlayer) voidGameRenderer.displayItemActivation(ItemStack pStack) voidScreenEffectRenderer.displayItemActivation(ItemStack pItem, RandomSource pRandom) private static booleanItemInHandRenderer.isChargedCrossbow(ItemStack pStack) private voidItemInHandRenderer.renderArmWithItem(AbstractClientPlayer pPlayer, float pPartialTick, float pPitch, InteractionHand pHand, float pSwingProgress, ItemStack pItem, float pEquippedProgress, PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight) voidItemInHandRenderer.renderItem(LivingEntity pEntity, ItemStack pStack, ItemDisplayContext pDisplayContext, PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight) private voidItemInHandRenderer.renderMap(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight, ItemStack pStack) private voidItemInHandRenderer.renderOneHandedMap(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight, float pEquippedProgress, HumanoidArm pArm, float pSwingProgress, ItemStack pStack) private booleanItemInHandRenderer.shouldInstantlyReplaceVisibleItem(ItemStack pOldItem, ItemStack pNewItem) -
Uses of ItemStack in net.minecraft.client.renderer.entity
Methods in net.minecraft.client.renderer.entity that return ItemStackModifier and TypeMethodDescriptionprivate static ItemStackHumanoidMobRenderer.getEquipmentIfRenderable(LivingEntity pEntity, EquipmentSlot pSlot) -
Uses of ItemStack in net.minecraft.client.renderer.entity.layers
Fields in net.minecraft.client.renderer.entity.layers with type parameters of type ItemStackMethods in net.minecraft.client.renderer.entity.layers with parameters of type ItemStackModifier and TypeMethodDescriptionprivate booleanCapeLayer.hasLayer(ItemStack pStack, EquipmentClientInfo.LayerType pLayer) private voidWolfArmorLayer.maybeRenderCracks(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight, ItemStack pArmorStack, Model<WolfRenderState> pModel, WolfRenderState pRenderState) private voidHumanoidArmorLayer.renderArmorPiece(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, ItemStack pItem, EquipmentSlot pSlot, int pPackedLight, S pRenderState) private voidLlamaDecorLayer.renderEquipment(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, LlamaRenderState pRenderState, ItemStack pItem, ResourceKey<EquipmentAsset> pEquipmentAseet, int pPackedLight) <S> voidEquipmentLayerRenderer.renderLayers(EquipmentClientInfo.LayerType pLayerType, ResourceKey<EquipmentAsset> pEquipmentAsset, Model<? super S> pArmorModel, S pRenderState, ItemStack pItem, PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight, int pOutlineColor) <S> voidEquipmentLayerRenderer.renderLayers(EquipmentClientInfo.LayerType pLayerType, ResourceKey<EquipmentAsset> pEquipmentAsset, Model<? super S> pArmorModel, S pRenderState, ItemStack pItem, PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight, @Nullable Identifier pTexture, int pOutlineColor, int pKey) static booleanHumanoidArmorLayer.shouldRender(ItemStack pStack, EquipmentSlot pSlot) protected voidItemInHandLayer.submitArmWithItem(S pRenderState, ItemStackRenderState pItemStackRenderState, ItemStack pItem, HumanoidArm pArm, PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, int pPackedLight) protected voidPlayerItemInHandLayer.submitArmWithItem(S p_454979_, ItemStackRenderState p_434802_, ItemStack p_455869_, HumanoidArm p_434886_, PoseStack p_435466_, SubmitNodeCollector p_433358_, int p_436055_) Constructor parameters in net.minecraft.client.renderer.entity.layers with type arguments of type ItemStackModifierConstructorDescriptionSimpleEquipmentLayer(RenderLayerParent<S, RM> pRenderer, EquipmentLayerRenderer pEquipmentRenderer, EquipmentClientInfo.LayerType pLayer, Function<S, ItemStack> pItemGetter, EM pAdultModel, @Nullable EM pBabyModel) SimpleEquipmentLayer(RenderLayerParent<S, RM> pRenderer, EquipmentLayerRenderer pEquipmentRenderer, EquipmentClientInfo.LayerType pLayer, Function<S, ItemStack> pItemGetter, EM pAdultModel, @Nullable EM pBabyModel, int pOrder) -
Uses of ItemStack in net.minecraft.client.renderer.entity.player
Methods in net.minecraft.client.renderer.entity.player with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static HumanoidModel.ArmPoseAvatarRenderer.getArmPose(Avatar pAvatar, ItemStack pHandItem, InteractionHand pHand) -
Uses of ItemStack in net.minecraft.client.renderer.entity.state
Fields in net.minecraft.client.renderer.entity.state declared as ItemStackModifier and TypeFieldDescriptionEquineRenderState.bodyArmorItemNautilusRenderState.bodyArmorItemWolfRenderState.bodyArmorItemHappyGhastRenderState.bodyItemLlamaRenderState.bodyItemHumanoidRenderState.chestEquipmentHumanoidRenderState.feetEquipmentHumanoidRenderState.headEquipmentArmedEntityRenderState.leftHandItemStackHumanoidRenderState.legsEquipmentArmedEntityRenderState.rightHandItemStackCamelRenderState.saddleEquineRenderState.saddleNautilusRenderState.saddlePigRenderState.saddleStriderRenderState.saddleMethods in net.minecraft.client.renderer.entity.state that return ItemStackModifier and TypeMethodDescriptionArmedEntityRenderState.getMainHandItemStack()ArmedEntityRenderState.getUseItemStackForArm(HumanoidArm pArm) UndeadRenderState.getUseItemStackForArm(HumanoidArm p_454706_) Methods in net.minecraft.client.renderer.entity.state with parameters of type ItemStackModifier and TypeMethodDescriptionvoidItemClusterRenderState.extractItemGroupRenderState(Entity pEntity, ItemStack pStack, ItemModelResolver pItemModelResolver) static intItemClusterRenderState.getSeedForItemStack(ItemStack pStack) -
Uses of ItemStack in net.minecraft.client.renderer.item
Fields in net.minecraft.client.renderer.item with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final Function<ItemStack, RenderType> BlockModelWrapper.BLOCK_RENDER_TYPE_GETTERprivate static final Function<ItemStack, RenderType> BlockModelWrapper.ITEM_RENDER_TYPE_GETTERprivate final Function<ItemStack, RenderType> BlockModelWrapper.renderTypeMethods in net.minecraft.client.renderer.item that return types with arguments of type ItemStackModifier and TypeMethodDescription(package private) static Function<ItemStack, RenderType> BlockModelWrapper.detectRenderType(List<BakedQuad> pQuads) Methods in net.minecraft.client.renderer.item with parameters of type ItemStackModifier and TypeMethodDescriptionvoidItemModelResolver.appendItemLayers(ItemStackRenderState pRenderState, ItemStack pStack, ItemDisplayContext pDisplayContext, @Nullable Level pLevel, @Nullable ItemOwner pOwner, int pSeed) private static booleanBlockModelWrapper.hasSpecialAnimatedTexture(ItemStack pStack) booleanItemModelResolver.shouldPlaySwapAnimation(ItemStack pStack) floatItemModelResolver.swapAnimationScale(ItemStack pStack) voidBlockModelWrapper.update(ItemStackRenderState p_386488_, ItemStack p_386443_, ItemModelResolver p_388726_, ItemDisplayContext p_388231_, @Nullable ClientLevel p_387522_, @Nullable ItemOwner p_434975_, int p_388300_) voidBundleSelectedItemSpecialRenderer.update(ItemStackRenderState p_387618_, ItemStack p_386990_, ItemModelResolver p_386923_, ItemDisplayContext p_387805_, @Nullable ClientLevel p_387156_, @Nullable ItemOwner p_434149_, int p_386711_) voidCompositeModel.update(ItemStackRenderState p_386893_, ItemStack p_387281_, ItemModelResolver p_388412_, ItemDisplayContext p_388059_, @Nullable ClientLevel p_388484_, @Nullable ItemOwner p_433106_, int p_387330_) voidConditionalItemModel.update(ItemStackRenderState p_387756_, ItemStack p_387286_, ItemModelResolver p_386644_, ItemDisplayContext p_387754_, @Nullable ClientLevel p_388301_, @Nullable ItemOwner p_435949_, int p_387025_) voidEmptyModel.update(ItemStackRenderState p_390492_, ItemStack p_390354_, ItemModelResolver p_390507_, ItemDisplayContext p_390501_, @Nullable ClientLevel p_390403_, @Nullable ItemOwner p_435178_, int p_390493_) voidItemModel.update(ItemStackRenderState pRenderState, ItemStack pStack, ItemModelResolver pItemModelResolver, ItemDisplayContext pDisplayContext, @Nullable ClientLevel pLevel, @Nullable ItemOwner pOwner, int pSeed) voidMissingItemModel.update(ItemStackRenderState p_386627_, ItemStack p_388292_, ItemModelResolver p_388302_, ItemDisplayContext p_388518_, @Nullable ClientLevel p_387367_, @Nullable ItemOwner p_435350_, int p_388913_) voidRangeSelectItemModel.update(ItemStackRenderState p_387732_, ItemStack p_386891_, ItemModelResolver p_388786_, ItemDisplayContext p_387570_, @Nullable ClientLevel p_388512_, @Nullable ItemOwner p_435703_, int p_388577_) voidSelectItemModel.update(ItemStackRenderState p_387349_, ItemStack p_386764_, ItemModelResolver p_388842_, ItemDisplayContext p_386961_, @Nullable ClientLevel p_386907_, @Nullable ItemOwner p_435803_, int p_386608_) voidSpecialModelWrapper.update(ItemStackRenderState p_388134_, ItemStack p_387781_, ItemModelResolver p_387931_, ItemDisplayContext p_388057_, @Nullable ClientLevel p_388213_, @Nullable ItemOwner p_435146_, int p_387759_) voidItemModelResolver.updateForLiving(ItemStackRenderState pRenderState, ItemStack pStack, ItemDisplayContext pDisplayContext, LivingEntity pEntity) voidItemModelResolver.updateForNonLiving(ItemStackRenderState pRenderState, ItemStack pStack, ItemDisplayContext pDisplayContext, Entity pEntity) voidItemModelResolver.updateForTopItem(ItemStackRenderState pRenderState, ItemStack pStack, ItemDisplayContext pDisplayContext, @Nullable Level pLevel, @Nullable ItemOwner pOwner, int pSeed) Constructor parameters in net.minecraft.client.renderer.item with type arguments of type ItemStackModifierConstructorDescriptionBlockModelWrapper(List<ItemTintSource> pTints, List<BakedQuad> pQuads, ModelRenderProperties pProperties, Function<ItemStack, RenderType> pRenderType) -
Uses of ItemStack in net.minecraft.client.renderer.item.properties.conditional
Methods in net.minecraft.client.renderer.item.properties.conditional with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanBroken.get(ItemStack p_386887_, @Nullable ClientLevel p_388949_, @Nullable LivingEntity p_386628_, int p_387040_, ItemDisplayContext p_389458_) booleanBundleHasSelectedItem.get(ItemStack p_387343_, @Nullable ClientLevel p_386467_, @Nullable LivingEntity p_387284_, int p_388377_, ItemDisplayContext p_389630_) booleanComponentMatches.get(ItemStack p_399920_, @Nullable ClientLevel p_399844_, @Nullable LivingEntity p_399573_, int p_400095_, ItemDisplayContext p_400208_) booleanCustomModelDataProperty.get(ItemStack p_387675_, @Nullable ClientLevel p_387669_, @Nullable LivingEntity p_388044_, int p_388257_, ItemDisplayContext p_389481_) booleanDamaged.get(ItemStack p_388323_, @Nullable ClientLevel p_388659_, @Nullable LivingEntity p_386950_, int p_387664_, ItemDisplayContext p_389573_) booleanExtendedView.get(ItemStack p_389501_, @Nullable ClientLevel p_389409_, @Nullable LivingEntity p_389583_, int p_389502_, ItemDisplayContext p_389679_) booleanFishingRodCast.get(ItemStack p_388347_, @Nullable ClientLevel p_388341_, @Nullable LivingEntity p_386847_, int p_386531_, ItemDisplayContext p_389619_) booleanHasComponent.get(ItemStack p_388222_, @Nullable ClientLevel p_386715_, @Nullable LivingEntity p_386871_, int p_387461_, ItemDisplayContext p_389562_) booleanIsCarried.get(ItemStack p_387247_, @Nullable ClientLevel p_387933_, @Nullable LivingEntity p_388427_, int p_386998_, ItemDisplayContext p_389534_) booleanIsKeybindDown.get(ItemStack p_389550_, @Nullable ClientLevel p_389440_, @Nullable LivingEntity p_389703_, int p_389439_, ItemDisplayContext p_389599_) booleanIsSelected.get(ItemStack p_387724_, @Nullable ClientLevel p_387118_, @Nullable LivingEntity p_387251_, int p_388905_, ItemDisplayContext p_389631_) booleanIsUsingItem.get(ItemStack p_386538_, @Nullable ClientLevel p_386504_, @Nullable LivingEntity p_388492_, int p_387916_, ItemDisplayContext p_389393_) booleanIsViewEntity.get(ItemStack p_390357_, @Nullable ClientLevel p_390458_, @Nullable LivingEntity p_390497_, int p_390451_, ItemDisplayContext p_390466_) booleanItemModelPropertyTest.get(ItemStack pStack, @Nullable ClientLevel pLevel, @Nullable LivingEntity pEntity, int pSeed, ItemDisplayContext pDisplayContext) -
Uses of ItemStack in net.minecraft.client.renderer.item.properties.numeric
Methods in net.minecraft.client.renderer.item.properties.numeric with parameters of type ItemStackModifier and TypeMethodDescriptionprotected floatCompassAngleState.calculate(ItemStack p_388108_, ClientLevel p_387750_, int p_388073_, ItemOwner p_435973_) protected abstract floatNeedleDirectionHelper.calculate(ItemStack pStack, ClientLevel pLevel, int pSeed, ItemOwner pOwner) protected floatTime.calculate(ItemStack p_387493_, ClientLevel p_387362_, int p_388783_, ItemOwner p_434788_) floatBundleFullness.get(ItemStack p_388015_, @Nullable ClientLevel p_386753_, @Nullable ItemOwner p_435228_, int p_386639_) floatCompassAngle.get(ItemStack p_387228_, @Nullable ClientLevel p_386952_, @Nullable ItemOwner p_434216_, int p_387210_) (package private) abstract @Nullable GlobalPosCompassAngleState.CompassTarget.get(ClientLevel pLevel, ItemStack pStack, @Nullable ItemOwner pOwner) floatCooldown.get(ItemStack p_387823_, @Nullable ClientLevel p_386825_, @Nullable ItemOwner p_433929_, int p_387909_) floatCount.get(ItemStack p_388019_, @Nullable ClientLevel p_386708_, @Nullable ItemOwner p_434102_, int p_388179_) floatCrossbowPull.get(ItemStack p_387470_, @Nullable ClientLevel p_387947_, @Nullable ItemOwner p_434397_, int p_388371_) floatCustomModelDataProperty.get(ItemStack p_386883_, @Nullable ClientLevel p_387867_, @Nullable ItemOwner p_434671_, int p_388040_) floatDamage.get(ItemStack p_386977_, @Nullable ClientLevel p_386768_, @Nullable ItemOwner p_432745_, int p_386955_) floatNeedleDirectionHelper.get(ItemStack pStack, @Nullable ClientLevel pLevel, @Nullable ItemOwner pOwner, int pSeed) floatRangeSelectItemModelProperty.get(ItemStack pStack, @Nullable ClientLevel pLevel, @Nullable ItemOwner pOwner, int pSeed) (package private) abstract floatTime.TimeSource.get(ClientLevel pLevel, ItemStack pStack, ItemOwner pOwner, RandomSource pRandom) floatUseCycle.get(ItemStack p_387347_, @Nullable ClientLevel p_388372_, @Nullable ItemOwner p_435901_, int p_388681_) floatUseDuration.get(ItemStack p_388572_, @Nullable ClientLevel p_387106_, @Nullable ItemOwner p_435045_, int p_386612_) static intUseDuration.useDuration(ItemStack pStack, LivingEntity pEntity) -
Uses of ItemStack in net.minecraft.client.renderer.item.properties.select
Methods in net.minecraft.client.renderer.item.properties.select with parameters of type ItemStackModifier and TypeMethodDescriptionCharge.get(ItemStack p_387321_, @Nullable ClientLevel p_387482_, @Nullable LivingEntity p_387912_, int p_387536_, ItemDisplayContext p_387489_) @Nullable TComponentContents.get(ItemStack p_397602_, @Nullable ClientLevel p_397414_, @Nullable LivingEntity p_397883_, int p_397032_, ItemDisplayContext p_397548_) @Nullable ResourceKey<Level> ContextDimension.get(ItemStack p_390388_, @Nullable ClientLevel p_390477_, @Nullable LivingEntity p_390423_, int p_390520_, ItemDisplayContext p_390452_) @Nullable ResourceKey<EntityType<?>> ContextEntityType.get(ItemStack p_390525_, @Nullable ClientLevel p_390442_, @Nullable LivingEntity p_390437_, int p_390427_, ItemDisplayContext p_390397_) @Nullable StringCustomModelDataProperty.get(ItemStack p_388036_, @Nullable ClientLevel p_387600_, @Nullable LivingEntity p_388624_, int p_388055_, ItemDisplayContext p_387132_) DisplayContext.get(ItemStack p_388079_, @Nullable ClientLevel p_388467_, @Nullable LivingEntity p_388500_, int p_388313_, ItemDisplayContext p_387120_) @Nullable StringItemBlockState.get(ItemStack p_387708_, @Nullable ClientLevel p_388625_, @Nullable LivingEntity p_388880_, int p_388899_, ItemDisplayContext p_388088_) @Nullable StringLocalTime.get(ItemStack p_389482_, @Nullable ClientLevel p_389609_, @Nullable LivingEntity p_389651_, int p_389546_, ItemDisplayContext p_389556_) @Nullable HumanoidArmMainHand.get(ItemStack p_387406_, @Nullable ClientLevel p_387423_, @Nullable LivingEntity p_388453_, int p_388098_, ItemDisplayContext p_386609_) @Nullable TSelectItemModelProperty.get(ItemStack pStack, @Nullable ClientLevel pLevel, @Nullable LivingEntity pEntity, int pSeed, ItemDisplayContext pDisplayContext) @Nullable ResourceKey<TrimMaterial> TrimMaterialProperty.get(ItemStack p_387701_, @Nullable ClientLevel p_388261_, @Nullable LivingEntity p_387373_, int p_388817_, ItemDisplayContext p_386970_) -
Uses of ItemStack in net.minecraft.client.renderer.special
Methods in net.minecraft.client.renderer.special with parameters of type ItemStackModifier and TypeMethodDescription@Nullable BannerPatternLayersBannerSpecialRenderer.extractArgument(ItemStack p_387879_) @Nullable PotDecorationsDecoratedPotSpecialRenderer.extractArgument(ItemStack p_386678_) default @Nullable VoidNoDataSpecialModelRenderer.extractArgument(ItemStack p_386451_) @Nullable PlayerSkinRenderCache.RenderInfoPlayerHeadSpecialRenderer.extractArgument(ItemStack p_428504_) @Nullable DataComponentMapShieldSpecialRenderer.extractArgument(ItemStack p_387204_) @Nullable TSpecialModelRenderer.extractArgument(ItemStack pStack) -
Uses of ItemStack in net.minecraft.client.tutorial
Methods in net.minecraft.client.tutorial with parameters of type ItemStackModifier and TypeMethodDescriptionvoidCalled when the player pick up an ItemStackvoidCalled when the player pick up an ItemStackvoidCalled when the player pick up an ItemStackvoidCalled when the player pick up an ItemStackdefault voidCalled when the player pick up an ItemStackvoidTutorial.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.ComponentWrapper.presenceCheckerThe field for thepresenceCheckerrecord component.ItemPredicateArgument.PredicateWrapper.typeThe field for thetyperecord component.ItemPredicateArgument.ComponentWrapper.valueCheckerThe field for thevalueCheckerrecord 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_, com.mojang.serialization.Dynamic<?> p_399995_) ItemPredicateArgument.Context.createPredicateTest(com.mojang.brigadier.ImmutableStringReader p_335414_, ItemPredicateArgument.PredicateWrapper p_335561_, com.mojang.serialization.Dynamic<?> p_400185_) ItemPredicateArgument.ComponentWrapper.decode(com.mojang.brigadier.ImmutableStringReader pReader, com.mojang.serialization.Dynamic<?> pData) ItemPredicateArgument.PredicateWrapper.decode(com.mojang.brigadier.ImmutableStringReader pReader, com.mojang.serialization.Dynamic<?> pData) ItemPredicateArgument.Context.forElementType(com.mojang.brigadier.ImmutableStringReader p_335407_, Identifier p_467639_) ItemPredicateArgument.Context.forTagType(com.mojang.brigadier.ImmutableStringReader p_335664_, Identifier p_468229_) ItemPredicateArgument.ComponentWrapper.presenceChecker()Returns the value of thepresenceCheckerrecord component.ItemPredicateArgument.PredicateWrapper.type()Returns the value of thetyperecord component.ItemPredicateArgument.ComponentWrapper.valueChecker()Returns the value of thevalueCheckerrecord 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(Identifier id, Predicate<ItemStack> presenceChecker, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker) Creates an instance of aComponentWrapperrecord class.(package private)ComponentWrapper(Identifier id, Predicate<ItemStack> presenceChecker, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker) Creates an instance of aComponentWrapperrecord class.(package private)PredicateWrapper(Identifier id, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> type) Creates an instance of aPredicateWrapperrecord class. -
Uses of ItemStack in net.minecraft.core.cauldron
Methods in net.minecraft.core.cauldron with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static InteractionResultCauldronInteraction.bannerInteraction(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pStack) private static InteractionResultCauldronInteraction.dyedItemIteration(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pStack) static InteractionResultCauldronInteraction.emptyBucket(Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pFilledStack, BlockState pState, SoundEvent pEmptySound) static InteractionResultCauldronInteraction.fillBucket(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pEmptyStack, ItemStack pFilledStack, Predicate<BlockState> pStatePredicate, SoundEvent pFillSound) private static InteractionResultCauldronInteraction.fillLavaInteraction(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pFilledStack) private static InteractionResultCauldronInteraction.fillPowderSnowInteraction(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pFilledStack) private static InteractionResultCauldronInteraction.fillWaterInteraction(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pFilledStack) CauldronInteraction.interact(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pStack) private static InteractionResultCauldronInteraction.shulkerBoxInteraction(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, ItemStack pStack) -
Uses of ItemStack in net.minecraft.core.component.predicates
Fields in net.minecraft.core.component.predicates with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final Optional<CollectionPredicate<ItemStack, ItemPredicate>> BundlePredicate.itemsThe field for theitemsrecord component.private final Optional<CollectionPredicate<ItemStack, ItemPredicate>> ContainerPredicate.itemsThe field for theitemsrecord component.Methods in net.minecraft.core.component.predicates that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBundlePredicate.items()Returns the value of theitemsrecord component.ContainerPredicate.items()Returns the value of theitemsrecord component.Constructor parameters in net.minecraft.core.component.predicates with type arguments of type ItemStackModifierConstructorDescriptionCreates an instance of aBundlePredicaterecord class.Creates an instance of aContainerPredicaterecord class. -
Uses of ItemStack in net.minecraft.core.dispenser
Methods in net.minecraft.core.dispenser that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackDefaultDispenseItemBehavior.consumeWithRemainder(BlockSource pBlockSource, ItemStack pStack, ItemStack pRemainder) final ItemStackDefaultDispenseItemBehavior.dispense(BlockSource p_302432_, ItemStack p_123392_) DispenseItemBehavior.dispense(BlockSource pBlockSource, ItemStack pItem) BoatDispenseItemBehavior.execute(BlockSource p_302460_, ItemStack p_123376_) protected ItemStackDefaultDispenseItemBehavior.execute(BlockSource pBlockSource, ItemStack pItem) protected ItemStackEquipmentDispenseItemBehavior.execute(BlockSource p_371344_, ItemStack p_371463_) MinecartDispenseItemBehavior.execute(BlockSource p_374045_, ItemStack p_374580_) ProjectileDispenseBehavior.execute(BlockSource p_338635_, ItemStack p_338423_) protected ItemStackShearsDispenseItemBehavior.execute(BlockSource p_302443_, ItemStack p_123581_) protected ItemStackShulkerBoxDispenseBehavior.execute(BlockSource p_302426_, ItemStack p_123588_) Methods in net.minecraft.core.dispenser with parameters of type ItemStackModifier and TypeMethodDescriptionprivate voidDefaultDispenseItemBehavior.addToInventoryOrDispense(BlockSource pBlockSource, ItemStack pRemainder) protected ItemStackDefaultDispenseItemBehavior.consumeWithRemainder(BlockSource pBlockSource, ItemStack pStack, ItemStack pRemainder) final ItemStackDefaultDispenseItemBehavior.dispense(BlockSource p_302432_, ItemStack p_123392_) DispenseItemBehavior.dispense(BlockSource pBlockSource, ItemStack pItem) static booleanEquipmentDispenseItemBehavior.dispenseEquipment(BlockSource pBlockSource, ItemStack pItem) BoatDispenseItemBehavior.execute(BlockSource p_302460_, ItemStack p_123376_) protected ItemStackDefaultDispenseItemBehavior.execute(BlockSource pBlockSource, ItemStack pItem) protected ItemStackEquipmentDispenseItemBehavior.execute(BlockSource p_371344_, ItemStack p_371463_) MinecartDispenseItemBehavior.execute(BlockSource p_374045_, ItemStack p_374580_) ProjectileDispenseBehavior.execute(BlockSource p_338635_, ItemStack p_338423_) protected ItemStackShearsDispenseItemBehavior.execute(BlockSource p_302443_, ItemStack p_123581_) protected ItemStackShulkerBoxDispenseBehavior.execute(BlockSource p_302426_, ItemStack p_123588_) static voidDefaultDispenseItemBehavior.spawnItem(Level pLevel, ItemStack pStack, int pSpeed, Direction pFacing, Position pPosition) private static booleanShearsDispenseItemBehavior.tryShearBeehive(ServerLevel pLevel, ItemStack pStack, BlockPos pPos) private static booleanShearsDispenseItemBehavior.tryShearEntity(ServerLevel pLevel, BlockPos pPos, ItemStack pStack) -
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_CODECMethods 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 ItemStackShapelessRecipeBuilder.resultprivate final ItemStackShapedRecipeBuilder.resultStackprivate final ItemStackSimpleCookingRecipeBuilder.stackResultMethods in net.minecraft.data.recipes with parameters of type ItemStackModifier and TypeMethodDescriptionstatic SimpleCookingRecipeBuilderSimpleCookingRecipeBuilder.blasting(Ingredient p_252115_, RecipeCategory p_249421_, ItemStack result, float p_250383_, int p_250476_) static SimpleCookingRecipeBuilderSimpleCookingRecipeBuilder.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_) protected ShapedRecipeBuilderRecipeProvider.shaped(RecipeCategory category, ItemStack stack) static ShapedRecipeBuilderShapedRecipeBuilder.shaped(HolderGetter<Item> p_365019_, RecipeCategory p_251325_, ItemStack result) protected ShapelessRecipeBuilderRecipeProvider.shapeless(RecipeCategory pCategory, ItemStack pResult) static ShapelessRecipeBuilderShapelessRecipeBuilder.shapeless(HolderGetter<Item> pItems, RecipeCategory pCategory, ItemStack pResult) static SimpleCookingRecipeBuilderSimpleCookingRecipeBuilder.smelting(Ingredient p_249223_, RecipeCategory p_251240_, ItemStack result, float p_249452_, int p_250496_) static SimpleCookingRecipeBuilderSimpleCookingRecipeBuilder.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 ItemStackModifierConstructorDescriptionprivateShapedRecipeBuilder(HolderGetter<Item> p_365072_, RecipeCategory p_249996_, ItemStack result) privateShapelessRecipeBuilder(HolderGetter<Item> pItems, RecipeCategory pCategory, ItemStack pResult) privateSimpleCookingRecipeBuilder(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 with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.network
Methods in net.minecraft.network with parameters of type ItemStackModifier and TypeMethodDescriptionstatic HashedStackHashedStack.create(ItemStack pStack, HashedPatchMap.HashGenerator pHashGenerator) booleanHashedStack.ActualItem.matches(ItemStack p_412763_, HashedPatchMap.HashGenerator p_412137_) booleanHashedStack.matches(ItemStack pStack, HashedPatchMap.HashGenerator pHashGenerator) -
Uses of ItemStack in net.minecraft.network.chat
Fields in net.minecraft.network.chat declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackHoverEvent.ShowItem.itemThe field for theitemrecord component.Methods in net.minecraft.network.chat that return ItemStackModifier and TypeMethodDescriptionHoverEvent.ShowItem.item()Returns the value of theitemrecord component.Constructors 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 ItemStackClientboundContainerSetContentPacket.carriedItemThe field for thecarriedItemrecord component.private final ItemStackClientboundSetCursorItemPacket.contentsThe field for thecontentsrecord component.private final ItemStackClientboundSetPlayerInventoryPacket.contentsThe field for thecontentsrecord component.private final ItemStackClientboundContainerSetSlotPacket.itemStackprivate final ItemStackServerboundSetCreativeModeSlotPacket.itemStackThe field for theitemStackrecord component.Fields in net.minecraft.network.protocol.game with type parameters of type ItemStackModifier and TypeFieldDescriptionClientboundContainerSetContentPacket.itemsThe field for theitemsrecord component.private final List<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> ClientboundSetEquipmentPacket.slotsMethods in net.minecraft.network.protocol.game that return ItemStackModifier and TypeMethodDescriptionClientboundContainerSetContentPacket.carriedItem()Returns the value of thecarriedItemrecord component.ClientboundSetCursorItemPacket.contents()Returns the value of thecontentsrecord component.ClientboundSetPlayerInventoryPacket.contents()Returns the value of thecontentsrecord component.ClientboundContainerSetSlotPacket.getItem()ServerboundSetCreativeModeSlotPacket.itemStack()Returns the value of theitemStackrecord component.Methods in net.minecraft.network.protocol.game that return types with arguments of type ItemStackModifier and TypeMethodDescriptionList<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> ClientboundSetEquipmentPacket.getSlots()ClientboundContainerSetContentPacket.items()Returns the value of theitemsrecord component.Constructors in net.minecraft.network.protocol.game with parameters of type ItemStackModifierConstructorDescriptionClientboundContainerSetContentPacket(int containerId, int stateId, List<ItemStack> items, ItemStack carriedItem) Creates an instance of aClientboundContainerSetContentPacketrecord class.ClientboundContainerSetSlotPacket(int pContainerId, int pStateId, int pSlot, ItemStack pItemStack) ClientboundSetCursorItemPacket(ItemStack contents) Creates an instance of aClientboundSetCursorItemPacketrecord class.ClientboundSetPlayerInventoryPacket(int slot, ItemStack contents) Creates an instance of aClientboundSetPlayerInventoryPacketrecord class.ServerboundSetCreativeModeSlotPacket(int p_134553_, ItemStack p_134554_) ServerboundSetCreativeModeSlotPacket(short slotNum, ItemStack itemStack) Creates an instance of aServerboundSetCreativeModeSlotPacketrecord class.Constructor parameters in net.minecraft.network.protocol.game with type arguments of type ItemStackModifierConstructorDescriptionClientboundContainerSetContentPacket(int containerId, int stateId, List<ItemStack> items, ItemStack carriedItem) Creates an instance of aClientboundContainerSetContentPacketrecord class.ClientboundSetEquipmentPacket(int pEntity, List<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> pSlots) -
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.server.commands
Methods in net.minecraft.server.commands that return ItemStackModifier and TypeMethodDescriptionprivate static ItemStackItemCommands.applyModifier(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) private static ItemStackItemCommands.getBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot) private static ItemStackItemCommands.getItemInSlot(SlotProvider pSlot, int pIndex) private static ItemStackLootCommand.getSourceHandItem(CommandSourceStack pSource, EquipmentSlot pSlot) Methods in net.minecraft.server.commands with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static ItemStackItemCommands.applyModifier(CommandSourceStack pSource, Holder<LootItemFunction> pModifier, ItemStack pStack) private static booleanLootCommand.canMergeItems(ItemStack pFirst, ItemStack pSecond) private static booleanLootCommand.distributeToContainer(Container pContainer, ItemStack pItem) private static intLootCommand.dropBlockLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, BlockPos pPos, ItemStack pTool, LootCommand.DropConsumer pDropConsumer) private static intLootCommand.dropFishingLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, Holder<LootTable> pLootTable, BlockPos pPos, ItemStack pTool, LootCommand.DropConsumer pDropConsumer) private static intItemCommands.setBlockItem(CommandSourceStack pSource, BlockPos pPos, int pSlot, ItemStack pItem) private static intItemCommands.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 TypeMethodDescriptionvoidintLootCommand.DropConsumer.accept(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, List<ItemStack> pItems, LootCommand.Callback pCallback) private static intLootCommand.blockDistribute(CommandSourceStack pSource, BlockPos pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static intLootCommand.blockReplace(CommandSourceStack pSource, BlockPos pPos, int pSlot, int pNumSlots, List<ItemStack> pItems, LootCommand.Callback pCallback) private static voidLootCommand.callback(CommandSourceStack pSource, List<ItemStack> pItems) private static voidLootCommand.callback(CommandSourceStack pSource, List<ItemStack> pItems, ResourceKey<LootTable> pLootTable) private static intClearInventoryCommands.clearInventory(CommandSourceStack pSource, Collection<ServerPlayer> pTargetPlayers, Predicate<ItemStack> pItemPredicate, int pMaxCount) private static intClearInventoryCommands.clearUnlimited(CommandSourceStack pSource, Collection<ServerPlayer> pTargets, Predicate<ItemStack> pFilter) private static intExecuteCommand.countItems(Iterable<? extends SlotProvider> pTargets, SlotRange pSlotRange, Predicate<ItemStack> pFilter) private static intExecuteCommand.countItems(CommandSourceStack pSource, BlockPos pPos, SlotRange pSlotRange, Predicate<ItemStack> pFilter) private static intLootCommand.dropInWorld(CommandSourceStack pSource, Vec3 pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static intLootCommand.entityReplace(Collection<? extends Entity> pTargets, int pStartSlot, int pNumSlots, List<ItemStack> pItems, LootCommand.Callback pCallback) private static intLootCommand.playerGive(Collection<ServerPlayer> pTargets, List<ItemStack> pItems, LootCommand.Callback pCallback) private static voidLootCommand.setSlots(Entity pTarget, List<ItemStack> pItems, int pStartSlot, int pNumSlots, List<ItemStack> pSetItems) -
Uses of ItemStack in net.minecraft.server.dialog.body
Fields in net.minecraft.server.dialog.body declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackItemBody.itemThe field for theitemrecord component.Methods in net.minecraft.server.dialog.body that return ItemStackModifier and TypeMethodDescriptionItemBody.item()Returns the value of theitemrecord component.Constructors in net.minecraft.server.dialog.body with parameters of type ItemStackModifierConstructorDescriptionItemBody(ItemStack item, Optional<PlainMessage> description, boolean showDecorations, boolean showTooltip, int width, int height) Creates an instance of aItemBodyrecord class. -
Uses of ItemStack in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type ItemStackModifier and TypeMethodDescriptionvoidServerPlayer.handleExtraItemsCreatedOnUse(ItemStack p_376376_) voidServerPlayer.onEnchantmentPerformed(ItemStack pEnchantedItem, int pCost) voidServerPlayer.openItemGui(ItemStack pStack, InteractionHand pHand) private booleanServerPlayerGameMode.removeBlock(BlockPos pos, BlockState state, boolean canHarvest, ItemStack toolStack) Patched-in method that handles actual removal of blocks forServerPlayerGameMode.destroyBlock(BlockPos).private voidServerPlayer.synchronizeSpecialItemUpdates(ItemStack pStack) protected voidServerPlayer.updateUsingItem(ItemStack p_143402_) DemoMode.useItem(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand) ServerPlayerGameMode.useItem(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand) DemoMode.useItemOn(ServerPlayer p_140747_, Level p_140748_, ItemStack p_140749_, InteractionHand p_140750_, BlockHitResult p_140751_) 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 TypeMethodDescriptionvoidServerPlayer.triggerRecipeCrafted(RecipeHolder<?> p_301156_, List<ItemStack> p_282336_) -
Uses of ItemStack in net.minecraft.server.network
Methods in net.minecraft.server.network with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static voidServerGamePacketListenerImpl.addBlockDataToItem(BlockState pState, ServerLevel pLevel, BlockPos pPos, ItemStack pStack) private voidServerGamePacketListenerImpl.tryPickItem(ItemStack pStack) private static booleanServerGamePacketListenerImpl.wasBlockPlacementAttempt(ServerPlayer pPlayer, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world
Fields in net.minecraft.world declared as ItemStackModifier and TypeFieldDescriptionprivate final @Nullable ItemStackInteractionResult.ItemContext.heldItemTransformedToThe field for theheldItemTransformedTorecord component.private final ItemStackItemStackWithSlot.stackThe field for thestackrecord component.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.@Nullable ItemStackInteractionResult.ItemContext.heldItemTransformedTo()Returns the value of theheldItemTransformedTorecord component.@Nullable ItemStackInteractionResult.Success.heldItemTransformedTo()Container.ContainerIterator.next()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 ItemStackContainerHelper.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) ItemStackWithSlot.stack()Returns the value of thestackrecord component.static ItemStackMethods in net.minecraft.world that return types with arguments of type ItemStackModifier and TypeMethodDescriptionSimpleContainer.getItems()Container.iterator()SimpleContainer.removeAllItems()Methods in net.minecraft.world with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanSimpleContainer.canAddItem(ItemStack pStack) booleanCompoundContainer.canPlaceItem(int pIndex, ItemStack pStack) Returnstrueif automation is allowed to insert the given stack (ignoring stack size) into the given slot.default booleanContainer.canPlaceItem(int pSlot, ItemStack pStack) Returnstrueif automation is allowed to insert the given stack (ignoring stack size) into the given slot.booleanWorldlyContainer.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.default booleanContainer.canTakeItem(Container pTarget, int pSlot, ItemStack pStack) Returnstrueif the given stack can be extracted into the target inventory.booleanWorldlyContainer.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) Returnstrueif automation can extract the given item in the given slot from the given side.static intContainerHelper.clearOrCountMatchingItems(ItemStack pStack, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) static voidContainers.dropItemStack(Level pLevel, double pX, double pY, double pZ, ItemStack pStack) default intContainer.getMaxStackSize(ItemStack pStack) InteractionResult.Success.heldItemTransformedTo(ItemStack pStack) private voidSimpleContainer.moveItemsBetweenStacks(ItemStack pStack, ItemStack pOther) private voidSimpleContainer.moveItemToEmptySlots(ItemStack pStack) private voidSimpleContainer.moveItemToOccupiedSlotsWithSameType(ItemStack pStack) voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).booleanLockCode.unlocksWith(ItemStack pStack) Method parameters in net.minecraft.world with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic intContainerHelper.clearOrCountMatchingItems(Container pContainer, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) Clears items from the inventory matching a predicate.static intContainerHelper.clearOrCountMatchingItems(ItemStack pStack, Predicate<ItemStack> pItemPredicate, int pMaxItems, boolean pSimulate) static voidContainers.dropContents(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pStackList) voidSimpleContainer.fromItemList(ValueInput.TypedInputList<ItemStack> pInput) default booleanContainer.hasAnyMatching(Predicate<ItemStack> pPredicate) static voidContainerHelper.loadAllItems(ValueInput pInput, NonNullList<ItemStack> pItems) static ItemStackContainerHelper.removeItem(List<ItemStack> pStacks, int pIndex, int pAmount) static voidContainerHelper.saveAllItems(ValueOutput pOutput, NonNullList<ItemStack> pItems) static voidContainerHelper.saveAllItems(ValueOutput pOutput, NonNullList<ItemStack> pItems, boolean pAllowEmpty) voidSimpleContainer.storeAsItemList(ValueOutput.TypedOutputList<ItemStack> pOutput) static ItemStackConstructors in net.minecraft.world with parameters of type ItemStackModifierConstructorDescriptionItemContext(boolean wasItemInteraction, @Nullable ItemStack heldItemTransformedTo) Creates an instance of aItemContextrecord class.ItemStackWithSlot(int slot, ItemStack stack) Creates an instance of aItemStackWithSlotrecord class.SimpleContainer(ItemStack... pItems) -
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 @Nullable ItemStackLivingEntity.autoSpinAttackItemStackprivate final ItemStackDisplay.ItemDisplay.ItemRenderState.itemStackThe field for theitemStackrecord component.protected ItemStackLivingEntity.useItemFields in net.minecraft.world.entity with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor<ItemStack> OminousItemSpawner.DATA_ITEMprivate static final EntityDataAccessor<ItemStack> Display.ItemDisplay.DATA_ITEM_STACK_IDprivate final EnumMap<EquipmentSlot, ItemStack> EntityEquipment.itemsprivate final Map<EquipmentSlot, ItemStack> LivingEntity.lastEquipmentItemsMethods in net.minecraft.world.entity that return ItemStackModifier and TypeMethodDescriptionMob.equipItemIfPossible(ServerLevel pLevel, ItemStack pStack) EntityEquipment.get(EquipmentSlot pSlot) SlotAccess.get()LivingEntity.getActiveItem()Mob.getBodyArmorItem()OminousItemSpawner.getItem()@Nullable ItemStackLivingEntity.getItemBlockingWith()EquipmentUser.getItemBySlot(EquipmentSlot pSlot) LivingEntity.getItemBySlot(EquipmentSlot pSlot) LivingEntity.getItemHeldByArm(HumanoidArm pArm) LivingEntity.getItemInHand(InteractionHand pHand) private ItemStackDisplay.ItemDisplay.getItemStack()LivingEntity.getMainHandItem()LivingEntity.getOffhandItem()@Nullable ItemStackEntity.getPickResult()@Nullable ItemStackMob.getPickResult()LivingEntity.getProjectile(ItemStack pWeaponStack) LivingEntity.getUseItem()@Nullable ItemStackEntity.getWeaponItem()LivingEntity.getWeaponItem()Display.ItemDisplay.ItemRenderState.itemStack()Returns the value of theitemStackrecord component.EntityEquipment.set(EquipmentSlot pSlot, ItemStack pStack) Methods in net.minecraft.world.entity that return types with arguments of type ItemStackModifier and TypeMethodDescriptionprivate @Nullable Map<EquipmentSlot, ItemStack> LivingEntity.collectEquipmentChanges()Methods in net.minecraft.world.entity with parameters of type ItemStackModifier and TypeMethodDescriptionEntityType.appendComponentsConfig(Consumer<T> pConsumer, ItemStack pStack) EntityType.appendCustomEntityStackConfig(Consumer<T> pConsumer, Level pLevel, ItemStack pStack, @Nullable LivingEntity pOwner) EntityType.appendDefaultStackConfig(Consumer<T> pConsumer, Level pLevel, ItemStack pStack, @Nullable LivingEntity pOwner) final voidEntity.applyComponentsFromItemStack(ItemStack pStack) private booleanEntity.attemptToShearEquipment(Player pPlayer, InteractionHand pHand, ItemStack pStack, Mob pMob) private voidRenders broken item particles using the given ItemStackfinal booleanLivingEntity.canEquipWithDispenser(ItemStack pStack) static booleanLivingEntity.canGlideUsing(ItemStack pStack, EquipmentSlot pSlot) booleanMob.canHoldItem(ItemStack pStack) protected booleanMob.canReplaceCurrentItem(ItemStack pNewItem, ItemStack pCurrentItem, EquipmentSlot pSlot) booleanMob.canReplaceEqualItem(ItemStack pCandidate, ItemStack pExisting) booleanMob.canUseNonMeleeWeapon(ItemStack pStack) private booleanMob.compareArmor(ItemStack pNewItem, ItemStack pCurrentItem, EquipmentSlot pSlot) private booleanMob.compareWeapons(ItemStack pNewItem, ItemStack pCurrentItem, EquipmentSlot pSlot) static OminousItemSpawnerEntityType.createDefaultStackConfig(Level pLevel, ItemStack pStack, @Nullable LivingEntity pOwner) private @Nullable ItemEntityLivingEntity.createItemStackToDrop(ItemStack pStack, boolean pRandomizeMotion, boolean pIncludeThrower) @Nullable ItemEntitybooleanLivingEntity.dropFromEntityInteractLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, @Nullable Entity pEntity, ItemStack pTool, BiConsumer<ServerLevel, ItemStack> pDropConsumer) protected voidLivingEntity.dropFromShearingLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, ItemStack pShears, BiConsumer<ServerLevel, ItemStack> pDropConsumer) Mob.equipItemIfPossible(ServerLevel pLevel, ItemStack pStack) booleanLivingEntity.equipmentHasChanged(ItemStack pOldItem, ItemStack pNewItem) private doubleMob.getApproximateAttributeWith(ItemStack pItem, Holder<Attribute> pAttribute, EquipmentSlot pSlot) final EquipmentSlotLivingEntity.getEquipmentSlotForItem(ItemStack pStack) protected Holder<SoundEvent> LivingEntity.getEquipSound(EquipmentSlot pSlot, ItemStack pStack, Equippable pEquippable) LivingEntity.getProjectile(ItemStack pWeaponStack) voidLivingEntity.handleExtraItemsCreatedOnUse(ItemStack pStack) final booleanLivingEntity.isEquippableInSlot(ItemStack pStack, EquipmentSlot pSlot) voidLivingEntity.onEquipItem(EquipmentSlot pSlot, ItemStack pOldItem, ItemStack pNewItem) default @Nullable EquipmentSlotEquipmentUser.resolveSlot(ItemStack pStack, List<EquipmentSlot> pExcludedSlots) EntityEquipment.set(EquipmentSlot pSlot, ItemStack pStack) booleanvoidMob.setBodyArmorItem(ItemStack pStack) private voidvoidLivingEntity.setItemInHand(InteractionHand pHand, ItemStack pStack) voidEquipmentUser.setItemSlot(EquipmentSlot pSlot, ItemStack pStack) voidLivingEntity.setItemSlot(EquipmentSlot pSlot, ItemStack pStack) voidLivingEntity.setItemSlot(EquipmentSlot pSlot, ItemStack pStack, boolean insideTransaction) Neo: PassingtrueforinsideTransactionsets the item without side-effects (callingLivingEntity.onEquipItem(net.minecraft.world.entity.EquipmentSlot, net.minecraft.world.item.ItemStack, net.minecraft.world.item.ItemStack)).protected voidMob.setItemSlotAndDropWhenKilled(EquipmentSlot pSlot, ItemStack pStack) private voidDisplay.ItemDisplay.setItemStack(ItemStack pItemStack) voidShearable.shear(ServerLevel pLevel, SoundSource pSoundSource, ItemStack pShears) Deprecated.@Nullable TEntityType.spawn(ServerLevel pLevel, @Nullable ItemStack pSpawnedFrom, @Nullable LivingEntity pOwner, BlockPos pPos, EntitySpawnReason pReason, boolean pShouldOffsetY, boolean pShouldOffsetYMore) @Nullable ItemEntityEntity.spawnAtLocation(ServerLevel pLevel, ItemStack pStack) @Nullable ItemEntityEntity.spawnAtLocation(ServerLevel pLevel, ItemStack pStack, float pYOffset) @Nullable ItemEntityEntity.spawnAtLocation(ServerLevel pLevel, ItemStack pStack, Vec3 pOffset) voidLivingEntity.spawnItemParticles(ItemStack pStack, int pAmount) private EntityOminousItemSpawner.spawnProjectile(ServerLevel pLevel, ProjectileItem pProjectileItem, ItemStack pStack) private voidLivingEntity.stopLocationBasedEffects(ItemStack pStack, EquipmentSlot pSlot, AttributeMap pAttributeMap) protected voidLivingEntity.updateUsingItem(ItemStack pUsingItem) protected voidMob.usePlayerItem(Player pPlayer, InteractionHand pHand, ItemStack pStack) booleanMob.wantsToPickUp(ServerLevel pLevel, ItemStack pStack) Method parameters in net.minecraft.world.entity with type arguments of type ItemStackModifier and TypeMethodDescriptionbooleanLivingEntity.dropFromEntityInteractLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, @Nullable Entity pEntity, ItemStack pTool, BiConsumer<ServerLevel, ItemStack> pDropConsumer) booleanLivingEntity.dropFromGiftLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, BiConsumer<ServerLevel, ItemStack> pDropConsumer) protected booleanLivingEntity.dropFromLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, Function<LootParams.Builder, LootParams> pParamsBuilder, BiConsumer<ServerLevel, ItemStack> pDropConsumer) voidLivingEntity.dropFromLootTable(ServerLevel pLevel, DamageSource pDamageSource, boolean pPlayerKill, ResourceKey<LootTable> pLootTable, Consumer<ItemStack> pDropConsumer) protected voidLivingEntity.dropFromShearingLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, ItemStack pShears, BiConsumer<ServerLevel, ItemStack> pDropConsumer) Mob.dropPreservedEquipment(ServerLevel pLevel, Predicate<ItemStack> pFilter) static SlotAccessSlotAccess.forEquipmentSlot(LivingEntity pEntity, EquipmentSlot pSlot, Predicate<ItemStack> pStackFilter) static SlotAccessSlotAccess.forListElement(List<ItemStack> pItems, int pIndex) private voidLivingEntity.handleEquipmentChanges(Map<EquipmentSlot, ItemStack> pEquipments) private voidLivingEntity.handleHandSwap(Map<EquipmentSlot, ItemStack> pHands) booleanstatic SlotAccessstatic SlotAccessConstructors in net.minecraft.world.entity with parameters of type ItemStackModifierConstructorDescriptionItemRenderState(ItemStack itemStack, ItemDisplayContext itemTransform) Creates an instance of aItemRenderStaterecord class.Constructor parameters in net.minecraft.world.entity with type arguments of type ItemStack -
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 static ItemStackTransportItemsBetweenContainers.addItemsToContainer(PathfinderMob pMob, Container pContainer) private ItemStackCelebrateVillagersSurvivedRaid.getFirework(DyeColor pColor, int pFlightTime) private static ItemStackTransportItemsBetweenContainers.pickupItemFromContainer(Container pContainer) Methods in net.minecraft.world.entity.ai.behavior with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static voidShowTradesToPlayer.displayAsHeldItem(Villager pVillager, ItemStack pItem) static voidBehaviorUtils.throwItem(LivingEntity pLivingEntity, ItemStack pStack, Vec3 pOffset) static voidBehaviorUtils.throwItem(LivingEntity pEntity, ItemStack pStack, Vec3 pOffset, Vec3 pSpeedMultiplier, float pYOffset) static voidGoAndGiveItemsToTarget.throwItem(LivingEntity pEntity, ItemStack pStack, Vec3 pThrowPos) private voidGoAndGiveItemsToTarget.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, @Nullable SoundEvent pFinishUsingSound, Predicate<? super T> pCanUseSelector) Constructor parameters in net.minecraft.world.entity.ai.goal with type arguments of type ItemStackModifierConstructorDescriptionForNonPathfinders(Mob p_415602_, double p_416457_, Predicate<ItemStack> p_415698_, boolean p_416268_, double p_416020_) (package private)TemptGoal(Mob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare, double pStopDistance) TemptGoal(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) TemptGoal(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare, double pStopDistance) -
Uses of ItemStack in net.minecraft.world.entity.ai.sensing
Fields in net.minecraft.world.entity.ai.sensing with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final BiPredicate<PathfinderMob, ItemStack> TemptingSensor.temptationsMethods in net.minecraft.world.entity.ai.sensing with parameters of type ItemStackModifier and TypeMethodDescriptionprivate booleanTemptingSensor.isTemptation(PathfinderMob pMob, ItemStack pItem) Constructor parameters in net.minecraft.world.entity.ai.sensing with type arguments of type ItemStackModifierConstructorDescriptionprivateTemptingSensor(BiPredicate<PathfinderMob, ItemStack> pTemptations) TemptingSensor(Predicate<ItemStack> pTemptations) -
Uses of ItemStack in net.minecraft.world.entity.animal
Methods in net.minecraft.world.entity.animal that return ItemStackMethods in net.minecraft.world.entity.animal with parameters of type ItemStackModifier and TypeMethodDescriptionabstract booleanChecks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)static voidBucketable.saveDefaultDataToBucketTag(Mob pMob, ItemStack pBucket) Deprecated.voidBucketable.saveToBucketTag(ItemStack pStack) -
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 booleanAllay.allayConsidersItemEqual(ItemStack pFirst, ItemStack pSecond) booleanAllay.equipmentHasChanged(ItemStack p_249825_, ItemStack p_251595_) private booleanAllay.hasNonMatchingPotion(ItemStack pFirst, ItemStack pSecond) private voidAllay.removeInteractionItem(Player pPlayer, ItemStack pStack) booleanAllay.wantsToPickUp(ServerLevel p_376111_, ItemStack p_218387_) -
Uses of ItemStack in net.minecraft.world.entity.animal.armadillo
Methods in net.minecraft.world.entity.animal.armadillo with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanArmadillo.brushOffScute(@Nullable Entity pEntity, ItemStack pStack) boolean -
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 with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanvoidAxolotl.saveToBucketTag(ItemStack p_149187_) protected voidAxolotl.usePlayerItem(Player p_149124_, InteractionHand p_149125_, ItemStack p_149126_) -
Uses of ItemStack in net.minecraft.world.entity.animal.bee
Methods in net.minecraft.world.entity.animal.bee with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.camel
Methods in net.minecraft.world.entity.animal.camel with parameters of type ItemStackModifier and TypeMethodDescriptionprotected Holder<SoundEvent> Camel.getEquipSound(EquipmentSlot p_397855_, ItemStack p_397494_, Equippable p_397094_) protected booleanCamel.handleEating(Player p_249923_, ItemStack p_248995_) booleanboolean -
Uses of ItemStack in net.minecraft.world.entity.animal.chicken
Methods in net.minecraft.world.entity.animal.chicken with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.cow
Methods in net.minecraft.world.entity.animal.cow with parameters of type ItemStackModifier and TypeMethodDescriptionprivate Optional<SuspiciousStewEffects> MushroomCow.getEffectsFromItemStack(ItemStack pStack) booleanvoidMushroomCow.shear(ServerLevel p_477948_, SoundSource p_480914_, ItemStack p_479429_) -
Uses of ItemStack in net.minecraft.world.entity.animal.dolphin
Methods in net.minecraft.world.entity.animal.dolphin with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.equine
Methods in net.minecraft.world.entity.animal.equine with parameters of type ItemStackModifier and TypeMethodDescriptionvoidAbstractHorse.equipBodyArmor(Player pPlayer, ItemStack pStack) private voidAbstractChestedHorse.equipChest(Player pPlayer, ItemStack pChestStack) protected Holder<SoundEvent> AbstractHorse.getEquipSound(EquipmentSlot p_477912_, ItemStack p_481049_, Equippable p_481569_) protected booleanAbstractHorse.handleEating(Player pPlayer, ItemStack pStack) protected booleanLlama.handleEating(Player pPlayer, ItemStack pStack) booleanChecks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)booleanChecks 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 -
Uses of ItemStack in net.minecraft.world.entity.animal.feline
Methods in net.minecraft.world.entity.animal.feline with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanChecks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)booleanConstructor parameters in net.minecraft.world.entity.animal.feline 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.fish
Methods in net.minecraft.world.entity.animal.fish that return ItemStackModifier and TypeMethodDescriptionCod.getBucketItemStack()Pufferfish.getBucketItemStack()Salmon.getBucketItemStack()TropicalFish.getBucketItemStack()Methods in net.minecraft.world.entity.animal.fish with parameters of type ItemStackModifier and TypeMethodDescriptionvoidAbstractFish.saveToBucketTag(ItemStack p_478030_) voidSalmon.saveToBucketTag(ItemStack p_479109_) voidTropicalFish.saveToBucketTag(ItemStack p_478099_) -
Uses of ItemStack in net.minecraft.world.entity.animal.fox
Methods in net.minecraft.world.entity.animal.fox with parameters of type ItemStackModifier and TypeMethodDescriptionprivate booleanbooleanFox.canHoldItem(ItemStack pStack) private voidFox.dropItemStack(ItemStack pStack) private booleanFox.isConsumableFood(ItemStack pStack) booleanChecks 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 voidFox.spitOutItem(ItemStack pStack) -
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 voidbooleanprivate booleanvoidTadpole.saveToBucketTag(ItemStack p_218725_) private voidTadpole.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 with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.golem
Methods in net.minecraft.world.entity.animal.golem with parameters of type ItemStackModifier and TypeMethodDescriptionvoidCopperGolem.shear(ServerLevel p_479725_, SoundSource p_479813_, ItemStack p_478855_) voidSnowGolem.shear(ServerLevel p_478568_, SoundSource p_478107_, ItemStack p_480281_) -
Uses of ItemStack in net.minecraft.world.entity.animal.happyghast
Methods in net.minecraft.world.entity.animal.happyghast with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.nautilus
Methods in net.minecraft.world.entity.animal.nautilus that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.animal.nautilus with parameters of type ItemStackModifier and TypeMethodDescriptionprotected Holder<SoundEvent> AbstractNautilus.getEquipSound(EquipmentSlot p_459196_, ItemStack p_459040_, Equippable p_459134_) booleanprotected voidAbstractNautilus.usePlayerItem(Player p_455137_, InteractionHand p_455733_, ItemStack p_456229_) -
Uses of ItemStack in net.minecraft.world.entity.animal.panda
Methods in net.minecraft.world.entity.animal.panda with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.parrot
Methods in net.minecraft.world.entity.animal.parrot with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.pig
Methods in net.minecraft.world.entity.animal.pig with parameters of type ItemStackModifier and TypeMethodDescriptionprotected Holder<SoundEvent> Pig.getEquipSound(EquipmentSlot p_477944_, ItemStack p_479907_, Equippable p_479723_) booleanChecks 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.polarbear
Methods in net.minecraft.world.entity.animal.polarbear with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.rabbit
Methods in net.minecraft.world.entity.animal.rabbit with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.sheep
Methods in net.minecraft.world.entity.animal.sheep with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanvoidSheep.shear(ServerLevel p_405075_, SoundSource p_405077_, ItemStack p_405709_) -
Uses of ItemStack in net.minecraft.world.entity.animal.sniffer
Methods in net.minecraft.world.entity.animal.sniffer with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.turtle
Methods in net.minecraft.world.entity.animal.turtle with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.animal.wolf
Methods in net.minecraft.world.entity.animal.wolf with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.boss.enderdragon
Methods in net.minecraft.world.entity.boss.enderdragon that return ItemStackModifier and TypeMethodDescriptionEndCrystal.getPickResult()@Nullable ItemStackEnderDragonPart.getPickResult() -
Uses of ItemStack in net.minecraft.world.entity.decoration
Fields in net.minecraft.world.entity.decoration with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor<ItemStack> ItemFrame.DATA_ITEMMethods in net.minecraft.world.entity.decoration that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackGlowItemFrame.getFrameItemStack()protected ItemStackItemFrame.getFrameItemStack()ItemFrame.getItem()ArmorStand.getPickResult()ItemFrame.getPickResult()LeashFenceKnotEntity.getPickResult()Methods in net.minecraft.world.entity.decoration with parameters of type ItemStackModifier and TypeMethodDescription@Nullable MapIdItemFrame.getFramedMapId(ItemStack pStack) private voidItemFrame.onItemChanged(ItemStack pItem) private voidItemFrame.removeFramedMap(ItemStack pStack) Removes the dot representing this frame's position from the map when the item frame is broken.voidvoidHangingEntity.spawnAtLocation(ServerLevel p_376865_, ItemStack p_31722_, float p_31723_) private booleanArmorStand.swapItem(Player pPlayer, EquipmentSlot pSlot, ItemStack pStack, InteractionHand pHand) -
Uses of ItemStack in net.minecraft.world.entity.decoration.painting
Methods in net.minecraft.world.entity.decoration.painting that return ItemStack -
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_ITEMMethods in net.minecraft.world.entity.item that return ItemStackMethods in net.minecraft.world.entity.item with parameters of type ItemStackModifier and TypeMethodDescriptionstatic booleanItemEntity.areMergable(ItemStack pDestinationStack, ItemStack pOriginStack) private static voidItemEntity.merge(ItemEntity pDestinationEntity, ItemStack pDestinationStack, ItemEntity pOriginEntity, ItemStack pOriginStack) private static voidItemEntity.merge(ItemEntity pDestinationEntity, ItemStack pDestinationStack, ItemStack pOriginStack) static ItemStackvoidSets 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 ItemStackMethods in net.minecraft.world.entity.monster with parameters of type ItemStackModifier and TypeMethodDescriptionprotected Holder<SoundEvent> Strider.getEquipSound(EquipmentSlot p_397775_, ItemStack p_397723_, Equippable p_397102_) Monster.getProjectile(ItemStack pShootable) booleanChecks 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.monster.hoglin
Methods in net.minecraft.world.entity.monster.hoglin with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.monster.illager
Methods in net.minecraft.world.entity.monster.illager with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanPillager.canUseNonMeleeWeapon(ItemStack p_478227_) private boolean -
Uses of ItemStack in net.minecraft.world.entity.monster.piglin
Methods in net.minecraft.world.entity.monster.piglin that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackPiglin.addToInventory(ItemStack pStack) private ItemStackPiglin.createSpawnWeapon()private static ItemStackPiglinAi.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 ItemStackPiglin.addToInventory(ItemStack pStack) protected booleanPiglin.canAddToInventory(ItemStack pStack) protected static booleanprotected booleanPiglin.canReplaceCurrentItem(ItemStack pCandidate) protected booleanPiglin.canReplaceCurrentItem(ItemStack pCandidate, ItemStack p_34713_, EquipmentSlot p_371356_) booleanPiglin.canUseNonMeleeWeapon(ItemStack p_482058_) protected voidPiglin.holdInMainHand(ItemStack pStack) private static voidPiglinAi.holdInOffhand(ServerLevel pLevel, Piglin pPiglin, ItemStack pStack) protected voidPiglin.holdInOffHand(ItemStack pStack) private static booleanPiglinAi.isBarterCurrency(ItemStack pStack) private static booleanprotected static booleanPiglinAi.isLovedItem(ItemStack pItem) private voidPiglin.maybeWearArmor(EquipmentSlot pSlot, ItemStack pStack, RandomSource pRandom) private static voidPiglinAi.putInInventory(Piglin pPiglin, ItemStack pStack) protected static booleanPiglinAi.wantsToPickup(Piglin pPiglin, ItemStack pStack) booleanPiglin.wantsToPickUp(ServerLevel p_376232_, ItemStack p_34777_) booleanPiglinBrute.wantsToPickUp(ServerLevel p_376577_, ItemStack p_35078_) Method parameters in net.minecraft.world.entity.monster.piglin with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate static voidPiglinAi.throwItems(Piglin pPilgin, List<ItemStack> pStacks) private static voidPiglinAi.throwItemsTowardPlayer(Piglin pPiglin, Player pPlayer, List<ItemStack> pStacks) private static voidPiglinAi.throwItemsTowardPos(Piglin pPiglin, List<ItemStack> pStacks, Vec3 pPos) private static voidPiglinAi.throwItemsTowardRandomPos(Piglin pPiglin, List<ItemStack> pStacks) -
Uses of ItemStack in net.minecraft.world.entity.monster.skeleton
Methods in net.minecraft.world.entity.monster.skeleton with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanWitherSkeleton.canHoldItem(ItemStack p_481295_) booleanAbstractSkeleton.canUseNonMeleeWeapon(ItemStack p_480354_) protected AbstractArrowprotected AbstractArrowprotected AbstractArrowprotected AbstractArrowprotected AbstractArrowvoidAbstractSkeleton.onEquipItem(EquipmentSlot p_482163_, ItemStack p_479233_, ItemStack p_480410_) voidBogged.shear(ServerLevel p_478846_, SoundSource p_478905_, ItemStack p_479396_) private voidBogged.spawnShearedMushrooms(ServerLevel pLevel, ItemStack pStack) booleanAbstractSkeleton.wantsToPickUp(ServerLevel p_478184_, ItemStack p_478128_) -
Uses of ItemStack in net.minecraft.world.entity.monster.zombie
Methods in net.minecraft.world.entity.monster.zombie with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanZombie.canHoldItem(ItemStack pStack) protected booleanDrowned.canReplaceCurrentItem(ItemStack p_481442_, ItemStack p_478938_, EquipmentSlot p_478744_) booleanDrowned.wantsToPickUp(ServerLevel p_478955_, ItemStack p_481464_) booleanZombie.wantsToPickUp(ServerLevel p_480741_, ItemStack p_478470_) booleanZombifiedPiglin.wantsToPickUp(ServerLevel p_477921_, ItemStack p_482096_) -
Uses of ItemStack in net.minecraft.world.entity.npc
Methods in net.minecraft.world.entity.npc with parameters of type ItemStackModifier and TypeMethodDescriptionvoidClientSideMerchant.notifyTradeUpdated(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not. -
Uses of ItemStack in net.minecraft.world.entity.npc.villager
Fields in net.minecraft.world.entity.npc.villager declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackVillagerTrades.EnchantedItemForEmeralds.itemStackprivate final ItemStackVillagerTrades.ItemsForEmeralds.itemStackprivate final ItemStackVillagerTrades.ItemsAndEmeraldsToItems.toItemprivate final ItemStackVillagerTrades.TippedArrowForItemsAndEmeralds.toItemAn ItemStack that can have potion effects written to it.Methods in net.minecraft.world.entity.npc.villager that return ItemStackMethods in net.minecraft.world.entity.npc.villager with parameters of type ItemStackModifier and TypeMethodDescriptionvoidAbstractVillager.notifyTradeUpdated(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.booleanVillager.wantsToPickUp(ServerLevel p_479148_, ItemStack p_478154_) Constructors in net.minecraft.world.entity.npc.villager with parameters of type ItemStackModifierConstructorDescriptionItemsAndEmeraldsToItems(ItemCost pFromItem, int pEmeraldCost, ItemStack pToItem, int pMaxUses, int pVillagerXp, float pPriceMultiplier, Optional<ResourceKey<EnchantmentProvider>> pEnchantmentProvider) 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.npc.wanderingtrader
Methods in net.minecraft.world.entity.npc.wanderingtrader with parameters of type ItemStack -
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 ItemStackMethods in net.minecraft.world.entity.player that return ItemStackModifier and TypeMethodDescriptionPlayerEquipment.get(EquipmentSlot p_401776_) Inventory.getItem(int pIndex) Returns the stack in the given slot.Player.getProjectile(ItemStack pShootable) Inventory.getSelectedItem()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.PlayerEquipment.set(EquipmentSlot p_401903_, ItemStack p_401882_) Inventory.setSelectedItem(ItemStack pStack) 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 TypeMethodDescriptionvoidStackedItemContents.accountSimpleStack(ItemStack pStack) voidStackedItemContents.accountStack(ItemStack pStack) voidStackedItemContents.accountStack(ItemStack pStack, int pMaxStackSize) booleanAdds the stack to the specified slot in the player's inventory.booleanAdds the stack to the first empty slot in the player's inventory.voidInventory.addAndPickItem(ItemStack pStack) booleanprivate intInventory.addResource(int pSlot, ItemStack pStack) private intInventory.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.booleanPlayer.cannotAttackWithItem(ItemStack pStack, int pAdjustTicks) booleanReturnstrueif the specifiedItemStackexists in the inventory.private DamageSourcePlayer.createAttackSource(ItemStack pStack) @Nullable ItemEntityDrops an item into the world.intInventory.findSlotMatchingCraftingIngredient(Holder<Item> pItem, ItemStack pStack) intInventory.findSlotMatchingItem(ItemStack pStack) Finds the stack or an equivalent one in the main inventoryPlayer.getProjectile(ItemStack pShootable) intInventory.getSlotWithRemainingSpace(ItemStack pStack) Stores a stack in the player's inventory.voidPlayer.handleCreativeModeItemDrop(ItemStack pStack) private booleanInventory.hasRemainingSpaceForItem(ItemStack pDestination, ItemStack pOrigin) static booleanInventory.isUsableForCrafting(ItemStack pStack) private voidPlayer.itemAttackInteraction(Entity pTarget, ItemStack pStack, DamageSource pDamageSource, boolean pDoPostAttack) booleanPlayer.mayUseItemAt(BlockPos pPos, Direction pFacing, ItemStack pStack) Returns whether this player can modify the block at a certain location with the given stack.voidPlayer.onEnchantmentPerformed(ItemStack pEnchantedItem, int pLevelCost) voidPlayer.openItemGui(ItemStack pStack, InteractionHand pHand) voidInventory.placeItemBackInInventory(ItemStack pStack) voidInventory.placeItemBackInInventory(ItemStack pStack, boolean pSendPacket) voidInventory.removeItem(ItemStack pStack) PlayerEquipment.set(EquipmentSlot p_401903_, ItemStack p_401882_) voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).Inventory.setSelectedItem(ItemStack pStack) voidPlayer.startAutoSpinAttack(int pTicks, float pDamage, ItemStack pItemStack) voidPlayer.updateTutorialInventoryAction(ItemStack pCarried, ItemStack pClicked, ClickAction pAction) Method parameters in net.minecraft.world.entity.player with type arguments of type ItemStackModifier and TypeMethodDescriptionintInventory.clearOrCountMatchingItems(Predicate<ItemStack> pStackPredicate, int pMaxCount, Container pInventory) booleanvoidPlayer.triggerRecipeCrafted(RecipeHolder<?> pRecipe, List<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.entity.projectile
Fields in net.minecraft.world.entity.projectile with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor<ItemStack> FireworkRocketEntity.DATA_ID_FIREWORKS_ITEMprivate static final EntityDataAccessor<ItemStack> EyeOfEnder.DATA_ITEM_STACKMethods in net.minecraft.world.entity.projectile that return ItemStackModifier and TypeMethodDescriptionprivate ItemStackEyeOfEnder.getDefaultItem()private static ItemStackFireworkRocketEntity.getDefaultItem()EyeOfEnder.getItem()FireworkRocketEntity.getItem()ItemSupplier.getItem()Methods in net.minecraft.world.entity.projectile with parameters of type ItemStackModifier and TypeMethodDescriptionvoidProjectile.applyOnProjectileSpawned(ServerLevel pLevel, ItemStack pSpawnedFrom) Projectile.ProjectileFactory.create(ServerLevel pLevel, LivingEntity pOwner, ItemStack pSpawnedFrom) static AbstractArrowProjectileUtil.getMobArrow(LivingEntity pOwner, ItemStack pPickupItemStack, float pVelocity, @Nullable ItemStack pWeapon) intvoidstatic <T extends Projectile>
TProjectile.spawnProjectile(T pProjectile, ServerLevel pLevel, ItemStack pSpawnedFrom) static <T extends Projectile>
TProjectile.spawnProjectile(T pProjectile, ServerLevel pLevel, ItemStack pStack, Consumer<T> pAdapter) static <T extends Projectile>
TProjectile.spawnProjectileFromRotation(Projectile.ProjectileFactory<T> pFactory, ServerLevel pLevel, ItemStack pSpawnedFrom, LivingEntity pOwner, float pZ, float pVelocity, float pInaccuracy) static <T extends Projectile>
TProjectile.spawnProjectileUsingShoot(Projectile.ProjectileFactory<T> pFactory, ServerLevel pLevel, ItemStack pSpawnedFrom, LivingEntity pOwner, double pX, double pY, double pZ, float pVelocity, float pInaccuracy) static <T extends Projectile>
TProjectile.spawnProjectileUsingShoot(T pProjectile, ServerLevel pLevel, ItemStack pSpawnedFrom, double pX, double pY, double pZ, float pVelocity, float pInaccuracy) Constructors in net.minecraft.world.entity.projectile with parameters of type ItemStackModifierConstructorDescriptionFireworkRocketEntity(Level pLevel, double pX, double pY, double pZ, ItemStack pStack) FireworkRocketEntity(Level pLevel, @Nullable 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) -
Uses of ItemStack in net.minecraft.world.entity.projectile.arrow
Fields in net.minecraft.world.entity.projectile.arrow declared as ItemStackModifier and TypeFieldDescriptionprivate @Nullable ItemStackAbstractArrow.firedFromWeaponprivate ItemStackAbstractArrow.pickupItemStackMethods in net.minecraft.world.entity.projectile.arrow that return ItemStackModifier and TypeMethodDescriptionprotected abstract ItemStackAbstractArrow.getDefaultPickupItem()protected ItemStackArrow.getDefaultPickupItem()protected ItemStackSpectralArrow.getDefaultPickupItem()protected ItemStackThrownTrident.getDefaultPickupItem()protected ItemStackAbstractArrow.getPickupItem()AbstractArrow.getPickupItemStackOrigin()@Nullable ItemStackAbstractArrow.getWeaponItem()ThrownTrident.getWeaponItem()Methods in net.minecraft.world.entity.projectile.arrow with parameters of type ItemStackModifier and TypeMethodDescriptionprivate byteThrownTrident.getLoyaltyFromItem(ItemStack pStack) protected voidAbstractArrow.hitBlockEnchantmentEffects(ServerLevel pLevel, BlockHitResult pHitResult, ItemStack pStack) protected voidThrownTrident.hitBlockEnchantmentEffects(ServerLevel p_478916_, BlockHitResult p_478335_, ItemStack p_478663_) protected voidAbstractArrow.setPickupItemStack(ItemStack pPickupItemStack) protected voidArrow.setPickupItemStack(ItemStack p_479444_) Constructors in net.minecraft.world.entity.projectile.arrow with parameters of type ItemStackModifierConstructorDescriptionprotectedAbstractArrow(EntityType<? extends AbstractArrow> pEntityType, double pX, double pY, double pZ, Level pLevel, ItemStack pPickupItemStack, @Nullable ItemStack pFiredFromWeapon) protectedAbstractArrow(EntityType<? extends AbstractArrow> pEntityType, LivingEntity pOwner, Level pLevel, ItemStack pPickupItemStack, @Nullable ItemStack pFiredFromWeapon) Arrow(Level pLevel, double pX, double pY, double pZ, ItemStack pPickupItemStack, @Nullable ItemStack pFiredFromWeapon) Arrow(Level pLevel, LivingEntity pOwner, ItemStack pPickupItemStack, @Nullable ItemStack pFiredFromWeapon) SpectralArrow(Level pLevel, double pX, double pY, double pZ, ItemStack pPickupItemStack, @Nullable ItemStack pFiredFromWeapon) SpectralArrow(Level pLevel, LivingEntity pOwner, ItemStack pPickupItemStack, @Nullable 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.hurtingprojectile
Fields in net.minecraft.world.entity.projectile.hurtingprojectile with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor<ItemStack> Fireball.DATA_ITEM_STACKMethods in net.minecraft.world.entity.projectile.hurtingprojectile that return ItemStackMethods in net.minecraft.world.entity.projectile.hurtingprojectile with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.projectile.hurtingprojectile.windcharge
Methods in net.minecraft.world.entity.projectile.hurtingprojectile.windcharge that return ItemStack -
Uses of ItemStack in net.minecraft.world.entity.projectile.throwableitemprojectile
Fields in net.minecraft.world.entity.projectile.throwableitemprojectile with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate static final EntityDataAccessor<ItemStack> ThrowableItemProjectile.DATA_ITEM_STACKMethods in net.minecraft.world.entity.projectile.throwableitemprojectile that return ItemStackMethods in net.minecraft.world.entity.projectile.throwableitemprojectile with parameters of type ItemStackModifier and TypeMethodDescriptionprotected abstract voidAbstractThrownPotion.onHitAsPotion(ServerLevel pLevel, ItemStack pStack, HitResult pHitResult) voidThrownLingeringPotion.onHitAsPotion(ServerLevel p_479772_, ItemStack p_481164_, HitResult p_478476_) voidThrownSplashPotion.onHitAsPotion(ServerLevel p_481678_, ItemStack p_478841_, HitResult p_478048_) voidConstructors in net.minecraft.world.entity.projectile.throwableitemprojectile with parameters of type ItemStackModifierConstructorDescriptionAbstractThrownPotion(EntityType<? extends AbstractThrownPotion> pEntityType, Level pLevel, double pX, double pY, double pZ, ItemStack pItem) AbstractThrownPotion(EntityType<? extends AbstractThrownPotion> pEntityType, Level pLevel, LivingEntity pOwner, ItemStack pItem) Snowball(Level pLevel, LivingEntity pOwner, ItemStack pItem) ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> pEntityType, double pX, double pY, double pZ, Level pLevel, ItemStack pItem) ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> pEntityType, LivingEntity pOwner, Level pLevel, ItemStack pItem) ThrownEgg(Level pLevel, LivingEntity pOwner, ItemStack pItem) ThrownEnderpearl(Level pLevel, LivingEntity pOwner, ItemStack pItem) ThrownExperienceBottle(Level pLevel, double pX, double pY, double pZ, ItemStack pItem) ThrownExperienceBottle(Level pLevel, LivingEntity pOwner, ItemStack pItem) ThrownLingeringPotion(Level pLevel, double pX, double pY, double pZ, ItemStack pItem) ThrownLingeringPotion(Level pLevel, LivingEntity pOwner, ItemStack pItem) ThrownSplashPotion(Level pLevel, double pX, double pY, double pZ, ItemStack pStack) ThrownSplashPotion(Level pLevel, LivingEntity pOwner, ItemStack pItem) -
Uses of ItemStack in net.minecraft.world.entity.raid
Methods in net.minecraft.world.entity.raid that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackRaid.getOminousBannerInstance(HolderGetter<BannerPattern> pPatternRegistry) -
Uses of ItemStack in net.minecraft.world.entity.vehicle
Methods in net.minecraft.world.entity.vehicle that return ItemStackModifier and TypeMethodDescriptiondefault ItemStackContainerEntity.getChestVehicleItem(int pSlot) default ItemStackContainerEntity.removeChestVehicleItem(int pSlot, int pAmount) default ItemStackContainerEntity.removeChestVehicleItemNoUpdate(int pSlot) Methods in net.minecraft.world.entity.vehicle that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.vehicle with parameters of type ItemStackModifier and TypeMethodDescriptiondefault voidContainerEntity.setChestVehicleItem(int pSlot, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.entity.vehicle.boat
Fields in net.minecraft.world.entity.vehicle.boat with type parameters of type ItemStackMethods in net.minecraft.world.entity.vehicle.boat that return ItemStackModifier and TypeMethodDescriptionAbstractChestBoat.getItem(int p_479344_) final ItemStackAbstractBoat.getPickResult()AbstractChestBoat.removeItem(int p_478146_, int p_480416_) AbstractChestBoat.removeItemNoUpdate(int p_479843_) Methods in net.minecraft.world.entity.vehicle.boat that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.vehicle.boat with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.entity.vehicle.minecart
Fields in net.minecraft.world.entity.vehicle.minecart with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate NonNullList<ItemStack> AbstractMinecartContainer.itemStacksMethods in net.minecraft.world.entity.vehicle.minecart that return ItemStackModifier and TypeMethodDescriptionAbstractMinecartContainer.getItem(int pIndex) Returns the stack in the given slot.abstract ItemStackAbstractMinecart.getPickResult()Minecart.getPickResult()MinecartChest.getPickResult()MinecartCommandBlock.getPickResult()MinecartFurnace.getPickResult()MinecartHopper.getPickResult()MinecartSpawner.getPickResult()MinecartTNT.getPickResult()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.AbstractMinecartContainer.removeItemNoUpdate(int pIndex) Removes a stack from the given slot and returns it.Methods in net.minecraft.world.entity.vehicle.minecart that return types with arguments of type ItemStackMethods in net.minecraft.world.entity.vehicle.minecart with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanstatic <T extends AbstractMinecart>
@Nullable TAbstractMinecart.createMinecart(Level pLevel, double pX, double pY, double pZ, EntityType<T> pEntityType, EntitySpawnReason pSpawnReason, ItemStack pStack, @Nullable Player pPlayer) voidSets 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
Methods in net.minecraft.world.food with parameters of type ItemStackModifier and TypeMethodDescriptionvoidFoodProperties.onConsume(Level p_366676_, LivingEntity p_366505_, ItemStack p_366556_, Consumable p_366719_) -
Uses of ItemStack in net.minecraft.world.inventory
Fields in net.minecraft.world.inventory declared as ItemStackModifier and TypeFieldDescriptionprivate ItemStackAbstractContainerMenu.carriedprivate ItemStackStonecutterMenu.inputThe ItemStack set in the input slot by the player.private @Nullable ItemStackRemoteSlot.Synchronized.remoteStackFields in net.minecraft.world.inventory with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final NonNullList<ItemStack> TransientCraftingContainer.itemsprivate final NonNullList<ItemStack> MerchantContainer.itemStacksprivate final NonNullList<ItemStack> ResultContainer.itemStacksprivate final NonNullList<ItemStack> AbstractContainerMenu.lastSlotsItemCombinerMenuSlotDefinition.SlotDefinition.mayPlaceThe field for themayPlacerecord component.Methods in net.minecraft.world.inventory that return ItemStackModifier and TypeMethodDescriptionprivate ItemStackGrindstoneMenu.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 p_287712_) private ItemStackGrindstoneMenu.mergeItems(ItemStack pInputItem, ItemStack pAdditionalItem) abstract ItemStackAbstractContainerMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.AbstractFurnaceMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.AbstractMountInventoryMenu.quickMoveStack(Player p_470679_, int p_470684_) BeaconMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.BrewingStandMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.CartographyTableMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.ChestMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.CrafterMenu.quickMoveStack(Player p_307459_, int p_307204_) CraftingMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.DispenserMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.EnchantmentMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.GrindstoneMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.HopperMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.InventoryMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.ItemCombinerMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.LecternMenu.quickMoveStack(Player p_219987_, int p_219988_) LoomMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.MerchantMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.ShulkerBoxMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.StonecutterMenu.quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis 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 p_287682_, int p_287576_) 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 p_287637_) private ItemStackGrindstoneMenu.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 TypeMethodDescriptionprivate static NonNullList<ItemStack> ResultSlot.copyAllInputItems(CraftingInput pInput) AbstractContainerMenu.getItems()CraftingContainer.getItems()TransientCraftingContainer.getItems()SmithingMenu.getRelevantItems()private NonNullList<ItemStack> ResultSlot.getRemainingItems(CraftingInput pInput, Level pLevel) ItemCombinerMenuSlotDefinition.SlotDefinition.mayPlace()Returns the value of themayPlacerecord component.Methods in net.minecraft.world.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionstatic booleanAbstractContainerMenu.canItemQuickReplace(@Nullable Slot pSlot, ItemStack pStack, boolean pStackSizeMatters) Checks if it's possible to add the given itemstack to the given slot.protected booleanItemCombinerMenu.canMoveIntoInputSlots(ItemStack pStack) booleanSmithingMenu.canMoveIntoInputSlots(ItemStack p_266846_) protected booleanbooleanAbstractContainerMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanCartographyTableMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanCraftingMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanInventoryMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanMerchantMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanSmithingMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.booleanStonecutterMenu.canTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected voidFurnaceResultSlot.checkTakeAchievements(ItemStack pStack) protected voidMerchantResultSlot.checkTakeAchievements(ItemStack pStack) protected voidResultSlot.checkTakeAchievements(ItemStack pStack) protected voidSlot.checkTakeAchievements(ItemStack pStack) private ItemStackGrindstoneMenu.computeResult(ItemStack pInputItem, ItemStack pAdditionalItem) private static voidAbstractContainerMenu.dropOrPlaceInInventory(Player pPlayer, ItemStack pStack) voidvoidprivate List<EnchantmentInstance> EnchantmentMenu.getEnchantmentList(RegistryAccess pRegistryAccess, ItemStack pStack, int pSlot, int pCost) intFurnaceFuelSlot.getMaxStackSize(ItemStack pStack) intSlot.getMaxStackSize(ItemStack pStack) static intAbstractContainerMenu.getQuickCraftPlaceCount(Set<Slot> pSlots, int pType, ItemStack pStack) private List<Holder<BannerPattern>> LoomMenu.getSelectablePatterns(ItemStack pStack) voidAbstractContainerMenu.initializeContents(int pStateId, List<ItemStack> pItems, ItemStack pCarried) static booleanprotected booleanbooleanbooleanbooleanbooleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanbooleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanbooleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.static booleanBrewingStandMenu.FuelSlot.mayPlaceItem(ItemStack pItemStack) Returnstrueif the givenItemStackis usable as fuel in the brewing stand.static booleanBrewingStandMenu.PotionSlot.mayPlaceItem(PotionBrewing potionBrewing, ItemStack p_39134_) static booleanBrewingStandMenu.PotionSlot.mayPlaceItem(ItemStack pStack) Deprecated.private voidGrindstoneMenu.mergeEnchantsFrom(ItemStack pInputItem, ItemStack pAdditionalItem) private ItemStackGrindstoneMenu.mergeItems(ItemStack pInputItem, ItemStack pAdditionalItem) protected booleanAbstractContainerMenu.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 voidFurnaceResultSlot.onQuickCraft(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item).protected voidMerchantResultSlot.onQuickCraft(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item).voidNonInteractiveResultSlot.onQuickCraft(ItemStack p_307668_, ItemStack p_307399_) protected voidResultSlot.onQuickCraft(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item).protected voidSlot.onQuickCraft(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item).voidSlot.onQuickCraft(ItemStack pOldStack, ItemStack pNewStack) if par2 has more items than par1, onCrafting(item,countIncrease) is calledprotected voidvoidvoidprotected abstract voidvoidvoidvoidvoidprotected voidprivate ItemStackGrindstoneMenu.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) voidContainerSynchronizer.sendCarriedChange(AbstractContainerMenu pContainerMenu, ItemStack pStack) voidContainerSynchronizer.sendInitialData(AbstractContainerMenu pContainer, List<ItemStack> pItems, ItemStack pCarried, int[] pRemoteDataSlots) voidContainerSynchronizer.sendSlotChange(AbstractContainerMenu pContainer, int pSlot, ItemStack pItemStack) voidHelper method to put a stack in the slot.voidArmorSlot.setByPlayer(ItemStack p_345031_, ItemStack p_344961_) voidSlot.setByPlayer(ItemStack pStack) voidSlot.setByPlayer(ItemStack pNewStack, ItemStack pOldStack) voidAbstractContainerMenu.setCarried(ItemStack pStack) voidPuts an ItemStack in a slot.voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidSets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidvoidAbstractContainerMenu.setRemoteSlot(int pSlot, ItemStack pStack) private voidStonecutterMenu.setupRecipeList(ItemStack pStack) private voidCartographyTableMenu.setupResultSlot(ItemStack pMap, ItemStack pFirstSlotStack, ItemStack pResultOutput) voidContainerListener.slotChanged(AbstractContainerMenu pContainerToSend, int pDataSlotIndex, ItemStack pStack) Sends the contents of an inventory slot to the client-side Container.voidCrafterMenu.slotChanged(AbstractContainerMenu p_307332_, int p_307437_, ItemStack p_307233_) private voidAbstractContainerMenu.synchronizeSlotToRemote(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private voidAbstractContainerMenu.triggerSlotListeners(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private booleanAbstractContainerMenu.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 voidRecipeCraftingHolder.awardUsedRecipes(Player pPlayer, List<ItemStack> pItems) voidAbstractContainerMenu.initializeContents(int pStateId, List<ItemStack> pItems, ItemStack pCarried) voidContainerSynchronizer.sendInitialData(AbstractContainerMenu pContainer, List<ItemStack> pItems, ItemStack pCarried, int[] pRemoteDataSlots) private voidAbstractContainerMenu.synchronizeSlotToRemote(int pSlotIndex, ItemStack pStack, Supplier<ItemStack> pSupplier) private voidAbstractContainerMenu.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 aSlotDefinitionrecord class.privateTransientCraftingContainer(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 ItemStackItemStack.EMPTYprivate @Nullable ItemStackCreativeModeTab.iconItemStackFields in net.minecraft.world.item with type parameters of type ItemStackModifier and TypeFieldDescriptionProjectileWeaponItem.ARROW_ONLYProjectileWeaponItem.ARROW_OR_FIREWORKstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.CODECprivate Collection<ItemStack> CreativeModeTab.displayItemsCreativeModeTab.displayItemsSearchTabCreativeModeTab.Builder.iconGeneratorCreativeModeTab.iconGeneratorstatic final com.mojang.serialization.MapCodec<ItemStack> ItemStack.MAP_CODECstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.OPTIONAL_CODECstatic final StreamCodec<RegistryFriendlyByteBuf, List<ItemStack>> ItemStack.OPTIONAL_LIST_STREAM_CODECstatic final StreamCodec<RegistryFriendlyByteBuf, ItemStack> ItemStack.OPTIONAL_STREAM_CODECstatic final StreamCodec<RegistryFriendlyByteBuf, ItemStack> ItemStack.OPTIONAL_UNTRUSTED_STREAM_CODECCreativeModeTab.ItemDisplayBuilder.searchTabContentsstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.SIMPLE_ITEM_CODECstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.SINGLE_ITEM_CODECstatic final StreamCodec<RegistryFriendlyByteBuf, ItemStack> ItemStack.STREAM_CODECstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.STRICT_CODECstatic final com.mojang.serialization.Codec<ItemStack> ItemStack.STRICT_SINGLE_ITEM_CODECfinal Collection<ItemStack> CreativeModeTab.ItemDisplayBuilder.tabContentsstatic final it.unimi.dsi.fastutil.Hash.Strategy<? super ItemStack> ItemStackLinkedSet.TYPE_AND_TAGMethods in net.minecraft.world.item that return ItemStackModifier and TypeMethodDescriptionprivate ItemStackItemStack.applyAfterUseComponentSideEffects(LivingEntity pEntity, ItemStack pStack) ItemStack.consumeAndReturn(int pAmount, @Nullable LivingEntity pEntity) ItemStack.copy()ItemStack.copyAndClear()ItemStack.copyWithCount(int pCount) static ItemStackInstrumentItem.create(Item pItem, Holder<Instrument> pInstrument) static ItemStackMapItem.create(ServerLevel pLevel, int pX, int pZ, byte pScale, boolean pTrackingPosition, boolean pUnlimitedTracking) static ItemStackItemUtils.createFilledResult(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack) static ItemStackItemUtils.createFilledResult(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack, boolean pPreventDuplicates) 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.SpyglassItem.finishUsingItem(ItemStack p_151209_, Level p_151210_, LivingEntity p_151211_) final ItemStackItem.getCraftingRemainder()Deprecated.ProjectileWeaponItem.getDefaultCreativeAmmo(@Nullable 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 ItemStackBucketItem.getEmptySuccessItem(ItemStack pBucketStack, Player pPlayer) static ItemStackProjectileWeaponItem.getHeldProjectile(LivingEntity pShooter, Predicate<ItemStack> pIsAmmo) CreativeModeTab.getIconItem()static ItemStackBundleItem.getSelectedItemStack(ItemStack pBundle) ItemStack.hurtAndConvertOnBreak(int pAmount, ItemLike pItem, LivingEntity pEntity, EquipmentSlot pSlot) 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 ItemStackItemStack.transmuteCopyIgnoreEmpty(ItemLike pItem, int pCount) protected ItemStackBottleItem.turnBottleIntoItem(ItemStack pBottleStack, Player pPlayer, ItemStack pFilledBottleStack) protected static ItemStackProjectileWeaponItem.useAmmo(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter, boolean pIntangible) Methods in net.minecraft.world.item that return types with arguments of type ItemStackModifier and TypeMethodDescriptionprivate static StreamCodec<RegistryFriendlyByteBuf, ItemStack> ItemStack.createOptionalStreamCodec(StreamCodec<RegistryFriendlyByteBuf, DataComponentPatch> pCodec) ItemStackLinkedSet.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 pFieldName) BundleItem.removeOneItemFromBundle(ItemStack pStack, Player pPlayer, BundleContents pBundleContents) ItemStack.validatedStreamCodec(StreamCodec<RegistryFriendlyByteBuf, ItemStack> pCodec) static com.mojang.serialization.DataResult<ItemStack> ItemStack.validateStrict(ItemStack pStack) Methods in net.minecraft.world.item with parameters of type ItemStackModifier and TypeMethodDescriptionvoidCreativeModeTab.ItemDisplayBuilder.accept(ItemStack p_250391_, CreativeModeTab.TabVisibility p_251472_) default voidvoidCreativeModeTab.Output.accept(ItemStack pStack, CreativeModeTab.TabVisibility pTabVisibility) voidItemCooldowns.addCooldown(ItemStack pStack, int pCooldown) voidDiscFragmentItem.appendHoverText(ItemStack p_220031_, Item.TooltipContext p_339652_, TooltipDisplay p_399746_, Consumer<Component> p_400199_, TooltipFlag p_220034_) voidHangingEntityItem.appendHoverText(ItemStack p_270235_, Item.TooltipContext p_339644_, TooltipDisplay p_400204_, Consumer<Component> p_400127_, TooltipFlag p_270170_) voidItem.appendHoverText(ItemStack pStack, Item.TooltipContext pContext, TooltipDisplay pTooltipDisplay, Consumer<Component> pTooltipAdder, TooltipFlag pFlag) Deprecated.voidSmithingTemplateItem.appendHoverText(ItemStack p_267313_, Item.TooltipContext p_339591_, TooltipDisplay p_399688_, Consumer<Component> p_400130_, TooltipFlag p_266857_) private ItemStackItemStack.applyAfterUseComponentSideEffects(LivingEntity pEntity, ItemStack pStack) static booleanBoneMealItem.applyBonemeal(ItemStack p_40628_, Level p_40629_, BlockPos p_40630_, @Nullable Player player) ArrowItem.asProjectile(Level p_338330_, Position p_338329_, ItemStack p_338197_, Direction p_338469_) EggItem.asProjectile(Level p_338884_, Position p_338312_, ItemStack p_338704_, Direction p_338366_) ExperienceBottleItem.asProjectile(Level p_338868_, Position p_338766_, ItemStack p_338321_, Direction p_338772_) FireChargeItem.asProjectile(Level p_338826_, Position p_338780_, ItemStack p_338320_, Direction p_338841_) FireworkRocketItem.asProjectile(Level p_338390_, Position p_338574_, ItemStack p_338487_, Direction p_338368_) ProjectileItem.asProjectile(Level pLevel, Position pPos, ItemStack pStack, Direction pDirection) SnowballItem.asProjectile(Level p_338685_, Position p_338637_, ItemStack p_338820_, Direction p_338856_) SpectralArrowItem.asProjectile(Level p_338332_, Position p_338313_, ItemStack p_338304_, Direction p_338842_) ThrowablePotionItem.asProjectile(Level p_338465_, Position p_338661_, ItemStack p_338506_, Direction p_338517_) TridentItem.asProjectile(Level p_338505_, Position p_338277_, ItemStack p_338353_, Direction p_338220_) WindChargeItem.asProjectile(Level p_338589_, Position p_338670_, ItemStack p_338308_, Direction p_338206_) booleanDebugStickItem.canDestroyBlock(ItemStack p_393705_, BlockState p_393781_, Level p_393500_, BlockPos p_394185_, LivingEntity p_394515_) booleanItem.canDestroyBlock(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, LivingEntity pEntity) booleanAxeItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanBrushItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanFireChargeItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanFishingRodItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanFlintAndSteelItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanHoeItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanShearsItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanShovelItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanSpyglassItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) booleanTridentItem.canPerformAction(ItemStack stack, ItemAbility itemAbility) voidBucketItem.checkExtraContent(@Nullable LivingEntity p_394527_, Level p_150712_, ItemStack p_150713_, BlockPos p_150714_) default voidDispensibleContainerItem.checkExtraContent(@Nullable LivingEntity pEntity, Level pLevel, ItemStack pStack, BlockPos pPos) voidMobBucketItem.checkExtraContent(@Nullable LivingEntity p_394402_, Level p_151147_, ItemStack p_151148_, BlockPos p_151149_) booleanArrowItem.createArrow(Level pLevel, ItemStack pPickupItemStack, LivingEntity pOwner, @Nullable ItemStack pWeapon) SpectralArrowItem.createArrow(Level p_43237_, ItemStack p_43238_, LivingEntity p_43239_, @Nullable ItemStack p_345773_) static ItemStackItemUtils.createFilledResult(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack) static ItemStackItemUtils.createFilledResult(ItemStack pEmptyStack, Player pPlayer, ItemStack pFilledStack, boolean pPreventDuplicates) protected AbstractThrownPotionLingeringPotionItem.createPotion(ServerLevel p_400122_, LivingEntity p_400210_, ItemStack p_399574_) protected AbstractThrownPotionLingeringPotionItem.createPotion(Level p_399818_, Position p_399889_, ItemStack p_399694_) protected AbstractThrownPotionSplashPotionItem.createPotion(ServerLevel p_481019_, LivingEntity p_479852_, ItemStack p_399625_) protected AbstractThrownPotionSplashPotionItem.createPotion(Level p_481940_, Position p_480276_, ItemStack p_399587_) protected abstract AbstractThrownPotionThrowablePotionItem.createPotion(ServerLevel pLevel, LivingEntity pEntity, ItemStack pStack) protected abstract AbstractThrownPotionThrowablePotionItem.createPotion(Level pLevel, Position pPos, ItemStack pStack) protected ProjectileCrossbowItem.createProjectile(Level p_331583_, LivingEntity p_40863_, ItemStack p_40864_, ItemStack p_40865_, boolean p_40866_) protected ProjectileProjectileWeaponItem.createProjectile(Level pLevel, LivingEntity pShooter, ItemStack pWeapon, ItemStack pAmmo, boolean pIsCrit) ProjectileWeaponItem.customArrow(AbstractArrow arrow, ItemStack projectileStack, ItemStack weaponStack) ProjectileWeaponItem.draw(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter) private booleanBundleItem.dropContent(ItemStack pStack, Player pPlayer) private voidBundleItem.dropContent(Level pLevel, Player pPlayer, ItemStack pStack) booleanBucketItem.emptyContents(@Nullable LivingEntity p_394627_, Level p_150717_, BlockPos p_150718_, @Nullable BlockHitResult p_150719_, @Nullable ItemStack container) Item.finishUsingItem(ItemStack pStack, Level pLevel, LivingEntity pLivingEntity) Called when the player finishes using this Item (E.g. finishes eating.).SpyglassItem.finishUsingItem(ItemStack p_151209_, Level p_151210_, LivingEntity p_151211_) static Optional<Holder<JukeboxSong>> JukeboxSong.fromStack(HolderLookup.Provider pRegistries, ItemStack pStack) ProjectileWeaponItem.getAllSupportedProjectiles(ItemStack stack) Override this method if the allowed projectile is weapon stack dependent.intBundleItem.getBarColor(ItemStack p_150773_) intItem.getBarColor(ItemStack pStack) intBundleItem.getBarWidth(ItemStack p_150771_) intItem.getBarWidth(ItemStack pStack) private @Nullable AbstractBoatstatic intCrossbowItem.getChargeDuration(ItemStack pStack, LivingEntity pShooter) (package private) CrossbowItem.ChargingSoundsCrossbowItem.getChargingSounds(ItemStack pStack) static @Nullable DyeColorItemCooldowns.getCooldownGroup(ItemStack pStack) floatItemCooldowns.getCooldownPercent(ItemStack pStack, float pPartialTick) protected @Nullable MapItemSavedDataMapItem.getCustomMapData(ItemStack p_42854_, Level p_42855_) ProjectileWeaponItem.getDefaultCreativeAmmo(@Nullable Player player, ItemStack projectileWeaponItem) Neo: Controls what ammo ItemStack that Creative Mode should return if the player has no valid ammo in inventory.floatItem.getDestroySpeed(ItemStack pStack, BlockState pState) protected intCrossbowItem.getDurabilityUse(ItemStack p_331489_) protected intProjectileWeaponItem.getDurabilityUse(ItemStack pStack) static ItemStackBucketItem.getEmptySuccessItem(ItemStack pBucketStack, Player pPlayer) static floatBundleItem.getFullnessDisplay(ItemStack pStack) private Optional<Holder<Instrument>> InstrumentItem.getInstrument(ItemStack pStack, HolderLookup.Provider pRegistries) static intBundleItem.getNumberOfItemsToShow(ItemStack pBundle) private static floatCrossbowItem.getPowerForTime(int pTimeLeft, ItemStack pStack, LivingEntity pShooter) static @Nullable MapItemSavedDataMapItem.getSavedData(ItemStack pStack, Level pLevel) static intBundleItem.getSelectedItem(ItemStack pBundle) static ItemStackBundleItem.getSelectedItemStack(ItemStack pBundle) 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 p_150775_) Item.getTooltipImage(ItemStack pStack) @Nullable EntityType<?> BowItem.getUseAnimation(ItemStack p_40678_) BrushItem.getUseAnimation(ItemStack p_273490_) BundleItem.getUseAnimation(ItemStack p_389672_) CrossbowItem.getUseAnimation(ItemStack p_40935_) InstrumentItem.getUseAnimation(ItemStack p_220133_) Item.getUseAnimation(ItemStack pStack) SpyglassItem.getUseAnimation(ItemStack p_151224_) TridentItem.getUseAnimation(ItemStack p_43417_) intBowItem.getUseDuration(ItemStack p_40680_, LivingEntity p_345962_) intBrushItem.getUseDuration(ItemStack p_272765_, LivingEntity p_344739_) intBundleItem.getUseDuration(ItemStack p_371683_, LivingEntity p_371530_) intCrossbowItem.getUseDuration(ItemStack p_40938_, LivingEntity p_344898_) intEnderEyeItem.getUseDuration(ItemStack p_326954_, LivingEntity p_346241_) intInstrumentItem.getUseDuration(ItemStack p_220131_, LivingEntity p_345916_) intItem.getUseDuration(ItemStack pStack, LivingEntity pEntity) intSpyglassItem.getUseDuration(ItemStack p_151222_, LivingEntity p_345399_) intTridentItem.getUseDuration(ItemStack p_43419_, LivingEntity p_345001_) static booleanDeprecated.static booleanBoneMealItem.growWaterPlant(ItemStack pStack, Level pLevel, BlockPos pPos, @Nullable Direction pClickedSide) private booleanDebugStickItem.handleInteraction(Player pPlayer, BlockState pStateClicked, LevelAccessor pAccessor, BlockPos pPos, boolean pShouldCycleState, ItemStack pDebugStack) static intItemStack.hashItemAndComponents(@Nullable ItemStack pStack) static booleanBundleItem.hasSelectedItem(ItemStack pBundle) voidItem.hurtEnemy(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) voidMaceItem.hurtEnemy(ItemStack p_334046_, LivingEntity p_333712_, LivingEntity p_333812_) 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.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)voidCompassItem.inventoryTick(ItemStack p_40720_, ServerLevel p_401770_, Entity p_40722_, @Nullable EquipmentSlot p_401781_) voidItem.inventoryTick(ItemStack pStack, ServerLevel pLevel, Entity pEntity, @Nullable EquipmentSlot pSlot) voidMapItem.inventoryTick(ItemStack p_42870_, ServerLevel p_401792_, Entity p_42872_, @Nullable EquipmentSlot p_401885_) booleanBundleItem.isBarVisible(ItemStack p_150769_) booleanItem.isBarVisible(ItemStack pStack) static booleanbooleanItem.isCombineRepairable(ItemStack stack) booleanItem.isCorrectToolForDrops(ItemStack pStack, BlockState pState) booleanReturnstrueif this item has an enchantment glint.booleanReturnstrueif this item has an enchantment glint.booleanArrowItem.isInfinite(ItemStack ammo, ItemStack bow, LivingEntity livingEntity) Called to determine if this arrow will be infinite when fired.booleanItemCooldowns.isOnCooldown(ItemStack pStack) static booleanItemStack.isSameItem(ItemStack pStack, ItemStack pOther) static booleanItemStack.isSameItemSameComponents(ItemStack pStack, ItemStack pOther) booleanItemStack.isValidRepairItem(ItemStack pItem) private static voidMapItem.lockMap(ItemStack pStack, ServerLevel pLevel) static booleanCompares bothItemStacks, returnstrueif bothItemStacksare equal.static booleanItemStack.matchesIgnoringComponents(ItemStack pStack, ItemStack pOther, Predicate<DataComponentType<?>> pShouldIgnore) protected booleanHangingEntityItem.mayPlace(Player pPlayer, Direction pDirection, ItemStack pHangingEntityStack, BlockPos pPos) protected booleanbooleanItem.mineBlock(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pMiningEntity) Called when aBlockis destroyed using this Item.booleanShearsItem.mineBlock(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pEntityLiving) Called when aBlockis destroyed using this Item.voidItem.onCraftedBy(ItemStack pStack, Player pPlayer) voidItem.onCraftedPostProcess(ItemStack pStack, Level pLevel) voidMapItem.onCraftedPostProcess(ItemStack p_42913_, Level p_42914_) voidBrushItem.onUseTick(Level p_273467_, LivingEntity p_273619_, ItemStack p_273316_, int p_273101_) voidBundleItem.onUseTick(Level p_371661_, LivingEntity p_371559_, ItemStack p_371431_, int p_371432_) voidCrossbowItem.onUseTick(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pCount) Called as the item is being used by an entity.voidItem.onUseTick(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pRemainingUseDuration) Called as the item is being used by an entity.booleanBundleItem.overrideOtherStackedOnMe(ItemStack p_150742_, ItemStack p_150743_, Slot p_150744_, ClickAction p_150745_, Player p_150746_, SlotAccess p_150747_) booleanItem.overrideOtherStackedOnMe(ItemStack pStack, ItemStack pOther, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) booleanItemStack.overrideOtherStackedOnMe(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer, SlotAccess pAccess) booleanBundleItem.overrideStackedOnOther(ItemStack p_150733_, Slot p_150734_, ClickAction p_150735_, Player p_150736_) booleanItem.overrideStackedOnOther(ItemStack pStack, Slot pSlot, ClickAction pAction, Player pPlayer) voidCrossbowItem.performShooting(Level pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, float pVelocity, float pInaccuracy, @Nullable LivingEntity pTarget) voidItem.postHurtEnemy(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) voidMaceItem.postHurtEnemy(ItemStack p_345716_, LivingEntity p_345817_, LivingEntity p_346003_) booleanBowItem.releaseUsing(ItemStack p_40667_, Level p_40668_, LivingEntity p_40669_, int p_40670_) booleanCrossbowItem.releaseUsing(ItemStack p_40875_, Level p_40876_, LivingEntity p_40877_, int p_40878_) booleanItem.releaseUsing(ItemStack pStack, Level pLevel, LivingEntity pEntity, int pTimeLeft) booleanSpyglassItem.releaseUsing(ItemStack p_151213_, Level p_151214_, LivingEntity p_151215_, int p_151216_) booleanTridentItem.releaseUsing(ItemStack p_43394_, Level p_43395_, LivingEntity p_43396_, int p_43397_) BundleItem.removeOneItemFromBundle(ItemStack pStack, Player pPlayer, BundleContents pBundleContents) static voidMapItem.renderBiomePreviewMap(ServerLevel pServerLevel, ItemStack pStack) private static voidMapItem.scaleMap(ItemStack pStack, ServerLevel pLevel) static voidBlockItem.setBlockEntityData(ItemStack pStack, BlockEntityType<?> pBlockEntityType, TagValueOutput pOutput) protected voidProjectileWeaponItem.shoot(ServerLevel pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, List<ItemStack> pProjectileItems, float pVelocity, float pInaccuracy, boolean pIsCrit, @Nullable LivingEntity pTarget) booleanBlockItem.shouldPrintOpWarning(ItemStack p_387255_, @Nullable Player p_387661_) booleanItem.shouldPrintOpWarning(ItemStack pStack, @Nullable Player pPlayer) booleanSpawnEggItem.shouldPrintOpWarning(ItemStack p_390471_, @Nullable Player p_390407_) private voidMobBucketItem.spawn(ServerLevel pServerLevel, ItemStack pBucketedMobStack, BlockPos pPos) private InteractionResultSpawnEggItem.spawnMob(@Nullable LivingEntity pSource, ItemStack pStack, Level pLevel, BlockPos pPos, boolean pShouldOffsetY, boolean pShouldOffsetYMore) SpawnEggItem.spawnOffspringFromSpawnEgg(Player pPlayer, Mob pMob, EntityType<? extends Mob> pEntityType, ServerLevel pServerLevel, Vec3 pPos, ItemStack pStack) booleanSpawnEggItem.spawnsEntity(ItemStack pStack, EntityType<?> pEntityType) static voidBundleItem.toggleSelectedItem(ItemStack pBundle, int pSelectedItem) static InteractionResultJukeboxPlayable.tryInsertIntoJukebox(Level pLevel, BlockPos pPos, ItemStack pStack, Player pPlayer) private static booleanCrossbowItem.tryLoadProjectiles(LivingEntity pShooter, ItemStack pCrossbowStack) protected ItemStackBottleItem.turnBottleIntoItem(ItemStack pBottleStack, Player pPlayer, ItemStack pFilledBottleStack) private static voidBlockItem.updateBlockEntityComponents(Level pLevel, BlockPos pPoa, ItemStack pStack) private BlockStateBlockItem.updateBlockStateFromTag(BlockPos pPos, Level pLevel, ItemStack pStack, BlockState pState) protected booleanBlockItem.updateCustomBlockEntityTag(BlockPos pPos, Level pLevel, @Nullable Player pPlayer, ItemStack pStack, BlockState pState) static booleanBlockItem.updateCustomBlockEntityTag(Level pLevel, @Nullable Player pPlayer, BlockPos pPos, ItemStack pStack) protected booleanSignItem.updateCustomBlockEntityTag(BlockPos pPos, Level pLevel, @Nullable Player pPlayer, ItemStack pStack, BlockState pState) protected static ItemStackProjectileWeaponItem.useAmmo(ItemStack pWeapon, ItemStack pAmmo, LivingEntity pShooter, boolean pIntangible) booleanCrossbowItem.useOnRelease(ItemStack p_150801_) booleanItem.useOnRelease(ItemStack pStack) If this stack's item is a crossbowstatic com.mojang.serialization.DataResult<ItemStack> ItemStack.validateStrict(ItemStack pStack) Method parameters in net.minecraft.world.item with type arguments of type ItemStackModifier and TypeMethodDescriptiondefault voidCreativeModeTab.Output.acceptAll(Collection<ItemStack> pStacks) default voidCreativeModeTab.Output.acceptAll(Collection<ItemStack> pStacks, CreativeModeTab.TabVisibility pTabVisibility) static ItemStackProjectileWeaponItem.getHeldProjectile(LivingEntity pShooter, Predicate<ItemStack> pIsAmmo) static intItemStack.hashStackList(List<ItemStack> pList) Deprecated.static booleanItemStack.listMatches(List<ItemStack> pList, List<ItemStack> pOther) Deprecated.static voidItemUtils.onContainerDestroyed(ItemEntity pContainer, Iterable<ItemStack> pContents) protected voidProjectileWeaponItem.shoot(ServerLevel pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pWeapon, List<ItemStack> pProjectileItems, float pVelocity, float pInaccuracy, boolean pIsCrit, @Nullable 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, Identifier scrollerSpriteLocation, boolean hasSearchBar, int searchBarWidth, Identifier tabsImage, int labelColor, int slotColor, List<Identifier> tabsBefore, List<Identifier> tabsAfter) -
Uses of ItemStack in net.minecraft.world.item.alchemy
Methods in net.minecraft.world.item.alchemy that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackPotionContents.createItemStack(Item pItem, Holder<Potion> pPotion) Methods in net.minecraft.world.item.alchemy with parameters of type ItemStackModifier and TypeMethodDescriptionvoidPotionBrewing.Builder.addRecipe(Ingredient input, Ingredient ingredient, ItemStack output) Adds a new simple brewing recipe.booleanPotionBrewing.hasContainerMix(ItemStack pReagent, ItemStack pPotionItem) booleanbooleanPotionBrewing.hasPotionMix(ItemStack pReagent, ItemStack pPotionItem) private booleanPotionBrewing.isContainer(ItemStack pStack) booleanPotionBrewing.isContainerIngredient(ItemStack pStack) booleanPotionBrewing.isIngredient(ItemStack pStack) booleanChecks if an item stack is a valid input for brewing, for use in the lower 3 slots where water bottles would normally go.booleanPotionBrewing.isPotionIngredient(ItemStack pStack) voidPotionContents.onConsume(Level p_366836_, LivingEntity p_366750_, ItemStack p_366399_, Consumable p_366541_) -
Uses of ItemStack in net.minecraft.world.item.component
Fields in net.minecraft.world.item.component declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackUseRemainder.convertIntoThe field for theconvertIntorecord component.private final ItemStackItemContainerContents.Slot.itemThe field for theitemrecord component.Fields in net.minecraft.world.item.component with type parameters of type ItemStackModifier and TypeFieldDescriptionBundleContents.itemsBundleContents.Mutable.itemsChargedProjectiles.itemsprivate final NonNullList<ItemStack> ItemContainerContents.itemsMethods in net.minecraft.world.item.component that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackUseRemainder.convertInto()Returns the value of theconvertIntorecord component.UseRemainder.convertIntoRemainder(ItemStack pStack, int pCount, boolean pHasInfiniteMaterials, UseRemainder.OnExtraCreatedRemainder pOnExtraCreated) 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 theitemrecord component.Consumable.onConsume(Level pLevel, LivingEntity pEntity, ItemStack pStack) @Nullable ItemStackBundleContents.Mutable.removeOne()Methods in net.minecraft.world.item.component that return types with arguments of type ItemStackModifier and TypeMethodDescriptionChargedProjectiles.getItems()BundleContents.itemCopyStream()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 TypeMethodDescriptionprivate static voidChargedProjectiles.addProjectileTooltip(Item.TooltipContext pContext, Consumer<Component> pTooltipAdder, ItemStack pStack, int pCount) voidUseCooldown.apply(ItemStack pStack, LivingEntity pEntity) voidstatic ItemStackvoidDeathProtection.applyEffects(ItemStack pStack, LivingEntity pEntity) booleanConsumable.canConsume(LivingEntity pEntity, ItemStack pStack) static booleanBundleContents.canItemBeInBundle(ItemStack pStack) UseRemainder.convertIntoRemainder(ItemStack pStack, int pCount, boolean pHasInfiniteMaterials, UseRemainder.OnExtraCreatedRemainder pOnExtraCreated) voidKineticWeapon.damageEntities(ItemStack pStack, int pRemainingUseDuration, LivingEntity pEntity, EquipmentSlot pSlot) voidBlocksAttacks.disable(ServerLevel pLevel, LivingEntity pEntity, float pDuration, ItemStack pStack) voidConsumable.emitParticlesAndSounds(RandomSource pRandom, LivingEntity pEntity, ItemStack pStack, int pAmount) private intBundleContents.Mutable.findStackIndex(ItemStack pStack) Consumable.OverrideConsumeSound.getConsumeSound(ItemStack pStack) private intBundleContents.Mutable.getMaxAmountToAdd(ItemStack pStack) static intDyedItemColor.getOrDefault(ItemStack pStack, int pDefaultValue) (package private) static org.apache.commons.lang3.math.FractionvoidBlocksAttacks.hurtBlockingItem(Level pLevel, ItemStack pStack, LivingEntity pEntity, InteractionHand pHand, float pDamage) voidBlocksAttacks.hurtBlockingItem(Level pLevel, ItemStack pStack, LivingEntity pEntity, InteractionHand pHand, float pDamage, int fixedDamage) static ChargedProjectilesConsumable.onConsume(Level pLevel, LivingEntity pEntity, ItemStack pStack) voidConsumableListener.onConsume(Level pLevel, LivingEntity pEntity, ItemStack pStack, Consumable pConsumable) voidOminousBottleAmplifier.onConsume(Level p_366547_, LivingEntity p_366849_, ItemStack p_366530_, Consumable p_366459_) voidSuspiciousStewEffects.onConsume(Level p_366904_, LivingEntity p_366405_, ItemStack p_366604_, Consumable p_366817_) static booleanWrittenBookContent.resolveForItem(ItemStack pStack, CommandSourceStack pSource, @Nullable Player pPlayer) static voidCustomData.set(DataComponentType<CustomData> pComponentType, ItemStack pStack, CompoundTag pTag) Consumable.startConsuming(LivingEntity pEntity, ItemStack pStack, InteractionHand pHand) intstatic voidCustomData.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 com.mojang.serialization.DataResult<BundleContents> BundleContents.checkAndCreate(List<ItemStack> pItems) private static org.apache.commons.lang3.math.FractionBundleContents.computeContentWeight(List<ItemStack> pContent) voidItemContainerContents.copyInto(NonNullList<ItemStack> pList) private static intItemContainerContents.findLastNonEmptySlot(List<ItemStack> pItems) static ItemContainerContentsstatic ChargedProjectilesConstructors in net.minecraft.world.item.component with parameters of type ItemStackModifierConstructorDescription(package private)Creates an instance of aSlotrecord class.UseRemainder(ItemStack convertInto) Creates an instance of aUseRemainderrecord class.Constructor parameters in net.minecraft.world.item.component with type arguments of type ItemStackModifierConstructorDescriptionBundleContents(List<ItemStack> pItems) (package private)BundleContents(List<ItemStack> pItems, org.apache.commons.lang3.math.Fraction pWeight, int pSelectedItem) privateChargedProjectiles(List<ItemStack> pItems) privateItemContainerContents(List<ItemStack> pItems) privateItemContainerContents(NonNullList<ItemStack> pItems) -
Uses of ItemStack in net.minecraft.world.item.consume_effects
Methods in net.minecraft.world.item.consume_effects with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanApplyStatusEffectsConsumeEffect.apply(Level p_366679_, ItemStack p_366517_, LivingEntity p_366435_) booleanClearAllStatusEffectsConsumeEffect.apply(Level p_366806_, ItemStack p_366692_, LivingEntity p_366699_) booleanConsumeEffect.apply(Level pLevel, ItemStack pStack, LivingEntity pEntity) booleanPlaySoundConsumeEffect.apply(Level p_366628_, ItemStack p_366717_, LivingEntity p_366700_) booleanRemoveStatusEffectsConsumeEffect.apply(Level p_366881_, ItemStack p_366460_, LivingEntity p_366649_) booleanTeleportRandomlyConsumeEffect.apply(Level p_366648_, ItemStack p_366476_, LivingEntity p_366884_) -
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 p_43638_, @Nullable Player p_43639_, InteractionHand p_43640_, ItemStack p_43641_, BlockHitResult p_43642_) DirectionalPlaceContext(Level pLevel, BlockPos pPos, Direction pDirection, ItemStack pItemStack, Direction pFace) UseOnContext(Level pLevel, @Nullable 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 ItemStackSmithingRecipeInput.additionThe field for theadditionrecord component.private final ItemStackSmithingRecipeInput.baseThe field for thebaserecord component.private final ItemStackSingleRecipeInput.itemThe field for theitemrecord component.(package private) final ItemStackShapedRecipe.result(package private) final ItemStackShapelessRecipe.resultprivate final ItemStackSingleItemRecipe.resultprivate final ItemStackSmithingRecipeInput.templateThe field for thetemplaterecord component.Fields in net.minecraft.world.item.crafting with type parameters of type ItemStackModifier and TypeFieldDescriptionCraftingInput.itemsprivate final NonNullList<ItemStack> RecipeCache.Entry.keyThe field for thekeyrecord component.Methods in net.minecraft.world.item.crafting that return ItemStackModifier and TypeMethodDescriptionSmithingRecipeInput.addition()Returns the value of theadditionrecord component.static ItemStackSmithingTrimRecipe.applyTrim(HolderLookup.Provider pRegistries, ItemStack pBase, ItemStack pAddition, Holder<TrimPattern> pPattern) ArmorDyeRecipe.assemble(CraftingInput p_344909_, HolderLookup.Provider p_335722_) BannerDuplicateRecipe.assemble(CraftingInput p_346069_, HolderLookup.Provider p_335574_) BookCloningRecipe.assemble(CraftingInput p_345803_, HolderLookup.Provider p_335702_) DecoratedPotRecipe.assemble(CraftingInput p_345761_, HolderLookup.Provider p_335840_) FireworkRocketRecipe.assemble(CraftingInput p_345921_, HolderLookup.Provider p_335560_) FireworkStarFadeRecipe.assemble(CraftingInput p_346017_, HolderLookup.Provider p_335705_) FireworkStarRecipe.assemble(CraftingInput p_346206_, HolderLookup.Provider p_335498_) MapCloningRecipe.assemble(CraftingInput p_344908_, HolderLookup.Provider p_335660_) MapExtendingRecipe.assemble(CraftingInput p_345831_, HolderLookup.Provider p_335387_) Recipe.assemble(T pInput, HolderLookup.Provider pRegistries) RepairItemRecipe.assemble(CraftingInput p_346224_, HolderLookup.Provider p_335610_) ShapedRecipe.assemble(CraftingInput p_345201_, HolderLookup.Provider p_335688_) ShapelessRecipe.assemble(CraftingInput p_345555_, HolderLookup.Provider p_335725_) ShieldDecorationRecipe.assemble(CraftingInput p_345351_, HolderLookup.Provider p_335895_) SingleItemRecipe.assemble(SingleRecipeInput p_345857_, HolderLookup.Provider p_335463_) SmithingTransformRecipe.assemble(SmithingRecipeInput p_345093_, HolderLookup.Provider p_345488_) SmithingTrimRecipe.assemble(SmithingRecipeInput p_345750_, HolderLookup.Provider p_335536_) TippedArrowRecipe.assemble(CraftingInput p_345174_, HolderLookup.Provider p_335792_) TransmuteRecipe.assemble(CraftingInput p_374148_, HolderLookup.Provider p_374579_) private static ItemStackDecoratedPotRecipe.back(CraftingInput pInput) SmithingRecipeInput.base()Returns the value of thebaserecord component.private static ItemStackMapExtendingRecipe.findFilledMap(CraftingInput pInput) private static ItemStackDecoratedPotRecipe.front(CraftingInput pInput) CraftingInput.getItem(int p_345667_) CraftingInput.getItem(int pRow, int pColumn) RecipeInput.getItem(int pIndex) SingleRecipeInput.getItem(int p_345528_) SmithingRecipeInput.getItem(int p_346205_) SingleRecipeInput.item()Returns the value of theitemrecord component.private static ItemStackDecoratedPotRecipe.left(CraftingInput pInput) protected ItemStackSingleItemRecipe.result()private static ItemStackDecoratedPotRecipe.right(CraftingInput pInput) SmithingRecipeInput.template()Returns the value of thetemplaterecord component.Methods in net.minecraft.world.item.crafting that return types with arguments of type ItemStackModifier and TypeMethodDescriptionstatic NonNullList<ItemStack> CraftingRecipe.defaultCraftingReminder(CraftingInput pInput) RepairItemRecipe.getItemsToCombine(CraftingInput pInput) RepairItemRecipe.getItemsToCombine(CraftingInput pInput) BannerDuplicateRecipe.getRemainingItems(CraftingInput p_345377_) BookCloningRecipe.getRemainingItems(CraftingInput p_344763_) default NonNullList<ItemStack> CraftingRecipe.getRemainingItems(CraftingInput pInput) CraftingInput.items()RecipeCache.Entry.key()Returns the value of thekeyrecord component.Methods in net.minecraft.world.item.crafting with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanSelectableRecipe.SingleInputSet.acceptsInput(ItemStack pStack) static ItemStackSmithingTrimRecipe.applyTrim(HolderLookup.Provider pRegistries, ItemStack pBase, ItemStack pAddition, Holder<TrimPattern> pPattern) private static booleanRepairItemRecipe.canCombine(ItemStack pStack1, ItemStack pStack2) AbstractCookingRecipe.Factory.create(String pGroup, CookingBookCategory pCategory, Ingredient pIngredient, ItemStack pResult, float pExperience, int pCookingTime) SingleItemRecipe.Factory.create(String pGroup, Ingredient pIngredient, ItemStack pResult) booleanTransmuteResult.isResultUnchanged(ItemStack pStack) SelectableRecipe.SingleInputSet.selectByInput(ItemStack pStack) booleanbooleanstatic booleanIngredient.testOptionalIngredient(Optional<Ingredient> pIngredient, ItemStack pStack) Method parameters in net.minecraft.world.item.crafting with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic CraftingInputstatic CraftingInput.PositionedCraftingInput.ofPositioned(int pWidth, int pHeight, List<ItemStack> pItems) Constructors in net.minecraft.world.item.crafting with parameters of type ItemStackModifierConstructorDescriptionAbstractCookingRecipe(String pGroup, CookingBookCategory pCategory, Ingredient pInput, 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) 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, List<Ingredient> pIngredients) SingleItemRecipe(String pGroup, Ingredient pInput, ItemStack pResult) SingleRecipeInput(ItemStack item) Creates an instance of aSingleRecipeInputrecord 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 aSmithingRecipeInputrecord class.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 ItemStackModifierConstructorDescriptionprivateCraftingInput(int pWidth, int pHeight, List<ItemStack> pItem) (package private)Entry(NonNullList<ItemStack> key, int width, int height, @Nullable RecipeHolder<CraftingRecipe> value) Creates an instance of aEntryrecord class. -
Uses of ItemStack in net.minecraft.world.item.crafting.display
Fields in net.minecraft.world.item.crafting.display declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackSlotDisplay.ItemStackSlotDisplay.stackThe field for thestackrecord component.Methods in net.minecraft.world.item.crafting.display that return ItemStackModifier and TypeMethodDescriptiondefault ItemStackSlotDisplay.resolveForFirstStack(ContextMap pContext) SlotDisplay.ItemStackSlotDisplay.stack()Returns the value of thestackrecord component.Methods in net.minecraft.world.item.crafting.display that return types with arguments of type ItemStackModifier and TypeMethodDescriptionSlotDisplay.resolveForStacks(ContextMap pContext) RecipeDisplayEntry.resultItems(ContextMap pContext) Methods in net.minecraft.world.item.crafting.display with parameters of type ItemStackModifier and TypeMethodDescriptionConstructors in net.minecraft.world.item.crafting.display with parameters of type ItemStackModifierConstructorDescriptionItemStackSlotDisplay(ItemStack stack) Creates an instance of aItemStackSlotDisplayrecord class. -
Uses of ItemStack in net.minecraft.world.item.enchantment
Fields in net.minecraft.world.item.enchantment declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackEnchantedItemInUse.itemStackThe field for theitemStackrecord component.Methods in net.minecraft.world.item.enchantment that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackEnchantmentHelper.createBook(EnchantmentInstance pEnchantmant) static ItemStackEnchantmentHelper.enchantItem(RandomSource pRandom, ItemStack pStack, int pLevel, Stream<Holder<Enchantment>> pPossibleEnchantments) static ItemStackEnchantmentHelper.enchantItem(RandomSource pRandom, ItemStack pStack, int pLevel, RegistryAccess pRegistryAccess, Optional<? extends HolderSet<Enchantment>> pPossibleEnchantments) EnchantedItemInUse.itemStack()Returns the value of theitemStackrecord 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 in.invalid reference
slots that the enchantment cares about
Methods in net.minecraft.world.item.enchantment with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanEnchantment.canEnchant(ItemStack pStack) Deprecated.static booleanEnchantmentHelper.canStoreEnchantments(ItemStack pStack) static voidEnchantmentHelper.doPostAttackEffectsWithItemSource(ServerLevel pLevel, Entity pEntity, DamageSource pDamageSource, @Nullable ItemStack pItemSource) static voidEnchantmentHelper.doPostAttackEffectsWithItemSourceOnBreak(ServerLevel pLevel, Entity pEntity, DamageSource pDamageSource, @Nullable ItemStack pItemSource, @Nullable Consumer<Item> pOnBreak) static ItemStackEnchantmentHelper.enchantItem(RandomSource pRandom, ItemStack pStack, int pLevel, Stream<Holder<Enchantment>> pPossibleEnchantments) static ItemStackEnchantmentHelper.enchantItem(RandomSource pRandom, ItemStack pStack, int pLevel, RegistryAccess pRegistryAccess, Optional<? extends HolderSet<Enchantment>> pPossibleEnchantments) static voidEnchantmentHelper.enchantItemFromProvider(ItemStack pStack, RegistryAccess pRegistries, ResourceKey<EnchantmentProvider> pKey, DifficultyInstance pDifficulty, RandomSource pRandom) static voidEnchantmentHelper.forEachModifier(ItemStack pStack, EquipmentSlotGroup pSlotGroup, BiConsumer<Holder<Attribute>, AttributeModifier> pAction) static voidEnchantmentHelper.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 intEnchantmentHelper.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 ItemEnchantmentsEnchantmentHelper.getEnchantmentsForCrafting(ItemStack pStack) static intEnchantmentHelper.getFishingLuckBonus(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static floatEnchantmentHelper.getFishingTimeReduction(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static <T> com.mojang.datafixers.util.Pair<T, Integer> EnchantmentHelper.getHighestLevel(ItemStack pStack, DataComponentType<T> pComponentType) static intEnchantmentHelper.getItemEnchantmentLevel(Holder<Enchantment> pEnchantment, ItemStack pStack) Deprecated.Neo: UseEnchantmentHelper.getTagEnchantmentLevel(Holder, ItemStack)for NBT enchantments, orIItemStackExtension.getEnchantmentLevel(Holder)for gameplay.static intEnchantmentHelper.getPiercingCount(ServerLevel pLevel, ItemStack pFiredFromWeapon, ItemStack pPickupItemStack) static intEnchantmentHelper.getTagEnchantmentLevel(Holder<Enchantment> p_346179_, ItemStack p_44845_) Gets the level of an enchantment from NBT.static intEnchantmentHelper.getTridentReturnToOwnerAcceleration(ServerLevel pLevel, ItemStack pStack, Entity pEntity) static floatEnchantmentHelper.getTridentSpinAttackStrength(ItemStack pStack, LivingEntity pEntity) static booleanEnchantmentHelper.has(ItemStack pStack, DataComponentType<?> pComponentType) static booleanEnchantmentHelper.hasAnyEnchantments(ItemStack pStack) static booleanEnchantmentHelper.hasTag(ItemStack pStack, TagKey<Enchantment> pTag) booleanEnchantment.isPrimaryItem(ItemStack pStack) Deprecated.Neo: UseIItemStackExtension.isPrimaryItemFor(Holder)This method does not respectIItemStackExtension.supportsEnchantment(Holder)since theHolderis not available, which makes the result of calling it invalid.booleanEnchantment.isSupportedItem(ItemStack pItem) Deprecated.booleanRepairable.isValidRepairItem(ItemStack pStack) static LootContextEnchantment.itemContext(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool) voidEnchantment.modifyAmmoCount(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pAmmoCount) static floatEnchantmentHelper.modifyArmorEffectiveness(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pArmorEffectiveness) voidEnchantment.modifyArmorEffectivness(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pArmorEffectiveness) voidEnchantment.modifyBlockExperience(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pBlockExperience) static floatEnchantmentHelper.modifyCrossbowChargingTime(ItemStack pStack, LivingEntity pEntity, float pCrossbowChargingTime) voidEnchantment.modifyDamage(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pDamage) static floatEnchantmentHelper.modifyDamage(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pDamage) voidEnchantment.modifyDamageFilteredValue(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> pComponentType, ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pValue) voidEnchantment.modifyDamageProtection(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pStack, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pDamageProtection) voidEnchantment.modifyDurabilityChange(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pDurabilityChange) voidEnchantment.modifyDurabilityToRepairFromXp(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pDurabilityToRepairFromXp) static intEnchantmentHelper.modifyDurabilityToRepairFromXp(ServerLevel pLevel, ItemStack pStack, int pDurabilityToRepairFromXp) voidEnchantment.modifyEntityFilteredValue(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> pComponentType, ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pValue) voidEnchantment.modifyFallBasedDamage(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pFallBasedDamage) static floatEnchantmentHelper.modifyFallBasedDamage(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pFallBasedDamage) voidEnchantment.modifyFishingLuckBonus(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pFishingLuckBonus) voidEnchantment.modifyFishingTimeReduction(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pFishingTimeReduction) voidEnchantment.modifyItemFilteredCount(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> pComponentType, ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pValue) voidEnchantment.modifyKnockback(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, org.apache.commons.lang3.mutable.MutableFloat pKnockback) static floatEnchantmentHelper.modifyKnockback(ServerLevel pLevel, ItemStack pTool, Entity pEntity, DamageSource pDamageSource, float pKnockback) voidEnchantment.modifyMobExperience(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pMobExperience) voidEnchantment.modifyPiercingCount(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, org.apache.commons.lang3.mutable.MutableFloat pPiercingCount) voidEnchantment.modifyProjectileCount(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pProjectileCount) voidEnchantment.modifyProjectileSpread(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pProjectileSpread) voidEnchantment.modifyTridentReturnToOwnerAcceleration(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool, Entity pEntity, org.apache.commons.lang3.mutable.MutableFloat pTridentReturnToOwnerAcceleration) static voidEnchantmentHelper.onHitBlock(ServerLevel pLevel, ItemStack pStack, @Nullable LivingEntity pOwner, Entity pEntity, @Nullable EquipmentSlot pSlot, Vec3 pPos, BlockState pState, Consumer<Item> pOnBreak) static voidEnchantmentHelper.onProjectileSpawned(ServerLevel pLevel, ItemStack pFiredFromWeapon, Projectile pProjectile, Consumer<Item> pOnBreak) static <T> Optional<T> EnchantmentHelper.pickHighestLevel(ItemStack pStack, DataComponentType<List<T>> pComponentType) static intEnchantmentHelper.processAmmoUse(ServerLevel pLevel, ItemStack pWeapon, ItemStack pAmmo, int pCount) static intEnchantmentHelper.processBlockExperience(ServerLevel pLevel, ItemStack pStack, int pExperience) static intEnchantmentHelper.processDurabilityChange(ServerLevel pLevel, ItemStack pStack, int pDamage) static intEnchantmentHelper.processProjectileCount(ServerLevel pLevel, ItemStack pTool, Entity pEntity, int pProjectileCount) static floatEnchantmentHelper.processProjectileSpread(ServerLevel pLevel, ItemStack pTool, Entity pEntity, float pProjectileSpread) static voidEnchantmentHelper.runIterationOnItem(ItemStack pStack, EquipmentSlot pSlot, LivingEntity pEntity, EnchantmentHelper.EnchantmentInSlotVisitor pVisitor) static voidEnchantmentHelper.runIterationOnItem(ItemStack pStack, EnchantmentHelper.EnchantmentVisitor pVisitor) static voidEnchantmentHelper.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 voidEnchantmentHelper.setEnchantments(ItemStack pStack, ItemEnchantments pEnchantments) static voidEnchantmentHelper.stopLocationBasedEffects(ItemStack pStack, LivingEntity pEntity, EquipmentSlot pSlot) static ItemEnchantmentsEnchantmentHelper.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 itemStack, @Nullable EquipmentSlot inSlot, @Nullable LivingEntity owner, Consumer<Item> onBreak) Creates an instance of aEnchantedItemInUserecord class.EnchantedItemInUse(ItemStack p_344800_, EquipmentSlot p_344722_, LivingEntity p_345536_) -
Uses of ItemStack in net.minecraft.world.item.enchantment.providers
Methods in net.minecraft.world.item.enchantment.providers with parameters of type ItemStackModifier and TypeMethodDescriptionvoidEnchantmentProvider.enchant(ItemStack pStack, ItemEnchantments.Mutable pEnchantments, RandomSource pRandom, DifficultyInstance pDifficulty) voidEnchantmentsByCost.enchant(ItemStack p_345483_, ItemEnchantments.Mutable p_346331_, RandomSource p_344794_, DifficultyInstance p_348577_) voidEnchantmentsByCostWithDifficulty.enchant(ItemStack p_344777_, ItemEnchantments.Mutable p_344895_, RandomSource p_346012_, DifficultyInstance p_348635_) voidSingleEnchantment.enchant(ItemStack p_346218_, ItemEnchantments.Mutable p_345570_, RandomSource p_345742_, DifficultyInstance p_348562_) -
Uses of ItemStack in net.minecraft.world.item.equipment
Methods in net.minecraft.world.item.equipment with parameters of type ItemStackModifier and TypeMethodDescriptionEquippable.equipOnTarget(Player pPlayer, LivingEntity pEntity, ItemStack pStack) Equippable.swapWithEquipmentSlot(ItemStack pStack, Player pPlayer) -
Uses of ItemStack in net.minecraft.world.item.equipment.trim
Methods in net.minecraft.world.item.equipment.trim with parameters of type ItemStackModifier and TypeMethodDescriptionstatic Optional<Holder<TrimMaterial>> TrimMaterials.getFromIngredient(HolderLookup.Provider pRegistries, ItemStack pIngredient) -
Uses of ItemStack in net.minecraft.world.item.slot
Fields in net.minecraft.world.item.slot with type parameters of type ItemStackModifier and TypeFieldDescriptionSlotCollection.Filtered.filterThe field for thefilterrecord component.private final Function<ItemStack, ? extends SlotCollection> SlotCollection.FlatMapped.mapperThe field for themapperrecord component.Methods in net.minecraft.world.item.slot that return types with arguments of type ItemStackModifier and TypeMethodDescriptionSlotCollection.Filtered.filter()Returns the value of thefilterrecord component.SlotCollection.Filtered.itemCopies()SlotCollection.FlatMapped.itemCopies()SlotCollection.itemCopies()SlotCollection.Limited.itemCopies()Function<ItemStack, ? extends SlotCollection> SlotCollection.FlatMapped.mapper()Returns the value of themapperrecord component.Method parameters in net.minecraft.world.item.slot with type arguments of type ItemStackModifier and TypeMethodDescriptiondefault SlotCollectiondefault SlotCollectionSlotCollection.flatMap(Function<ItemStack, ? extends SlotCollection> pMapper) Constructor parameters in net.minecraft.world.item.slot with type arguments of type ItemStackModifierConstructorDescriptionFiltered(SlotCollection slots, Predicate<ItemStack> filter) Creates an instance of aFilteredrecord class.FlatMapped(SlotCollection slots, Function<ItemStack, ? extends SlotCollection> mapper) Creates an instance of aFlatMappedrecord class. -
Uses of ItemStack in net.minecraft.world.item.trading
Fields in net.minecraft.world.item.trading declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackItemCost.itemStackThe field for theitemStackrecord component.private final ItemStackMerchantOffer.resultThe output of this offer.Methods in net.minecraft.world.item.trading that return ItemStackModifier and TypeMethodDescriptionMerchantOffer.assemble()private static ItemStackItemCost.createStack(Holder<Item> pItem, int pCount, DataComponentExactPredicate pComponents) MerchantOffer.getBaseCostA()MerchantOffer.getCostA()MerchantOffer.getCostB()MerchantOffer.getResult()ItemCost.itemStack()Returns the value of theitemStackrecord component.Methods in net.minecraft.world.item.trading with parameters of type ItemStackModifier and TypeMethodDescription@Nullable MerchantOfferMerchantOffers.getRecipeFor(ItemStack pStackA, ItemStack pStackB, int pIndex) voidMerchant.notifyTradeUpdated(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.booleanMerchantOffer.satisfiedBy(ItemStack pPlayerOfferA, ItemStack pPlayerOfferB) booleanbooleanConstructors in net.minecraft.world.item.trading with parameters of type ItemStackModifierConstructorDescriptionItemCost(Holder<Item> item, int count, DataComponentExactPredicate components, ItemStack itemStack) Creates an instance of aItemCostrecord class.privateMerchantOffer(ItemCost pBaseCostA, Optional<ItemCost> pCostB, ItemStack pResult, int pUses, int pMaxUses, boolean pRewardExp, int pSpecialPriceDiff, int pDemand, float pPriceMultiplier, int pXp) 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
Fields in net.minecraft.world.level declared as ItemStackModifier and TypeFieldDescription(package private) ItemStackServerExplosion.StackCollector.stackMethods in net.minecraft.world.level with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static voidServerExplosion.addOrAppendStack(List<ServerExplosion.StackCollector> pStackCollectors, ItemStack pStack, BlockPos pPos) voidConstructors in net.minecraft.world.level with parameters of type ItemStack -
Uses of ItemStack in net.minecraft.world.level.block
Methods in net.minecraft.world.level.block that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackAbstractBannerBlock.getCloneItemStack(LevelReader p_304796_, BlockPos p_48665_, BlockState p_48666_, boolean p_386769_) protected ItemStackAttachedStemBlock.getCloneItemStack(LevelReader p_304950_, BlockPos p_48839_, BlockState p_48840_, boolean p_388189_) protected ItemStackBambooSaplingBlock.getCloneItemStack(LevelReader p_304956_, BlockPos p_48965_, BlockState p_48966_, boolean p_387375_) protected ItemStackBeehiveBlock.getCloneItemStack(LevelReader p_386459_, BlockPos p_387055_, BlockState p_387788_, boolean p_387391_) protected ItemStackBigDripleafStemBlock.getCloneItemStack(LevelReader p_304938_, BlockPos p_152337_, BlockState p_152338_, boolean p_387224_) protected ItemStackCandleCakeBlock.getCloneItemStack(LevelReader p_304662_, BlockPos p_152863_, BlockState p_152864_, boolean p_387122_) protected ItemStackCaveVinesBlock.getCloneItemStack(LevelReader p_304590_, BlockPos p_152967_, BlockState p_152968_, boolean p_386659_) protected ItemStackCaveVinesPlantBlock.getCloneItemStack(LevelReader p_304444_, BlockPos p_153008_, BlockState p_153009_, boolean p_387975_) protected ItemStackCopperGolemStatueBlock.getCloneItemStack(LevelReader p_447207_, BlockPos p_446066_, BlockState p_445465_, boolean p_446800_) protected ItemStackCropBlock.getCloneItemStack(LevelReader p_304482_, BlockPos p_52255_, BlockState p_52256_, boolean p_387989_) protected ItemStackDecoratedPotBlock.getCloneItemStack(LevelReader p_304622_, BlockPos p_294412_, BlockState p_294723_, boolean p_387769_) protected ItemStackEndGatewayBlock.getCloneItemStack(LevelReader p_304768_, BlockPos p_53004_, BlockState p_53005_, boolean p_387386_) protected ItemStackEndPortalBlock.getCloneItemStack(LevelReader p_304508_, BlockPos p_53022_, BlockState p_53023_, boolean p_388548_) protected ItemStackFlowerPotBlock.getCloneItemStack(LevelReader p_304505_, BlockPos p_53532_, BlockState p_53533_, boolean p_388306_) protected ItemStackFrostedIceBlock.getCloneItemStack(LevelReader p_304729_, BlockPos p_53571_, BlockState p_53572_, boolean p_386722_) protected ItemStackGrowingPlantBodyBlock.getCloneItemStack(LevelReader p_304650_, BlockPos p_53897_, BlockState p_53898_, boolean p_388787_) protected ItemStackLightBlock.getCloneItemStack(LevelReader p_304798_, BlockPos p_153665_, BlockState p_153666_, boolean p_387561_) protected ItemStackNetherPortalBlock.getCloneItemStack(LevelReader p_304402_, BlockPos p_54912_, BlockState p_54913_, boolean p_386478_) protected ItemStackNetherWartBlock.getCloneItemStack(LevelReader p_304797_, BlockPos p_54974_, BlockState p_54975_, boolean p_387454_) protected ItemStackStemBlock.getCloneItemStack(LevelReader p_304982_, BlockPos p_57027_, BlockState p_57028_, boolean p_387824_) protected ItemStackSweetBerryBushBlock.getCloneItemStack(LevelReader p_304655_, BlockPos p_57257_, BlockState p_57258_, boolean p_388022_) protected ItemStackTallSeagrassBlock.getCloneItemStack(LevelReader p_304988_, BlockPos p_154750_, BlockState p_154751_, boolean p_387662_) protected ItemStackTestBlock.getCloneItemStack(LevelReader p_397697_, BlockPos p_397696_, BlockState p_397513_, boolean p_398035_) static ItemStackShulkerBoxBlock.getColoredItemStack(@Nullable DyeColor pColor) BarrierBlock.pickupBlock(@Nullable LivingEntity p_393874_, LevelAccessor p_295817_, BlockPos p_295857_, BlockState p_294189_) BubbleColumnBlock.pickupBlock(@Nullable LivingEntity p_394411_, LevelAccessor p_152712_, BlockPos p_152713_, BlockState p_152714_) BucketPickup.pickupBlock(@Nullable LivingEntity pOwner, LevelAccessor pLevel, BlockPos pPos, BlockState pState) LiquidBlock.pickupBlock(@Nullable LivingEntity p_393591_, LevelAccessor p_153772_, BlockPos p_153773_, BlockState p_153774_) PowderSnowBlock.pickupBlock(@Nullable LivingEntity p_394634_, LevelAccessor p_154281_, BlockPos p_154282_, BlockState p_154283_) default ItemStackSimpleWaterloggedBlock.pickupBlock(@Nullable LivingEntity p_394370_, LevelAccessor p_154560_, BlockPos p_154561_, BlockState p_154562_) static ItemStackLightBlock.setLightOnStack(ItemStack pStack, int pLight) static ItemStackTestBlock.setModeOnStack(ItemStack pStack, TestBlockMode pMode) Methods in net.minecraft.world.level.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBeehiveBlock.getDrops(BlockState p_49636_, LootParams.Builder p_287581_) Block.getDrops(BlockState pState, ServerLevel pLevel, BlockPos pPos, @Nullable BlockEntity pBlockEntity) Block.getDrops(BlockState pState, ServerLevel pLevel, BlockPos pPos, @Nullable BlockEntity pBlockEntity, @Nullable Entity pEntity, ItemStack pTool) DecoratedPotBlock.getDrops(BlockState p_287683_, LootParams.Builder p_287582_) LiquidBlock.getDrops(BlockState p_54720_, LootParams.Builder p_287727_) ShulkerBoxBlock.getDrops(BlockState p_470647_, LootParams.Builder p_470636_) Methods in net.minecraft.world.level.block with parameters of type ItemStackModifier and TypeMethodDescriptionprivate static voidChiseledBookShelfBlock.addBook(Level pLevel, BlockPos pPos, Player pPlayer, ChiseledBookShelfBlockEntity pBlockEntity, ItemStack pBookStack, int pSlot) (package private) static BlockStateComposterBlock.addItem(@Nullable Entity pEntity, BlockState pState, LevelAccessor pLevel, BlockPos pPos, ItemStack pStack) booleanComposterBlock.EmptyContainer.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) Returnstrueif automation can insert the given item in the given slot from the given side.booleanComposterBlock.InputContainer.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) booleanComposterBlock.OutputContainer.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) static booleanWitherSkullBlock.canSpawnMob(Level pLevel, BlockPos pPos, ItemStack pStack) booleanComposterBlock.EmptyContainer.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) Returnstrueif automation can extract the given item in the given slot from the given side.booleanComposterBlock.InputContainer.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) booleanComposterBlock.OutputContainer.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) private voidCrafterBlock.dispenseItem(ServerLevel pLevel, BlockPos pPos, CrafterBlockEntity pCrafter, ItemStack pStack, BlockState pState, RecipeHolder<?> pRecipe) protected static booleanBlock.dropFromBlockInteractLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, BlockState pState, @Nullable BlockEntity pBlockEntity, @Nullable ItemStack pTool, @Nullable Entity pEntity, BiConsumer<ServerLevel, ItemStack> pDropConsumer) static voidBeehiveBlock.dropHoneycomb(ServerLevel pLevel, ItemStack pStack, BlockState pState, @Nullable BlockEntity pBlockEntity, @Nullable Entity pEntity, BlockPos pPos) static voidBlock.dropResources(BlockState pState, Level pLevel, BlockPos pPos, @Nullable BlockEntity pBlockEntity, @Nullable Entity pEntity, ItemStack pTool) private static DispenseItemBehaviorDispenserBlock.getDefaultDispenseMethod(ItemStack pStack) protected DispenseItemBehaviorDispenserBlock.getDispenseMethod(Level pLevel, ItemStack pItem) protected DispenseItemBehaviorDropperBlock.getDispenseMethod(Level p_341227_, ItemStack p_52947_) Block.getDrops(BlockState pState, ServerLevel pLevel, BlockPos pPos, @Nullable BlockEntity pBlockEntity, @Nullable Entity pEntity, ItemStack pTool) intDropExperienceBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) intRedStoneOreBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) intSculkCatalystBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) intSculkSensorBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) intSculkShriekerBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) intSpawnerBlock.getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) static floatstatic BlockStateComposterBlock.insertItem(Entity pEntity, BlockState pState, ServerLevel pLevel, ItemStack pStack, BlockPos pPos) private static booleanRespawnAnchorBlock.isRespawnFuel(ItemStack pStack) private static voidLecternBlock.placeBook(@Nullable LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) voidBeehiveBlock.playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) voidBlock.playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pBlockEntity, ItemStack pTool) Called after a player has successfully harvested this block.voidDoublePlantBlock.playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) voidIceBlock.playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) voidTurtleEggBlock.playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockState pState, @Nullable BlockEntity pTe, ItemStack pStack) private static voidBlock.popResource(Level pLevel, Supplier<ItemEntity> pItemEntitySupplier, ItemStack pStack) static voidBlock.popResource(Level pLevel, BlockPos pPos, ItemStack pStack) Spawns the given stack into the Level at the given position, respecting the doTileDrops gamerulestatic voidBlock.popResourceFromFace(Level pLevel, BlockPos pPos, Direction pDirection, ItemStack pStack) static ItemStackLightBlock.setLightOnStack(ItemStack pStack, int pLight) static ItemStackTestBlock.setModeOnStack(ItemStack pStack, TestBlockMode pMode) voidBedBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) Called by BlockItem after this block has been placed.voidCommandBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidCrafterBlock.setPlacedBy(Level p_307219_, BlockPos p_307681_, BlockState p_307383_, @Nullable LivingEntity p_307647_, ItemStack p_307190_) voidDiodeBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidDoorBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidDoublePlantBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidDriedGhastBlock.setPlacedBy(Level p_418520_, BlockPos p_418137_, BlockState p_418409_, @Nullable LivingEntity p_418198_, ItemStack p_418118_) voidJukeboxBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidMossyCarpetBlock.setPlacedBy(Level p_380310_, BlockPos p_380202_, BlockState p_379659_, @Nullable LivingEntity p_379877_, ItemStack p_380344_) voidPitcherCropBlock.setPlacedBy(Level p_277432_, BlockPos p_277632_, BlockState p_277479_, @Nullable LivingEntity p_277805_, ItemStack p_277663_) voidSmallDripleafBlock.setPlacedBy(Level p_154599_, BlockPos p_154600_, BlockState p_154601_, @Nullable LivingEntity p_154602_, ItemStack p_154603_) voidStructureBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidTripWireHookBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidWitherSkullBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) voidWitherWallSkullBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) Called by ItemBlocks after a block is set in the world, to allow post-place logicprivate booleanCeilingHangingSignBlock.shouldTryToChainAnotherHangingSign(Player pPlayer, BlockHitResult pHitResult, SignBlockEntity pSign, ItemStack pStack) private booleanWallHangingSignBlock.shouldTryToChainAnotherHangingSign(BlockState pState, Player pPlayer, BlockHitResult pHitResult, SignBlockEntity pSign, ItemStack pStack) protected voidDropExperienceBlock.spawnAfterBreak(BlockState p_221086_, ServerLevel p_221087_, BlockPos p_221088_, ItemStack p_221089_, boolean p_221090_) protected voidInfestedBlock.spawnAfterBreak(BlockState p_221360_, ServerLevel p_221361_, BlockPos p_221362_, ItemStack p_221363_, boolean p_221364_) protected voidRedStoneOreBlock.spawnAfterBreak(BlockState p_221907_, ServerLevel p_221908_, BlockPos p_221909_, ItemStack p_221910_, boolean p_221911_) protected voidSculkCatalystBlock.spawnAfterBreak(BlockState p_222109_, ServerLevel p_222110_, BlockPos p_222111_, ItemStack p_222112_, boolean p_222113_) protected voidSculkSensorBlock.spawnAfterBreak(BlockState p_222142_, ServerLevel p_222143_, BlockPos p_222144_, ItemStack p_222145_, boolean p_222146_) protected voidSculkShriekerBlock.spawnAfterBreak(BlockState p_222192_, ServerLevel p_222193_, BlockPos p_222194_, ItemStack p_222195_, boolean p_222196_) protected voidSpawnerBlock.spawnAfterBreak(BlockState p_222477_, ServerLevel p_222478_, BlockPos p_222479_, ItemStack p_222480_, boolean p_222481_) private static booleanShelfBlock.swapSingleItem(ItemStack pStack, Player pPlayer, ShelfBlockEntity pShelf, int pIndex, Inventory pInventory) protected voidBlock.tryDropExperience(ServerLevel pLevel, BlockPos pPos, ItemStack pHeldItem, IntProvider pAmount) static booleanLecternBlock.tryPlaceBook(@Nullable LivingEntity pEntity, Level pLevel, BlockPos pPos, BlockState pState, ItemStack pStack) protected InteractionResultAbstractCauldronBlock.useItemOn(ItemStack p_316791_, BlockState p_316287_, Level p_316530_, BlockPos p_316585_, Player p_316671_, InteractionHand p_316186_, BlockHitResult p_316294_) protected InteractionResultBeehiveBlock.useItemOn(ItemStack p_316844_, BlockState p_316365_, Level p_316306_, BlockPos p_316497_, Player p_316824_, InteractionHand p_316436_, BlockHitResult p_316125_) protected InteractionResultCakeBlock.useItemOn(ItemStack p_316238_, BlockState p_316837_, Level p_316766_, BlockPos p_316227_, Player p_316853_, InteractionHand p_316422_, BlockHitResult p_316869_) protected InteractionResultCampfireBlock.useItemOn(ItemStack p_316347_, BlockState p_51274_, Level p_51275_, BlockPos p_51276_, Player p_51277_, InteractionHand p_51278_, BlockHitResult p_51279_) protected InteractionResultCandleBlock.useItemOn(ItemStack p_316279_, BlockState p_316163_, Level p_316881_, BlockPos p_316480_, Player p_316191_, InteractionHand p_316669_, BlockHitResult p_316641_) protected InteractionResultCandleCakeBlock.useItemOn(ItemStack p_316571_, BlockState p_316514_, Level p_316171_, BlockPos p_316112_, Player p_316172_, InteractionHand p_316257_, BlockHitResult p_316286_) protected InteractionResultCeilingHangingSignBlock.useItemOn(ItemStack p_316602_, BlockState p_316839_, Level p_316805_, BlockPos p_316894_, Player p_316202_, InteractionHand p_316538_, BlockHitResult p_316895_) protected InteractionResultChiseledBookShelfBlock.useItemOn(ItemStack p_316457_, BlockState p_316201_, Level p_316747_, BlockPos p_316462_, Player p_316228_, InteractionHand p_316721_, BlockHitResult p_316464_) protected InteractionResultComposterBlock.useItemOn(ItemStack p_316332_, BlockState p_316118_, Level p_316624_, BlockPos p_316660_, Player p_316715_, InteractionHand p_316472_, BlockHitResult p_316606_) protected InteractionResultCopperGolemStatueBlock.useItemOn(ItemStack p_435502_, BlockState p_435541_, Level p_432823_, BlockPos p_433231_, Player p_433625_, InteractionHand p_434602_, BlockHitResult p_432789_) protected InteractionResultDecoratedPotBlock.useItemOn(ItemStack p_316569_, BlockState p_316562_, Level p_316177_, BlockPos p_316898_, Player p_316632_, InteractionHand p_316424_, BlockHitResult p_316345_) protected InteractionResultFlowerPotBlock.useItemOn(ItemStack p_316610_, BlockState p_316240_, Level p_316456_, BlockPos p_316502_, Player p_316491_, InteractionHand p_316444_, BlockHitResult p_316826_) protected InteractionResultJukeboxBlock.useItemOn(ItemStack p_350348_, BlockState p_351033_, Level p_350995_, BlockPos p_350838_, Player p_350684_, InteractionHand p_350461_, BlockHitResult p_351025_) protected InteractionResultLecternBlock.useItemOn(ItemStack p_316392_, BlockState p_316600_, Level p_316640_, BlockPos p_316673_, Player p_316670_, InteractionHand p_316384_, BlockHitResult p_316419_) protected InteractionResultNoteBlock.useItemOn(ItemStack p_316716_, BlockState p_316688_, Level p_316672_, BlockPos p_316355_, Player p_316822_, InteractionHand p_316505_, BlockHitResult p_316667_) protected InteractionResultPumpkinBlock.useItemOn(ItemStack p_316383_, BlockState p_316676_, Level p_316272_, BlockPos p_316484_, Player p_316367_, InteractionHand p_316216_, BlockHitResult p_316827_) protected InteractionResultRedStoneOreBlock.useItemOn(ItemStack p_316235_, BlockState p_316208_, Level p_316432_, BlockPos p_316592_, Player p_316564_, InteractionHand p_316389_, BlockHitResult p_316390_) protected InteractionResultRespawnAnchorBlock.useItemOn(ItemStack p_316531_, BlockState p_316665_, Level p_316165_, BlockPos p_316402_, Player p_316556_, InteractionHand p_316586_, BlockHitResult p_316326_) protected InteractionResultShelfBlock.useItemOn(ItemStack p_433583_, BlockState p_433454_, Level p_435671_, BlockPos p_433939_, Player p_433327_, InteractionHand p_432907_, BlockHitResult p_433590_) protected InteractionResultSignBlock.useItemOn(ItemStack p_316116_, BlockState p_316899_, Level p_316692_, BlockPos p_316578_, Player p_316244_, InteractionHand p_316196_, BlockHitResult p_316744_) protected InteractionResultSweetBerryBushBlock.useItemOn(ItemStack p_316636_, BlockState p_316295_, Level p_316812_, BlockPos p_316380_, Player p_316731_, InteractionHand p_316188_, BlockHitResult p_316626_) protected InteractionResultTntBlock.useItemOn(ItemStack p_316149_, BlockState p_316217_, Level p_316520_, BlockPos p_316601_, Player p_316770_, InteractionHand p_316393_, BlockHitResult p_316532_) VaultBlock.useItemOn(ItemStack p_324161_, BlockState p_323816_, Level p_324403_, BlockPos p_324623_, Player p_324219_, InteractionHand p_324416_, BlockHitResult p_324261_) protected InteractionResultWallHangingSignBlock.useItemOn(ItemStack p_316420_, BlockState p_316885_, Level p_316114_, BlockPos p_316297_, Player p_316609_, InteractionHand p_316187_, BlockHitResult p_316223_) protected InteractionResultWeatheringCopperGolemStatueBlock.useItemOn(ItemStack p_433666_, BlockState p_433930_, Level p_435157_, BlockPos p_435733_, Player p_434811_, InteractionHand p_434251_, BlockHitResult p_433254_) Method parameters in net.minecraft.world.level.block with type arguments of type ItemStackModifier and TypeMethodDescriptionprotected static booleanBlock.dropFromBlockInteractLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, BlockState pState, @Nullable BlockEntity pBlockEntity, @Nullable ItemStack pTool, @Nullable Entity pEntity, BiConsumer<ServerLevel, ItemStack> pDropConsumer) protected static booleanBlock.dropFromLootTable(ServerLevel pLevel, ResourceKey<LootTable> pLootTable, Function<LootParams.Builder, LootParams> pParams, BiConsumer<ServerLevel, ItemStack> pDropConsumer) protected voidAbstractCandleBlock.onExplosionHit(BlockState p_311992_, ServerLevel p_361872_, BlockPos p_312387_, Explosion p_312661_, BiConsumer<ItemStack, BlockPos> p_312093_) protected voidBeehiveBlock.onExplosionHit(BlockState p_364770_, ServerLevel p_364089_, BlockPos p_363677_, Explosion p_365390_, BiConsumer<ItemStack, BlockPos> p_360830_) protected voidBellBlock.onExplosionHit(BlockState p_311884_, ServerLevel p_362869_, BlockPos p_312717_, Explosion p_312800_, BiConsumer<ItemStack, BlockPos> p_312339_) protected voidButtonBlock.onExplosionHit(BlockState p_312395_, ServerLevel p_364251_, BlockPos p_311817_, Explosion p_312150_, BiConsumer<ItemStack, BlockPos> p_311898_) protected voidCreakingHeartBlock.onExplosionHit(BlockState p_382935_, ServerLevel p_382804_, BlockPos p_383050_, Explosion p_383064_, BiConsumer<ItemStack, BlockPos> p_383124_) protected voidDoorBlock.onExplosionHit(BlockState p_312769_, ServerLevel p_363080_, BlockPos p_311900_, Explosion p_312544_, BiConsumer<ItemStack, BlockPos> p_312107_) protected voidFenceGateBlock.onExplosionHit(BlockState p_312699_, ServerLevel p_361116_, BlockPos p_312680_, Explosion p_312186_, BiConsumer<ItemStack, BlockPos> p_312187_) protected voidLeverBlock.onExplosionHit(BlockState p_312405_, ServerLevel p_361347_, BlockPos p_311795_, Explosion p_312090_, BiConsumer<ItemStack, BlockPos> p_312313_) protected voidTrapDoorBlock.onExplosionHit(BlockState p_312371_, ServerLevel p_360483_, BlockPos p_312879_, Explosion p_312330_, BiConsumer<ItemStack, BlockPos> p_312161_) 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) ItemStackLecternBlockEntity.bookprivate ItemStackBrushableBlockEntity.itemprivate ItemStackDecoratedPotBlockEntity.itemprivate ItemStackJukeboxBlockEntity.itemFields in net.minecraft.world.level.block.entity with type parameters of type ItemStackModifier and TypeFieldDescriptionprotected NonNullList<ItemStack> AbstractFurnaceBlockEntity.itemsprivate NonNullList<ItemStack> BarrelBlockEntity.itemsprivate NonNullList<ItemStack> BrewingStandBlockEntity.itemsThe items currently placed in the slots of the brewing stand.private final NonNullList<ItemStack> CampfireBlockEntity.itemsprivate NonNullList<ItemStack> ChestBlockEntity.itemsprivate final NonNullList<ItemStack> ChiseledBookShelfBlockEntity.itemsprivate NonNullList<ItemStack> CrafterBlockEntity.itemsprivate NonNullList<ItemStack> DispenserBlockEntity.itemsprivate NonNullList<ItemStack> HopperBlockEntity.itemsprivate final NonNullList<ItemStack> ShelfBlockEntity.itemsprivate NonNullList<ItemStack> ShulkerBoxBlockEntity.itemStacksMethods in net.minecraft.world.level.block.entity that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackHopperBlockEntity.addItem(@Nullable Container pSource, Container pDestination, ItemStack pStack, @Nullable Direction pDirection) Attempts to place the passed stack in the container, using as many slots as required.static ItemStackDecoratedPotBlockEntity.createDecoratedPotItem(PotDecorations pDecorations) LecternBlockEntity.getBook()BannerBlockEntity.getItem()BaseContainerBlockEntity.getItem(int p_332727_) BrushableBlockEntity.getItem()CopperGolemStatueBlockEntity.getItem(ItemStack pStack, CopperGolemStatueBlock.Pose pPose) CrafterBlockEntity.getItem(int p_307189_) default ItemStackListBackedContainer.getItem(int p_435306_) RandomizableContainerBlockEntity.getItem(int pIndex) DecoratedPotBlockEntity.getTheItem()JukeboxBlockEntity.getTheItem()DispenserBlockEntity.insertItem(ItemStack pStack) BaseContainerBlockEntity.removeItem(int p_332707_, int p_332672_) ChiseledBookShelfBlockEntity.removeItem(int p_255828_, int p_255673_) HopperBlockEntity.removeItem(int pIndex, int pCount) default ItemStackListBackedContainer.removeItem(int p_433717_, int p_433464_) RandomizableContainerBlockEntity.removeItem(int pIndex, int pCount) BaseContainerBlockEntity.removeItemNoUpdate(int p_332812_) default ItemStackListBackedContainer.removeItemNoUpdate(int p_435020_) RandomizableContainerBlockEntity.removeItemNoUpdate(int pIndex) private ItemStackLecternBlockEntity.resolveBook(ItemStack pStack, @Nullable Player pPlayer) Resolves the contents of the passed ItemStack, if it is a bookDecoratedPotBlockEntity.splitTheItem(int p_305991_) JukeboxBlockEntity.splitTheItem(int p_304604_) ShelfBlockEntity.swapItemNoUpdate(int pSlot, ItemStack pStack) private static ItemStackHopperBlockEntity.tryMoveInItem(@Nullable Container pSource, Container pDestination, ItemStack pStack, int pSlot, @Nullable 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()ChiseledBookShelfBlockEntity.getItems()CrafterBlockEntity.getItems()protected NonNullList<ItemStack> DispenserBlockEntity.getItems()protected NonNullList<ItemStack> HopperBlockEntity.getItems()ListBackedContainer.getItems()ShelfBlockEntity.getItems()protected NonNullList<ItemStack> ShulkerBoxBlockEntity.getItems()Methods in net.minecraft.world.level.block.entity with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanChiseledBookShelfBlockEntity.acceptsItemType(ItemStack p_433750_) default booleanListBackedContainer.acceptsItemType(ItemStack pStack) static ItemStackHopperBlockEntity.addItem(@Nullable Container pSource, Container pDestination, ItemStack pStack, @Nullable Direction pDirection) Attempts to place the passed stack in the container, using as many slots as required.final voidBlockEntity.applyComponentsFromItemStack(ItemStack pStack) booleanBrushableBlockEntity.brush(long pStartTick, ServerLevel pLevel, LivingEntity pBrusher, Direction pHitDirection, ItemStack pStack) private voidBrushableBlockEntity.brushingCompleted(ServerLevel pLevel, LivingEntity pBrusher, ItemStack pStack) intFuelValues.burnDuration(ItemStack pStack) Deprecated.private static booleanHopperBlockEntity.canMergeItems(ItemStack pStack1, ItemStack pStack2) booleanAbstractFurnaceBlockEntity.canPlaceItem(int pIndex, ItemStack pStack) booleanBrewingStandBlockEntity.canPlaceItem(int pIndex, ItemStack pStack) booleanCrafterBlockEntity.canPlaceItem(int p_307543_, ItemStack p_307267_) booleanJukeboxBlockEntity.canPlaceItem(int p_273369_, ItemStack p_273689_) default booleanListBackedContainer.canPlaceItem(int p_434183_, ItemStack p_435584_) private static booleanHopperBlockEntity.canPlaceItemInContainer(Container pContainer, ItemStack pStack, int pSlot, @Nullable Direction pDirection) booleanAbstractFurnaceBlockEntity.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) booleanBrewingStandBlockEntity.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) booleanShulkerBoxBlockEntity.canPlaceItemThroughFace(int pIndex, ItemStack pItemStack, @Nullable Direction pDirection) booleanChiseledBookShelfBlockEntity.canTakeItem(Container p_437377_, int p_437398_, ItemStack p_437308_) booleanJukeboxBlockEntity.canTakeItem(Container p_273497_, int p_273168_, ItemStack p_273785_) private static booleanHopperBlockEntity.canTakeItemFromContainer(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) booleanAbstractFurnaceBlockEntity.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) booleanBrewingStandBlockEntity.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) booleanShulkerBoxBlockEntity.canTakeItemThroughFace(int pIndex, ItemStack pStack, Direction pDirection) private voidBrushableBlockEntity.dropContent(ServerLevel pLevel, LivingEntity pBrusher, ItemStack pStack) protected intAbstractFurnaceBlockEntity.getBurnDuration(FuelValues pFuelValues, ItemStack pStack) protected intBlastFurnaceBlockEntity.getBurnDuration(FuelValues p_362551_, ItemStack p_58852_) protected intSmokerBlockEntity.getBurnDuration(FuelValues p_360506_, ItemStack p_59786_) CopperGolemStatueBlockEntity.getItem(ItemStack pStack, CopperGolemStatueBlock.Pose pPose) private static intLecternBlockEntity.getPageCount(ItemStack pStack) DispenserBlockEntity.insertItem(ItemStack pStack) booleanbooleanCampfireBlockEntity.placeFood(ServerLevel pLevel, @Nullable LivingEntity pEntity, ItemStack pStack) private ItemStackLecternBlockEntity.resolveBook(ItemStack pStack, @Nullable Player pPlayer) Resolves the contents of the passed ItemStack, if it is a bookvoidSets the ItemStack in this lectern.voidSets the ItemStack in this lectern.voidvoidvoidvoidvoidvoidvoidvoidvoiddefault voidvoiddefault voidListBackedContainer.setItemNoUpdate(int pSlot, ItemStack pStack) voidJukeboxBlockEntity.setSongItemWithoutPlaying(ItemStack pStack) voidDecoratedPotBlockEntity.setTheItem(ItemStack p_305817_) voidJukeboxBlockEntity.setTheItem(ItemStack p_304781_) private booleanCrafterBlockEntity.smallerStackExist(int pCurrentSize, ItemStack pStack, int pSlot) ShelfBlockEntity.swapItemNoUpdate(int pSlot, ItemStack pStack) private static ItemStackHopperBlockEntity.tryMoveInItem(@Nullable Container pSource, Container pDestination, ItemStack pStack, int pSlot, @Nullable Direction pDirection) private voidBrushableBlockEntity.unpackLootTable(ServerLevel pLevel, LivingEntity pBrusher, ItemStack pStack) Method parameters in net.minecraft.world.level.block.entity with type arguments of type ItemStackModifier and TypeMethodDescriptionvoidAbstractFurnaceBlockEntity.awardUsedRecipes(Player p_58396_, List<ItemStack> p_282202_) private static booleanAbstractFurnaceBlockEntity.burn(RegistryAccess pRegistryAccess, @Nullable RecipeHolder<? extends AbstractCookingRecipe> pRecipe, SingleRecipeInput pRecipeInput, NonNullList<ItemStack> pItems, int pMaxStackSize) private static booleanAbstractFurnaceBlockEntity.canBurn(RegistryAccess pRegistryAccess, @Nullable RecipeHolder<? extends AbstractCookingRecipe> pRecipe, SingleRecipeInput pRecipeInput, NonNullList<ItemStack> pItems, int pMaxStackSize) private static voidBrewingStandBlockEntity.doBrew(Level pLevel, BlockPos pPos, NonNullList<ItemStack> pItems) private static booleanBrewingStandBlockEntity.isBrewable(PotionBrewing pPotionBrewing, NonNullList<ItemStack> pItems) protected voidAbstractFurnaceBlockEntity.setItems(NonNullList<ItemStack> p_332808_) protected voidBarrelBlockEntity.setItems(NonNullList<ItemStack> pItems) protected abstract voidBaseContainerBlockEntity.setItems(NonNullList<ItemStack> pItems) protected voidBrewingStandBlockEntity.setItems(NonNullList<ItemStack> p_332710_) protected voidChestBlockEntity.setItems(NonNullList<ItemStack> pItems) protected voidCrafterBlockEntity.setItems(NonNullList<ItemStack> p_307392_) protected voidDispenserBlockEntity.setItems(NonNullList<ItemStack> pItems) protected voidHopperBlockEntity.setItems(NonNullList<ItemStack> pItems) protected voidShulkerBoxBlockEntity.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 @Nullable WeightedList<ItemStack> TrialSpawnerStateData.dispensingMethods in net.minecraft.world.level.block.entity.trialspawner that return types with arguments of type ItemStackModifier and TypeMethodDescription(package private) WeightedList<ItemStack> TrialSpawnerStateData.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 ItemStackVaultSharedData.displayItemprivate final ItemStackVaultConfig.keyItemThe field for thekeyItemrecord 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) ItemStackVaultServerData.getNextItemToEject()private static ItemStackVaultBlockEntity.Server.getRandomDisplayItemFromLootTable(ServerLevel pLevel, BlockPos pPos, ResourceKey<LootTable> pLootTable) VaultConfig.keyItem()Returns the value of thekeyItemrecord component.(package private) ItemStackVaultServerData.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, ItemStack pKey) Methods in net.minecraft.world.level.block.entity.vault with parameters of type ItemStackModifier and TypeMethodDescriptionprivate voidVaultState.ejectResultItem(ServerLevel pLevel, BlockPos pPos, ItemStack pStack, float pEjectionProgress) private static booleanVaultBlockEntity.Server.isValidToInsert(VaultConfig pConfig, ItemStack pStack) VaultBlockEntity.Server.resolveItemsToEject(ServerLevel pLevel, VaultConfig pConfig, BlockPos pPos, Player pPlayer, ItemStack pKey) voidVaultSharedData.setDisplayItem(ItemStack pDisplayItem) static voidVaultBlockEntity.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) voidVaultServerData.setItemsToEject(List<ItemStack> pItemsToEject) private static voidVaultBlockEntity.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 aVaultConfigrecord class.(package private)VaultSharedData(ItemStack pDisplayItem, Set<UUID> pConnectedPlayers, double pConnectedParticlesRange) Constructor parameters in net.minecraft.world.level.block.entity.vault with type arguments of type ItemStackModifierConstructorDescription(package private)VaultServerData(Set<UUID> pRewardedPlayers, long pStateUpdatingResumesAt, List<ItemStack> pItemsToEject, int pTotalEjectionsNeeded) -
Uses of ItemStack in net.minecraft.world.level.block.piston
Methods in net.minecraft.world.level.block.piston that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackMovingPistonBlock.getCloneItemStack(LevelReader p_304937_, BlockPos p_60058_, BlockState p_60059_, boolean p_386505_) protected ItemStackPistonHeadBlock.getCloneItemStack(LevelReader p_304638_, BlockPos p_60262_, BlockState p_60263_, boolean p_386559_) Methods in net.minecraft.world.level.block.piston that return types with arguments of type ItemStackModifier and TypeMethodDescriptionMovingPistonBlock.getDrops(BlockState p_287650_, LootParams.Builder p_287754_) Methods in net.minecraft.world.level.block.piston with parameters of type ItemStackModifier and TypeMethodDescriptionvoidPistonBaseBlock.setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, @Nullable LivingEntity pPlacer, ItemStack pStack) -
Uses of ItemStack in net.minecraft.world.level.block.state
Methods in net.minecraft.world.level.block.state that return ItemStackModifier and TypeMethodDescriptionBlockBehaviour.BlockStateBase.getCloneItemStack(LevelReader pLevel, BlockPos pPos, boolean pIncludeData) protected ItemStackBlockBehaviour.getCloneItemStack(LevelReader pLevel, BlockPos pPos, BlockState pState, boolean pIncludeData) Deprecated.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 TypeMethodDescriptionvoidBlockBehaviour.BlockStateBase.spawnAfterBreak(ServerLevel pLevel, BlockPos pPos, ItemStack pStack, boolean pDropExperience) protected voidBlockBehaviour.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 InteractionResultBlockBehaviour.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 TypeMethodDescriptionvoidBlockBehaviour.BlockStateBase.onExplosionHit(ServerLevel pLevel, BlockPos pPos, Explosion pExplosion, BiConsumer<ItemStack, BlockPos> pDropConsumer) protected voidBlockBehaviour.onExplosionHit(BlockState pState, ServerLevel 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 voidMapItemSavedData.addTargetDecoration(ItemStack pStack, BlockPos pPos, String pType, Holder<MapDecorationType> pMapDecorationType) MapItemSavedData.mapMatcher(ItemStack pStack) voidMapItemSavedData.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.compositeFunctionprivate final BiFunction<ItemStack, LootContext, ItemStack> LootPool.compositeFunctionprivate final BiFunction<ItemStack, LootContext, ItemStack> LootTable.compositeFunctionprivate final BiFunction<ItemStack, LootContext, ItemStack> LootTable.compositeFunctionprivate final ContextKey<? extends ItemStack> LootContext.ItemStackTarget.paramMethods in net.minecraft.world.level.storage.loot that return types with arguments of type ItemStackModifier and TypeMethodDescriptionContextKey<? extends ItemStack> LootContext.ItemStackTarget.contextParam()LootTable.createStackSplitter(ServerLevel pLevel, Consumer<ItemStack> pOutput) ContainerComponentManipulator.getContents(T pContents) private it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> LootTable.getRandomItems(LootContext pContext) Generate random items to a List.it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> LootTable.getRandomItems(LootParams pParams) it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> LootTable.getRandomItems(LootParams pParams, long pSeed) it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> LootTable.getRandomItems(LootParams pParams, RandomSource pRandom) Methods in net.minecraft.world.level.storage.loot with parameters of type ItemStackModifier and TypeMethodDescriptiondefault SlotCollectiondefault voidContainerComponentManipulator.modifyItems(ItemStack pStack, UnaryOperator<ItemStack> pModifier) default voidContainerComponentManipulator.setContents(ItemStack pStack, Stream<ItemStack> pItems) default voidContainerComponentManipulator.setContents(ItemStack pStack, T pContents, Stream<ItemStack> pItems) Method parameters in net.minecraft.world.level.storage.loot with type arguments of type ItemStackModifier and TypeMethodDescriptionvoidvoidLootContext.addDynamicDrops(Identifier pName, Consumer<ItemStack> pConsumer) Add the dynamic drops for the given dynamic drops name to the given consumer.voidLootParams.addDynamicDrops(Identifier pLocation, Consumer<ItemStack> pConsumer) private voidLootPool.addRandomItem(Consumer<ItemStack> pStackConsumer, LootContext pContext) voidLootPool.addRandomItems(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the random items from this LootPool to the givenstackConsumer.LootContextArg.ArgCodecBuilder.anyItemStack(Function<? super ContextKey<? extends ItemStack>, ? extends LootContextArg<R>> pFactory) LootTable.createStackSplitter(ServerLevel pLevel, Consumer<ItemStack> pOutput) voidLootTable.getRandomItems(LootContext pContextData, Consumer<ItemStack> pOutput) Generate random items to the given Consumer, ensuring they do not exceed their maximum stack size.voidLootTable.getRandomItems(LootParams pParams, long pSeed, Consumer<ItemStack> pOutput) voidLootTable.getRandomItems(LootParams pParams, Consumer<ItemStack> pOutput) voidLootTable.getRandomItemsRaw(LootContext pContext, Consumer<ItemStack> pOutput) Deprecated.voidLootTable.getRandomItemsRaw(LootParams pParams, Consumer<ItemStack> pOutput) Deprecated.default voidContainerComponentManipulator.modifyItems(ItemStack pStack, UnaryOperator<ItemStack> pModifier) default voidContainerComponentManipulator.setContents(ItemStack pStack, Stream<ItemStack> pItems) default voidContainerComponentManipulator.setContents(ItemStack pStack, T pContents, Stream<ItemStack> pItems) ContainerComponentManipulator.setContents(T pContents, Stream<ItemStack> pItems) private voidLootTable.shuffleAndSplitItems(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> pStacks, int pEmptySlotsCount, RandomSource pRandom) Shuffles items by changing their order and splitting stacksConstructor parameters in net.minecraft.world.level.storage.loot with type arguments of type ItemStackModifierConstructorDescriptionprivateItemStackTarget(String pName, ContextKey<? extends ItemStack> pParam) -
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.compositeFunctionMethod parameters in net.minecraft.world.level.storage.loot.entries with type arguments of type ItemStackModifier and TypeMethodDescriptionvoidDynamicLoot.createItemStack(Consumer<ItemStack> p_79481_, LootContext p_79482_) voidEmptyLootItem.createItemStack(Consumer<ItemStack> p_79531_, LootContext p_79532_) voidLootItem.createItemStack(Consumer<ItemStack> p_79590_, LootContext p_79591_) voidLootPoolEntry.createItemStack(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.protected abstract voidLootPoolSingletonContainer.createItemStack(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.voidNestedLootTable.createItemStack(Consumer<ItemStack> p_331038_, LootContext p_331648_) voidSlotLoot.createItemStack(Consumer<ItemStack> p_460754_, LootContext p_461257_) voidTagEntry.createItemStack(Consumer<ItemStack> p_79854_, LootContext p_79855_) -
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.compositeFunctionprivate final BiFunction<ItemStack, LootContext, ItemStack> SequenceFunction.compositeFunctionstatic final BiFunction<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITYstatic final BiFunction<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITYMethods in net.minecraft.world.level.storage.loot.functions that return ItemStackModifier and TypeMethodDescriptionfinal ItemStackLootItemConditionalFunction.apply(ItemStack pStack, LootContext pContext) SequenceFunction.apply(ItemStack pStack, LootContext pContext) private static ItemStackEnchantRandomlyFunction.enchantItem(ItemStack pStack, Holder<Enchantment> pEnchantment, RandomSource pRandom) ApplyBonusCount.run(ItemStack pStack, LootContext pContext) ApplyExplosionDecay.run(ItemStack pStack, LootContext pContext) protected ItemStackCopyBlockState.run(ItemStack pStack, LootContext pContext) CopyComponentsFunction.run(ItemStack p_330563_, LootContext p_331220_) CopyCustomDataFunction.run(ItemStack p_330210_, LootContext p_330315_) CopyNameFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackDiscardItem.run(ItemStack p_459120_, LootContext p_459191_) EnchantedCountIncreaseFunction.run(ItemStack p_345285_, LootContext p_345560_) EnchantRandomlyFunction.run(ItemStack pStack, LootContext pContext) EnchantWithLevelsFunction.run(ItemStack pStack, LootContext pContext) ExplorationMapFunction.run(ItemStack pStack, LootContext pContext) FillPlayerHead.run(ItemStack pStack, LootContext pContext) FilteredFunction.run(ItemStack p_340845_, LootContext p_341349_) protected ItemStackFunctionReference.run(ItemStack p_279458_, LootContext p_279370_) LimitCount.run(ItemStack pStack, LootContext pContext) protected abstract ItemStackLootItemConditionalFunction.run(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run(ItemStack p_341267_, LootContext p_341214_) SetAttributesFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackSetBannerPatternFunction.run(ItemStack p_165280_, LootContext p_165281_) protected ItemStackSetBookCoverFunction.run(ItemStack p_334048_, LootContext p_334012_) SetComponentsFunction.run(ItemStack p_330211_, LootContext p_331318_) SetContainerContents.run(ItemStack pStack, LootContext pContext) SetContainerLootTable.run(ItemStack pStack, LootContext pContext) SetCustomDataFunction.run(ItemStack p_330737_, LootContext p_331310_) SetCustomModelDataFunction.run(ItemStack p_341195_, LootContext p_341335_) SetEnchantmentsFunction.run(ItemStack p_165346_, LootContext p_165347_) protected ItemStackSetFireworkExplosionFunction.run(ItemStack p_334066_, LootContext p_333987_) protected ItemStackSetFireworksFunction.run(ItemStack p_334053_, LootContext p_333744_) SetInstrumentFunction.run(ItemStack p_231017_, LootContext p_231018_) SetItemCountFunction.run(ItemStack pStack, LootContext pContext) SetItemDamageFunction.run(ItemStack pStack, LootContext pContext) SetItemFunction.run(ItemStack p_340909_, LootContext p_341298_) SetLoreFunction.run(ItemStack pStack, LootContext pContext) SetNameFunction.run(ItemStack pStack, LootContext pContext) SetOminousBottleAmplifierFunction.run(ItemStack p_338554_, LootContext p_338336_) SetPotionFunction.run(ItemStack p_193073_, LootContext p_193074_) SetStewEffectFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackSetWritableBookPagesFunction.run(ItemStack p_333832_, LootContext p_333929_) protected ItemStackSetWrittenBookPagesFunction.run(ItemStack p_333960_, LootContext p_333892_) SmeltItemFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackToggleTooltips.run(ItemStack p_335844_, LootContext p_335764_) 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 ItemStackLootItemConditionalFunction.apply(ItemStack pStack, LootContext pContext) SequenceFunction.apply(ItemStack pStack, LootContext pContext) private static ItemStackEnchantRandomlyFunction.enchantItem(ItemStack pStack, Holder<Enchantment> pEnchantment, RandomSource pRandom) ApplyBonusCount.run(ItemStack pStack, LootContext pContext) ApplyExplosionDecay.run(ItemStack pStack, LootContext pContext) protected ItemStackCopyBlockState.run(ItemStack pStack, LootContext pContext) CopyComponentsFunction.run(ItemStack p_330563_, LootContext p_331220_) CopyCustomDataFunction.run(ItemStack p_330210_, LootContext p_330315_) CopyNameFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackDiscardItem.run(ItemStack p_459120_, LootContext p_459191_) EnchantedCountIncreaseFunction.run(ItemStack p_345285_, LootContext p_345560_) EnchantRandomlyFunction.run(ItemStack pStack, LootContext pContext) EnchantWithLevelsFunction.run(ItemStack pStack, LootContext pContext) ExplorationMapFunction.run(ItemStack pStack, LootContext pContext) FillPlayerHead.run(ItemStack pStack, LootContext pContext) FilteredFunction.run(ItemStack p_340845_, LootContext p_341349_) protected ItemStackFunctionReference.run(ItemStack p_279458_, LootContext p_279370_) LimitCount.run(ItemStack pStack, LootContext pContext) protected abstract ItemStackLootItemConditionalFunction.run(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run(ItemStack p_341267_, LootContext p_341214_) SetAttributesFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackSetBannerPatternFunction.run(ItemStack p_165280_, LootContext p_165281_) protected ItemStackSetBookCoverFunction.run(ItemStack p_334048_, LootContext p_334012_) SetComponentsFunction.run(ItemStack p_330211_, LootContext p_331318_) SetContainerContents.run(ItemStack pStack, LootContext pContext) SetContainerLootTable.run(ItemStack pStack, LootContext pContext) SetCustomDataFunction.run(ItemStack p_330737_, LootContext p_331310_) SetCustomModelDataFunction.run(ItemStack p_341195_, LootContext p_341335_) SetEnchantmentsFunction.run(ItemStack p_165346_, LootContext p_165347_) protected ItemStackSetFireworkExplosionFunction.run(ItemStack p_334066_, LootContext p_333987_) protected ItemStackSetFireworksFunction.run(ItemStack p_334053_, LootContext p_333744_) SetInstrumentFunction.run(ItemStack p_231017_, LootContext p_231018_) SetItemCountFunction.run(ItemStack pStack, LootContext pContext) SetItemDamageFunction.run(ItemStack pStack, LootContext pContext) SetItemFunction.run(ItemStack p_340909_, LootContext p_341298_) SetLoreFunction.run(ItemStack pStack, LootContext pContext) SetNameFunction.run(ItemStack pStack, LootContext pContext) SetOminousBottleAmplifierFunction.run(ItemStack p_338554_, LootContext p_338336_) SetPotionFunction.run(ItemStack p_193073_, LootContext p_193074_) SetStewEffectFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackSetWritableBookPagesFunction.run(ItemStack p_333832_, LootContext p_333929_) protected ItemStackSetWrittenBookPagesFunction.run(ItemStack p_333960_, LootContext p_333892_) SmeltItemFunction.run(ItemStack pStack, LootContext pContext) protected ItemStackToggleTooltips.run(ItemStack p_335844_, LootContext p_335764_) 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 ItemStackModifierConstructorDescriptionprotectedEntityCollisionContext(boolean pDescending, boolean pPlacement, double pEntityBottom, ItemStack pHeldItem, boolean pAlwaysCollideWithFluid, @Nullable Entity pEntity) -
Uses of ItemStack in net.minecraft.world.ticks
Methods in net.minecraft.world.ticks that return ItemStackModifier and TypeMethodDescriptiondefault ItemStackContainerSingleItem.getItem(int p_304882_) ContainerSingleItem.getTheItem()default ItemStackContainerSingleItem.removeItem(int p_304944_, int p_304791_) default ItemStackContainerSingleItem.removeItemNoUpdate(int p_273409_) default ItemStackContainerSingleItem.removeTheItem()default ItemStackContainerSingleItem.splitTheItem(int pAmount) Methods in net.minecraft.world.ticks with parameters of type ItemStackModifier and TypeMethodDescriptiondefault voidvoidContainerSingleItem.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 ItemStackModifier and TypeMethodDescription@Nullable TItemCapability.getCapability(ItemStack stack, C context) Method 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_SEARCHprivate static final Map<SessionSearchTrees.Key, CompletableFuture<SearchTree<ItemStack>>> CreativeModeTabSearchRegistry.NAME_SEARCH_TREESprivate static final Map<SessionSearchTrees.Key, CompletableFuture<SearchTree<ItemStack>>> CreativeModeTabSearchRegistry.TAG_SEARCH_TREESMethods in net.neoforged.neoforge.client that return types with arguments of type ItemStackModifier and TypeMethodDescriptionstatic Function<ItemStack, RenderType> RenderTypeHelper.detectItemModelRenderType(List<BakedQuad> quads, RenderTypeGroup renderTypes) Determines whether the provided quads need use textures from the block atlas or the item atlas and returns the respectiveRenderTypegetter.static 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 IdentifierClientHooks.getArmorTexture(ItemStack armor, EquipmentClientInfo.LayerType type, EquipmentClientInfo.Layer layer, Identifier _default) static FontClientHooks.getTooltipFont(ItemStack stack, Font fallbackFont) static ItemDecoratorHandlerstatic RenderTooltipEvent.PreClientHooks.onRenderTooltipPre(ItemStack stack, GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<ClientTooltipComponent> components, Font fallbackFont, ClientTooltipPositioner positioner) static RenderTooltipEvent.TextureClientHooks.onRenderTooltipTexture(ItemStack stack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components, @Nullable Identifier texture) booleanIItemDecorator.render(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) Is called after GuiGraphics.renderItemDecorations(Font, ItemStack, int, int, String) is done rendering.voidItemDecoratorHandler.render(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) static booleanClientHooks.renderSpecificFirstPersonHand(InteractionHand hand, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, ItemStack stack) static booleanClientHooks.shouldCauseReequipAnimation(ItemStack from, ItemStack to, int slot) Method parameters in net.neoforged.neoforge.client with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic voidCreativeModeTabSearchRegistry.putNameSearchTree(SessionSearchTrees.Key key, CompletableFuture<SearchTree<ItemStack>> future) static voidCreativeModeTabSearchRegistry.putTagSearchTree(SessionSearchTrees.Key key, CompletableFuture<SearchTree<ItemStack>> future) -
Uses of ItemStack in net.neoforged.neoforge.client.color.item
Methods in net.neoforged.neoforge.client.color.item with parameters of type ItemStackModifier and TypeMethodDescriptionintFluidContentsTint.calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) -
Uses of ItemStack in net.neoforged.neoforge.client.event
Fields in net.neoforged.neoforge.client.event declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackRenderTooltipEvent.GatherComponents.itemStackprotected final ItemStackRenderTooltipEvent.itemStackprivate final ItemStackRenderHandEvent.stackMethods in net.neoforged.neoforge.client.event that return ItemStackModifier and TypeMethodDescriptionRenderHandEvent.getItemStack()Returns the item stack to be 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.Constructors in net.neoforged.neoforge.client.event with parameters of type ItemStackModifierConstructorDescriptionGatherComponents(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, SubmitNodeCollector submitNodeCollector, int packedLight, float partialTick, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack) protectedRenderTooltipEvent(ItemStack itemStack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components) Texture(ItemStack stack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components, @Nullable Identifier texture) -
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 booleanIClientItemExtensions.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 intIClientItemExtensions.getArmorLayerTintColor(ItemStack stack, EquipmentClientInfo.Layer layer, int layerIdx, int fallbackColor) Called when armor layers are rendered byEquipmentLayerRenderer.default @Nullable IdentifierIClientItemExtensions.getArmorTexture(ItemStack stack, EquipmentClientInfo.LayerType type, EquipmentClientInfo.Layer layer, Identifier _default) Called by RenderBiped and RenderPlayer to determine the armor texture that should be used for the currently equipped item.default @Nullable HumanoidModel.ArmPoseIClientItemExtensions.getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) This method returns an ArmPose that can be defined using themethod.invalid reference
net.minecraft.client.model.HumanoidModel.ArmPose#create(String, boolean, IArmPoseTransformer)default intIClientItemExtensions.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, EquipmentClientInfo.Layer, int, int)as thefallbackColorparameter.default @Nullable FontIClientItemExtensions.getFont(ItemStack stack, IClientItemExtensions.FontContext context) Returns the font used to render data related to this item as specified in thecontext.default ModelIClientItemExtensions.getGenericArmorModel(ItemStack itemStack, EquipmentClientInfo.LayerType layerType, Model original) Queries the armor model for this item when it's equipped.default ModelIClientItemExtensions.getHumanoidArmorModel(ItemStack itemStack, EquipmentClientInfo.LayerType layerType, Model original) Queries the humanoid armor model for this item when it's equipped.default IdentifierIClientItemExtensions.getScopeOverlayTexture(ItemStack stack) Returns the texture to use for scoping with the item.static IClientItemExtensionsdefault voidIClientItemExtensions.renderFirstPersonOverlay(ItemStack stack, EquipmentSlot equipmentSlot, Player player, GuiGraphics guiGraphics, DeltaTracker deltaTracker) Called to render an overlay on the first-person camera.default voidIClientItemExtensions.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 booleanIClientItemExtensions.shouldBobAsEntity(ItemStack stack) Returns Whether the item should bob when rendered in the world as an entity.default booleanIClientItemExtensions.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.item
Methods in net.neoforged.neoforge.client.model.item with parameters of type ItemStackModifier and TypeMethodDescriptionvoidDynamicFluidContainerModel.update(ItemStackRenderState renderState, ItemStack stack, ItemModelResolver modelResolver, ItemDisplayContext displayContext, @Nullable ClientLevel level, @Nullable ItemOwner owner, int seed) -
Uses of ItemStack in net.neoforged.neoforge.common
Fields in net.neoforged.neoforge.common declared as ItemStackModifier and TypeFieldDescriptionprotected final ItemStackBasicItemListing.forSaleprotected final ItemStackBasicItemListing.priceprotected final ItemStackBasicItemListing.price2Methods in net.neoforged.neoforge.common that return ItemStackModifier and TypeMethodDescriptionstatic ItemStackCommonHooks.getCraftingRemainder(ItemStack stack) static ItemStackCommonHooks.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(Identifier 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 booleanCommonHooks.canContinueUsing(ItemStack from, ItemStack to) booleanSpecialPlantable.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 ItemAttributeModifiersCommonHooks.computeModifiedAttributes(ItemStack stack, ItemAttributeModifiers defaultModifiers) Hook to fireItemAttributeModifierEvent.static UseOnContextCommonHooks.dispenseUseOnContext(BlockSource source, ItemStack stack) Creates aUseOnContextfordispense behavior.static voidCommonHooks.fireAnvilCraftPost(AnvilMenu menu, Player player, ItemStack output, ItemStack left, ItemStack right) Fires theAnvilCraftEvent.Postwhen the anvil is used to craft an item.static AnvilCraftEvent.PreCommonHooks.fireAnvilCraftPre(AnvilMenu menu, Player player, ItemStack output, ItemStack left, ItemStack right) Fires theAnvilCraftEvent.Prewhen the anvil is used to craft an item.static ItemStackCommonHooks.getCraftingRemainder(ItemStack stack) static @Nullable StringCommonHooks.getDefaultCreatorModId(HolderLookup.Provider registries, ItemStack itemStack) Used as the default implementation ofIItemExtension.getCreatorModId(net.minecraft.core.HolderLookup.Provider, net.minecraft.world.item.ItemStack).static ItemStackCommonHooks.getProjectile(LivingEntity entity, ItemStack projectileWeaponItem, ItemStack projectile) Hook to fireLivingGetProjectileEvent.static voidCommonHooks.handleBlockDrops(ServerLevel level, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, List<ItemEntity> drops, @Nullable Entity breaker, ItemStack tool) Fires theBlockDropsEventwhen block drops (items and experience) are determined.default booleanIShearable.isShearable(@Nullable Player player, ItemStack item, Level level, BlockPos pos) Checks if this object can be sheared.static voidCommonHooks.onAnvilUpdate(AnvilMenu menu, ItemStack leftInput, ItemStack rightInput, Container resultSlot, @Nullable String name, Player player) Called fromAnvilMenu.createResult()after the vanilla result has been computed.static intCommonHooks.onGrindstoneChange(ItemStack top, ItemStack bottom, Container outputSlot, int xp) static booleanCommonHooks.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 booleanCommonHooks.onLivingUseTotem(LivingEntity entity, DamageSource damageSource, ItemStack totem, InteractionHand hand) static voidCommonHooks.onPlayerEnchantItem(Player player, ItemStack stack, List<EnchantmentInstance> instances) FiresPlayerEnchantItemEventinEnchantmentMenu.clickMenuButton(Player, int)after the enchants are applied to the item.static @Nullable ItemEntityCommonHooks.onPlayerTossEvent(Player player, ItemStack item, boolean dropAround, boolean includeName) Shears this object.voidSpecialPlantable.spawnPlantAtPosition(ItemStack itemStack, LevelAccessor level, BlockPos pos, @Nullable Direction direction) Spawns the plant with the given direction attachment point at location.default voidIShearable.spawnShearedDrop(ServerLevel 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 booleanCommonHooks.tryDispenseShearsHarvestBlock(BlockSource source, ItemStack stack, ServerLevel level, BlockPos pos) Attempts to modify target block usingItemAbilities.SHEARS_HARVESTinShearsDispenseItemBehavior, 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(Identifier 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.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.booleanReturns true if the passed input and ingredient have an outputbooleanBrewingRecipe.isIngredient(ItemStack ingredient) booleanIBrewingRecipe.isIngredient(ItemStack ingredient) Returns true if the passed ItemStack is an ingredient for this recipe.booleanbooleanReturns true is the passed ItemStack is an input for this recipe.booleanBrewingRecipeRegistry.isValidIngredient(ItemStack stack) Returns true if the passed ItemStack is a valid ingredient for any of the recipes in the registry.booleanBrewingRecipeRegistry.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 ItemStackMethods in net.neoforged.neoforge.common.crafting with parameters of type ItemStackModifier and TypeMethodDescriptionstatic IngredientCreates a new ingredient matching the given item, containing the given componentsbooleanbooleanbooleanbooleanbooleanbooleanChecks if a stack matches this ingredient.booleanbooleanPerforms 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 TypeMethodDescriptionvoidLanguageProvider.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 ItemStackIItemExtension.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 ItemStackIBlockExtension.getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData, Player player) Called when A user uses the creative pick block button on this blockdefault ItemStackIBlockStateExtension.getCloneItemStack(BlockPos pos, LevelReader level, boolean includeData, Player player) Called when A user uses the creative pick block button on this blockdefault ItemStackIItemExtension.getCraftingRemainder(ItemStack itemStack) ItemStack sensitive version ofItem.getCraftingRemainder()()}.default ItemStackIItemStackExtension.getCraftingRemainder()ItemStack sensitive version ofItem.getCraftingRemainder().private ItemStackIItemStackExtension.self()Methods in net.neoforged.neoforge.common.extensions with parameters of type ItemStackModifier and TypeMethodDescriptiondefault ItemStackIItemExtension.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 booleanIItemExtension.canBeHurtBy(ItemStack stack, DamageSource source) Returns false to make item entity immune to the damage..default booleanIItemExtension.canContinueUsing(ItemStack oldStack, ItemStack newStack) Called while an item is in 'active' use to determine if usage should continue.default booleanIItemExtension.canEquip(ItemStack stack, EquipmentSlot armorType, LivingEntity entity) Determines if the specific ItemStack can be placed in the specified armor slot, for the entity.default booleanIItemExtension.canFitInsideContainerItems(ItemStack stack) Determines whether this item can be safely stored inside another container item, optionally taking the provided stack's data into account.default booleanIItemExtension.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 booleanIItemExtension.canPerformAction(ItemStack stack, ItemAbility itemAbility) Queries if an item can perform the given action.default booleanIItemExtension.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 EntityIItemExtension.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, @Nullable T entity, Consumer<Item> onBroken) Reduce the durability of this item by the amount given.default booleanIItemExtension.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 booleanIDispensibleContainerItemExtension.emptyContents(@Nullable LivingEntity entity, Level level, BlockPos pos, @Nullable BlockHitResult hitResult, @Nullable ItemStack container) Empties the contents of the container and returns whether it was successful.default ItemEnchantmentsIItemExtension.getAllEnchantments(ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) Gets a map of all enchantments present on the stack.default intIItemExtension.getBurnTime(ItemStack itemStack, @Nullable RecipeType<?> recipeType, FuelValues fuelValues) default ItemStackIItemExtension.getCraftingRemainder(ItemStack itemStack) ItemStack sensitive version ofItem.getCraftingRemainder()()}.default @Nullable StringIItemExtension.getCreatorModId(HolderLookup.Provider registries, 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 intReturn the itemDamage represented by this ItemStack.default ItemAttributeModifiersIItemExtension.getDefaultAttributeModifiers(ItemStack stack) ItemStack sensitive version of getDefaultAttributeModifiers.default intIItemExtension.getEnchantmentLevel(ItemStack stack, Holder<Enchantment> enchantment) Gets the level of the enchantment currently present on the stack.default intIItemExtension.getEntityLifespan(ItemStack itemStack, Level level) Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem.default @Nullable EquipmentSlotIItemExtension.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 intIBlockExtension.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 intIBlockStateExtension.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 ComponentIItemExtension.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 intIItemExtension.getMaxDamage(ItemStack stack) Return the maxDamage for this ItemStack.default intIItemExtension.getMaxStackSize(ItemStack stack) Gets the maximum number of items that this stack should be able to hold.default AABBIItemExtension.getSweepHitBox(ItemStack stack, Player player, Entity target) Get a bounding box (AABB) of a sweep attack.default floatIItemExtension.getXpRepairRatio(ItemStack stack) Determines the amount of durability the mending enchantment will repair, on average, per 0.5 points of experience.default booleanIItemExtension.hasCustomEntity(ItemStack stack) Determines if this Item has a special entity for when they are in the world.booleanIItemExtension.isCombineRepairable(ItemStack stack) Determines if an item is repairable by combining, used by Repair recipes and Grindstone.default booleanIItemExtension.isDamageable(ItemStack stack) Used to test if this item can be damaged, but with the ItemStack in question.default booleanReturn if this itemstack is damaged.default booleanIItemExtension.isGazeDisguise(ItemStack stack, Player player, @Nullable LivingEntity entity) Whether thisItemcan be used to hide player's gaze from Endermen and Creakings.default booleanIItemExtension.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 booleanIItemExtension.isPiglinCurrency(ItemStack stack) Called by Piglins when checking to see if they will give an item or something in exchange for this item.default booleanIItemExtension.isPrimaryItemFor(ItemStack stack, Holder<Enchantment> enchantment) Checks if an item should be treated as a primary item for a given enchantment.default booleanIItemExtension.makesPiglinsNeutral(ItemStack stack, LivingEntity wearer) Called by Piglins to check if a given item prevents hostility on sight.default voidIItemExtension.onAnimalArmorTick(ItemStack stack, Level level, Mob horse) Called every tick when this item is equipped as an armor item by an animal.default booleanIBlockExtension.onDestroyedByPlayer(BlockState state, Level level, BlockPos pos, Player player, ItemStack toolStack, boolean willHarvest, FluidState fluid) Called when a player removes a block.default booleanIBlockStateExtension.onDestroyedByPlayer(Level level, BlockPos pos, Player player, ItemStack toolStack, boolean willHarvest, FluidState fluid) Called when a player removes a block.default booleanIItemExtension.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 booleanIItemExtension.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 booleanIItemExtension.onEntitySwing(ItemStack stack, LivingEntity entity, InteractionHand hand) Called when a entity tries to play the 'swing' animation.default InteractionResultIItemExtension.onItemUseFirst(ItemStack stack, UseOnContext context) This is called when the item is used, before the block is activated.default booleanIItemExtension.onLeftClickEntity(ItemStack stack, Player player, Entity entity) Called when the player Left Clicks (attacks) an entity.default voidIItemExtension.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 voidSet the damage for this itemstack.default voidAn extension ofContainer.setItem(int, ItemStack)that allows non-transactional side-effects to be skipped.default booleanIItemExtension.shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack) Called when the player is mining a block and the item in his hand changes.default booleanIItemStackExtension.shouldCauseBlockBreakReset(ItemStack newStack) Called when the player is mining a block and the item in his hand changes.default booleanIItemExtension.shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) Determine if the player switching between these two item stacksdefault booleanIItemExtension.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 voidAttributeUtil.addAttributeTooltips(ItemStack stack, Consumer<Component> tooltip, TooltipDisplay tooltipDisplay, 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 voidAttributeUtil.applyModifierTooltips(ItemStack stack, Consumer<Component> tooltip, AttributeTooltipContext ctx) Applies the attribute modifier tooltips for all attribute modifiers present on the item stack.static voidAttributeUtil.applyTextFor(ItemStack stack, Consumer<Component> tooltip, Multimap<Holder<Attribute>, AttributeModifier> modifierMap, AttributeTooltipContext ctx) Applies the text for the provided attribute modifiers to the tooltip for a given item stack.static Multimap<Holder<Attribute>, AttributeModifier> AttributeUtil.getSortedModifiers(ItemStack stack, EquipmentSlotGroup slot) Returns a sorted, mutableMultimapcontaining all the attribute modifiers on an item stack for the given group. -
Uses of ItemStack in net.neoforged.neoforge.event
Fields in net.neoforged.neoforge.event declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackGrindstoneEvent.bottomprivate final ItemStackItemStackedOnOtherEvent.carriedItemprivate final ItemStackAnvilUpdateEvent.leftprivate ItemStackGrindstoneEvent.OnTakeItem.newBottomprivate ItemStackGrindstoneEvent.OnTakeItem.newTopprivate ItemStackAnvilUpdateEvent.outputprivate final ItemStackAnvilUpdateEvent.VanillaResult.outputThe field for theoutputrecord component.private ItemStackGrindstoneEvent.OnPlaceItem.outputprivate final ItemStackAnvilUpdateEvent.rightprotected final ItemStackAddAttributeTooltipsEvent.stackprotected final ItemStackGatherSkippedAttributeTooltipsEvent.stackprivate final ItemStackItemAttributeModifierEvent.stackprivate final ItemStackItemStackedOnOtherEvent.stackedOnItemprivate final ItemStackGrindstoneEvent.topFields in net.neoforged.neoforge.event with type parameters of type ItemStackModifier and TypeFieldDescriptionprivate final InsertableLinkedOpenCustomHashSet<ItemStack> BuildCreativeModeTabContentsEvent.parentEntriesprivate final InsertableLinkedOpenCustomHashSet<ItemStack> BuildCreativeModeTabContentsEvent.searchEntriesMethods 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()Returns a copy of the item in the left input slot.GrindstoneEvent.OnTakeItem.getNewBottomItem()Returns the item in that will be in the bottom input grindstone slot after the event.GrindstoneEvent.OnTakeItem.getNewTopItem()Returns the item in that will be in the top input grindstone slot after the event.AnvilUpdateEvent.getOutput()Returns a mutable reference to the current output stack, defaulting to the vanilla output.GrindstoneEvent.OnPlaceItem.getOutput()This is the output as determined by the event, not by the vanilla behavior between these two items.AnvilUpdateEvent.getRight()Returns a copy of the item in the right input slot.AddAttributeTooltipsEvent.getStack()TheItemStackwith the tooltip.GatherSkippedAttributeTooltipsEvent.getStack()TheItemStackwith the tooltip.ItemStackedOnOtherEvent.getStackedOnItem()Returns the stack currently in the slot being clicked on.GrindstoneEvent.getTopItem()static ItemStackEventHooks.onItemUseFinish(LivingEntity entity, ItemStack item, int duration, ItemStack result) AnvilUpdateEvent.VanillaResult.output()Returns the value of theoutputrecord component.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.Methods in net.neoforged.neoforge.event with parameters of type ItemStackModifier and TypeMethodDescriptionvoidBuildCreativeModeTabContentsEvent.accept(ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new stack at the end of the given tab at this point in time.private voidBuildCreativeModeTabContentsEvent.assertNewEntryDoesNotAlreadyExists(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack newEntry) private static voidBuildCreativeModeTabContentsEvent.assertStackCount(ItemStack newEntry) private voidBuildCreativeModeTabContentsEvent.assertTargetExists(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack existingEntry) static BonemealEventEventHooks.fireBonemealEvent(@Nullable Player player, Level level, BlockPos pos, BlockState state, ItemStack stack) Called when bone meal (or equivalent) is used on a block.static voidEventHooks.fireItemPickupPost(ItemEntity itemEntity, Player player, ItemStack copy) Called inItemEntity.playerTouch(Player)after an item was successfully picked up.static voidEventHooks.firePlayerCraftingEvent(Player player, ItemStack crafted, Container craftMatrix) static voidEventHooks.firePlayerSmeltedEvent(Player player, ItemStack smelted, int amountRemoved) static ItemEnchantmentsEventHooks.getAllEnchantmentLevels(ItemEnchantments enchantments, ItemStack stack, HolderLookup.RegistryLookup<Enchantment> lookup) FiresGetEnchantmentLevelEventand for all enchantments, returning the (possibly event-modified) enchantment map.static intEventHooks.getEnchantmentLevelSpecific(int level, ItemStack stack, Holder<Enchantment> ench) FiresGetEnchantmentLevelEventand for a single enchantment, returning the (possibly event-modified) level.static intEventHooks.getItemBurnTime(ItemStack itemStack, int burnTime, @Nullable RecipeType<?> recipeType, FuelValues fuelValues) voidBuildCreativeModeTabContentsEvent.insertAfter(ItemStack existingEntry, ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry after the specified existing entry.voidBuildCreativeModeTabContentsEvent.insertBefore(ItemStack existingEntry, ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry before the specified existing entry.voidBuildCreativeModeTabContentsEvent.insertFirst(ItemStack newEntry, CreativeModeTab.TabVisibility visibility) Inserts the new entry in the front of the tab's content.static intEventHooks.onArrowLoose(ItemStack stack, Level level, Player player, int charge, boolean hasAmmo) static InteractionResultEventHooks.onArrowNock(ItemStack item, Level level, Player player, InteractionHand hand, boolean hasAmmo) static intEventHooks.onEnchantmentLevelSet(Level level, BlockPos pos, int enchantRow, int power, ItemStack itemStack, int enchantmentLevel) EventHooks.onItemConsumptionTeleport(LivingEntity entity, ItemStack itemStack, double targetX, double targetY, double targetZ) static ItemTooltipEventEventHooks.onItemTooltip(ItemStack itemStack, @Nullable Player entityPlayer, List<Component> list, TooltipFlag flags, Item.TooltipContext context) static ItemStackEventHooks.onItemUseFinish(LivingEntity entity, ItemStack item, int duration, ItemStack result) static intEventHooks.onItemUseStart(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) static intEventHooks.onItemUseTick(LivingEntity entity, ItemStack item, int duration) static voidEventHooks.onPlayerBrewedPotion(Player player, ItemStack stack) static voidEventHooks.onPlayerDestroyItem(Player player, ItemStack stack, @Nullable InteractionHand hand) static booleanEventHooks.onUseItemStop(LivingEntity entity, ItemStack item, int duration) voidBuildCreativeModeTabContentsEvent.remove(ItemStack existingEntry, CreativeModeTab.TabVisibility visibility) Removes an entry from the tab's content.voidGrindstoneEvent.OnTakeItem.setNewBottomItem(ItemStack newBottom) Sets the itemstack in the bottom slot.voidGrindstoneEvent.OnTakeItem.setNewTopItem(ItemStack newTop) Sets the itemstack in the top slot.voidSets the output to the given item stack.voidSets the output slot to a specific itemstack.Method parameters in net.neoforged.neoforge.event with type arguments of type ItemStackModifier and TypeMethodDescriptionprivate voidBuildCreativeModeTabContentsEvent.assertNewEntryDoesNotAlreadyExists(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack newEntry) private voidBuildCreativeModeTabContentsEvent.assertTargetExists(InsertableLinkedOpenCustomHashSet<ItemStack> setToCheck, ItemStack existingEntry) static booleanEventHooks.onPotionAttemptBrew(NonNullList<ItemStack> stacks) static voidEventHooks.onPotionBrewed(NonNullList<ItemStack> brewingItemStacks) Constructors in net.neoforged.neoforge.event with parameters of type ItemStackModifierConstructorDescriptionAddAttributeTooltipsEvent(ItemStack stack, Consumer<Component> tooltip, AttributeTooltipContext ctx) AnvilUpdateEvent(ItemStack left, ItemStack right, @Nullable String name, ItemStack result, int xpCost, int materialCost, Player player) protectedGrindstoneEvent(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(ContainerLevelAccess access, Player player, ItemStack top, ItemStack bottom, int xp) VanillaResult(ItemStack output, int xpCost, int materialCost) Creates an instance of aVanillaResultrecord class.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) protectedPotionBrewEvent(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 ItemStackEnchantmentLevelSetEvent.itemStackprotected final ItemStackGetEnchantmentLevelEvent.stackMethods 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
Fields in net.neoforged.neoforge.event.entity declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackEntityTeleportEvent.ItemConsumption.itemStackMethods in net.neoforged.neoforge.event.entity that return ItemStackConstructors in net.neoforged.neoforge.event.entity with parameters of type ItemStackModifierConstructorDescriptionItemConsumption(LivingEntity entity, ItemStack itemStack, double targetX, double targetY, double targetZ) -
Uses of ItemStack in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as ItemStackModifier and TypeFieldDescriptionArmorHurtEvent.ArmorEntry.armorItemStackprivate final ItemStackLivingEquipmentChangeEvent.fromprivate final ItemStackLivingEntityUseItemEvent.itemprivate ItemStackLivingGetProjectileEvent.projectileItemStackprivate final ItemStackLivingGetProjectileEvent.projectileWeaponItemStackprivate ItemStackLivingEntityUseItemEvent.Finish.resultprivate final ItemStackLivingEquipmentChangeEvent.toprivate ItemStackLivingSwapItemsEvent.Hands.toMainHandprivate ItemStackLivingSwapItemsEvent.Hands.toOffHandprivate final ItemStackLivingUseTotemEvent.totemMethods 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 TypeMethodDescriptionvoidLivingSwapItemsEvent.Hands.setItemSwappedToMainHand(ItemStack item) Sets the item that will be swapped to the main hand of the entity.voidLivingSwapItemsEvent.Hands.setItemSwappedToOffHand(ItemStack item) Sets the item that will be swapped to the offhand of the entity.voidLivingGetProjectileEvent.setProjectileItemStack(ItemStack projectileItemStack) Sets the projectile itemstack to be used.voidLivingEntityUseItemEvent.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) privateLivingEntityUseItemEvent(LivingEntity entity, ItemStack item, int duration) privateLivingEntityUseItemEvent(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, 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 ItemStackArrowLooseEvent.bowprivate final ItemStackArrowNockEvent.bowprivate final ItemStackPlayerEvent.ItemCraftedEvent.craftingprivate final ItemStackPlayerEnchantItemEvent.enchantedItemprivate final ItemStackUseItemOnBlockEvent.heldItemprivate final ItemStackItemTooltipEvent.itemStackprivate final ItemStackAnvilCraftEvent.leftprivate final ItemStackPlayerDestroyItemEvent.originalprivate final ItemStackItemEntityPickupEvent.Post.originalStackprivate final ItemStackAnvilCraftEvent.outputprivate final ItemStackAnvilCraftEvent.rightprivate final ItemStackPlayerEvent.ItemSmeltedEvent.smeltingprivate final ItemStackBonemealEvent.stackFields in net.neoforged.neoforge.event.entity.player with type parameters of type ItemStackMethods 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()TheItemStackwith the tooltip.PlayerInteractEvent.getItemStack()UseItemOnBlockEvent.getItemStack()AnvilCraftEvent.getLeft()Returns a copy of the item stack that was in the left input slot (before the crafting operation).PlayerDestroyItemEvent.getOriginal()ItemEntityPickupEvent.Post.getOriginalStack()Returns a copy of the original stack, before it was added to the player's inventory.AnvilCraftEvent.getOutput()Returns a copy of the item stack that was picked up from the anvil output slot.AnvilCraftEvent.getRight()Returns a copy of the item stack that was in the right input slot (before the crafting operation).PlayerEvent.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 TypeMethodDescriptionItemFishedEvent.getDrops()Use this to get the items the player will receive.Constructors in net.neoforged.neoforge.event.entity.player with parameters of type ItemStackModifierConstructorDescriptionArrowLooseEvent(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, int amountRemoved) 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, FuelValues fuelValues) -
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 ItemStackModifier and TypeFieldDescriptionfinal ItemStackFluidActionResult.resultDeprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.fluids that return ItemStackModifier and TypeMethodDescriptionFluidType.getBucket(FluidStack stack) Returns the bucket containing the fluid.static ItemStackFluidUtil.getFilledBucket(FluidStack fluidStack) Deprecated, for removal: This API element is subject to removal in a future version.FluidActionResult.getResult()Deprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.fluids with parameters of type ItemStackModifier and TypeMethodDescriptionstatic Optional<FluidStack> FluidUtil.getFluidContained(ItemStack container) Deprecated, for removal: This API element is subject to removal in a future version.static Optional<IFluidHandlerItem> FluidUtil.getFluidHandler(ItemStack itemStack) Deprecated, for removal: This API element is subject to removal in a future version.Obtain anItemAccess, and find a handler by callingItemAccess.getCapability(net.neoforged.neoforge.capabilities.ItemCapability<T, net.neoforged.neoforge.transfer.access.ItemAccess>)withCapabilities.Fluid.ITEM.static FluidActionResultFluidUtil.tryEmptyContainer(ItemStack container, IFluidHandler fluidDestination, int maxAmount, @Nullable Player player, boolean doDrain) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResultFluidUtil.tryEmptyContainerAndStow(ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable Player player, boolean doDrain) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResultFluidUtil.tryFillContainer(ItemStack container, IFluidHandler fluidSource, int maxAmount, @Nullable Player player, boolean doFill) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResultFluidUtil.tryFillContainerAndStow(ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable Player player, boolean doFill) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResultFluidUtil.tryPickUpFluid(ItemStack emptyContainer, @Nullable Player playerIn, Level level, BlockPos pos, Direction side) Deprecated, for removal: This API element is subject to removal in a future version.static FluidActionResultFluidUtil.tryPlaceFluid(@Nullable Player player, Level level, InteractionHand hand, BlockPos pos, ItemStack container, FluidStack resource) Deprecated, for removal: This API element is subject to removal in a future version.Constructors in net.neoforged.neoforge.fluids with parameters of type ItemStackModifierConstructorDescriptionprivateFluidActionResult(boolean success, ItemStack result) Deprecated, for removal: This API element is subject to removal in a future version.FluidActionResult(ItemStack result) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability
Methods in net.neoforged.neoforge.fluids.capability that return ItemStackModifier and TypeMethodDescriptionFluidResourceHandlerItemAdapter.getContainer()Deprecated, for removal: This API element is subject to removal in a future version.IFluidHandlerItem.getContainer()Deprecated, for removal: This API element is subject to removal in a future version.There is no equivalent to this method, since in the new system the container is changed directly via anItemAccess. -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability.templates
Fields in net.neoforged.neoforge.fluids.capability.templates declared as ItemStackModifier and TypeFieldDescriptionprotected ItemStackFluidHandlerItemStack.containerDeprecated, for removal: This API element is subject to removal in a future version.protected ItemStackFluidHandlerItemStackSimple.containerDeprecated, for removal: This API element is subject to removal in a future version.protected final ItemStackFluidHandlerItemStack.SwapEmpty.emptyContainerDeprecated, for removal: This API element is subject to removal in a future version.protected final ItemStackFluidHandlerItemStackSimple.SwapEmpty.emptyContainerDeprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.fluids.capability.templates that return ItemStackModifier and TypeMethodDescriptionFluidHandlerItemStack.getContainer()Deprecated, for removal: This API element is subject to removal in a future version.FluidHandlerItemStackSimple.getContainer()Deprecated, for removal: This API element is subject to removal in a future version.Constructors in net.neoforged.neoforge.fluids.capability.templates with parameters of type ItemStackModifierConstructorDescriptionConsumable(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.Consumable(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.FluidHandlerItemStack(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.FluidHandlerItemStackSimple(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.SwapEmpty(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.SwapEmpty(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ItemStack in net.neoforged.neoforge.fluids.capability.wrappers
Fields in net.neoforged.neoforge.fluids.capability.wrappers declared as ItemStackModifier and TypeFieldDescriptionprotected ItemStackFluidBucketWrapper.containerDeprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.fluids.capability.wrappers that return ItemStackModifier and TypeMethodDescriptionFluidBucketWrapper.getContainer()Deprecated, for removal: This API element is subject to removal in a future version.Constructors in net.neoforged.neoforge.fluids.capability.wrappers with parameters of type ItemStackModifierConstructorDescriptionFluidBucketWrapper(ItemStack container) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ItemStack in net.neoforged.neoforge.items
Fields in net.neoforged.neoforge.items with type parameters of type ItemStackModifier and TypeFieldDescriptionprotected NonNullList<ItemStack> ItemStackHandler.stacksDeprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.items that return ItemStackModifier and TypeMethodDescriptionComponentItemHandler.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.IItemHandler.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemResourceHandlerAdapter.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemStackHandler.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.SlotItemHandler.getItem()Deprecated, for removal: This API element is subject to removal in a future version.protected ItemStackItemHandlerCopySlot.getStackCopy()Deprecated, for removal: This API element is subject to removal in a future version.protected ItemStackComponentItemHandler.getStackFromContents(ItemContainerContents contents, int slot) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves a copy of a single stack from the underlying data component, returningEMPTYif the component does not have a slot present.ComponentItemHandler.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.IItemHandler.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.UseResourceHandler.getResource(int)andResourceHandler.getAmountAsInt(int)instead.ItemResourceHandlerAdapter.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.ItemStackHandler.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.ComponentItemHandler.insertItem(int slot, ItemStack toInsert, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.IItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.static ItemStackItemHandlerHelper.insertItem(IItemHandler dest, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemResourceHandlerAdapter.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemStackHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.static ItemStackItemHandlerHelper.insertItemStacked(IItemHandler inventory, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.SlotItemHandler.remove(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.items with parameters of type ItemStackModifier and TypeMethodDescriptionintItemHandlerCopySlot.getMaxStackSize(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.intSlotItemHandler.getMaxStackSize(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.protected intItemStackHandler.getStackLimit(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.static voidItemHandlerHelper.giveItemToPlayer(Player player, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.static voidItemHandlerHelper.giveItemToPlayer(Player player, ItemStack stack, int preferredSlot) Deprecated, for removal: This API element is subject to removal in a future version.voidSlotItemHandler.initialize(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.ComponentItemHandler.insertItem(int slot, ItemStack toInsert, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.IItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.static ItemStackItemHandlerHelper.insertItem(IItemHandler dest, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemResourceHandlerAdapter.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ItemStackHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.static ItemStackItemHandlerHelper.insertItemStacked(IItemHandler inventory, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.booleanComponentItemHandler.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanIItemHandler.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.UseResourceHandler.isValid(int, T)instead, however note that it doesn't make the same strong guarantees regarding how long a resource is valid.booleanItemResourceHandlerAdapter.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanItemStackHandler.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.protected voidComponentItemHandler.onContentsChanged(int slot, ItemStack oldStack, ItemStack newStack) Deprecated, for removal: This API element is subject to removal in a future version.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.voidItemHandlerCopySlot.onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn) Deprecated, for removal: This API element is subject to removal in a future version.voidSlotItemHandler.onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.protected voidItemHandlerCopySlot.setStackCopy(ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidComponentItemHandler.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidIItemHandlerModifiable.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.Overrides the stack in the given slot.voidItemStackHandler.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.protected voidComponentItemHandler.updateContents(ItemContainerContents contents, ItemStack stack, int slot) Deprecated, for removal: This API element is subject to removal in a future version.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 ItemStackModifierConstructorDescriptionItemStackHandler(NonNullList<ItemStack> stacks) Deprecated, for removal: This API element is subject to removal in a future version. -
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) Deprecated, for removal: This API element is subject to removal in a future version.EmptyItemHandler.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.EntityEquipmentInvWrapper.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ForwardingItemHandler.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.InvWrapper.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.RangedWrapper.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.SidedInvWrapper.extractItem(int slot, int amount, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.RecipeWrapper.getItem(int slot) Deprecated, for removal: This API element is subject to removal in a future version.Returns the stack in this slot.CombinedInvWrapper.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.EmptyItemHandler.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.EntityEquipmentInvWrapper.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.ForwardingItemHandler.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.InvWrapper.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.RangedWrapper.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.SidedInvWrapper.getStackInSlot(int slot) Deprecated, for removal: This API element is subject to removal in a future version.CombinedInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.EmptyItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.EntityEquipmentInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ForwardingItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.InvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.PlayerArmorInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.PlayerMainInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.RangedWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.SidedInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.Methods in net.neoforged.neoforge.items.wrapper with parameters of type ItemStackModifier and TypeMethodDescriptionprotected intEntityEquipmentInvWrapper.getStackLimit(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.CombinedInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.EmptyItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.EntityEquipmentInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.ForwardingItemHandler.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.InvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.PlayerArmorInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.PlayerMainInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.RangedWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.SidedInvWrapper.insertItem(int slot, ItemStack stack, boolean simulate) Deprecated, for removal: This API element is subject to removal in a future version.booleanCombinedInvWrapper.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanEmptyItemHandler.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanEntityEquipmentInvWrapper.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanForwardingItemHandler.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanInvWrapper.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanRangedWrapper.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.booleanSidedInvWrapper.isItemValid(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.intSidedInvWrapper.InsertLimit.limitInsert(int wrapperSlot, int invSlot, ItemStack stack) private voidSidedInvWrapper.setInventorySlotContents(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidCombinedInvWrapper.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidEmptyItemHandler.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidEntityEquipmentInvWrapper.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidInvWrapper.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidRangedWrapper.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version.voidSidedInvWrapper.setStackInSlot(int slot, ItemStack stack) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of ItemStack in net.neoforged.neoforge.registries
Methods in net.neoforged.neoforge.registries that return ItemStack -
Uses of ItemStack in net.neoforged.neoforge.transfer.access
Methods in net.neoforged.neoforge.transfer.access with parameters of type ItemStackModifier and TypeMethodDescriptionstatic ItemAccessItemAccess.forInfiniteMaterials(Player player, ItemStack contents) Creates an item access instance for a player with infinite materials, i.e. in creative mode.static ItemAccessCreates an item access instance that will mutate a stack directly, possibly changing the components and the count, but never the underlying Item as it's final.Constructors in net.neoforged.neoforge.transfer.access with parameters of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.transfer.fluid
Methods in net.neoforged.neoforge.transfer.fluid that return ItemStackModifier and TypeMethodDescriptionDispenseFluidContainer.execute(BlockSource source, ItemStack stack) Methods in net.neoforged.neoforge.transfer.fluid with parameters of type ItemStackModifier and TypeMethodDescriptionDispenseFluidContainer.execute(BlockSource source, ItemStack stack) static FluidStackFluidUtil.getFirstStackContained(ItemStack stack) Returns a new fluid stack with the first fluid contents of the given item stack, ignoring the count of the stack. -
Uses of ItemStack in net.neoforged.neoforge.transfer.item
Fields in net.neoforged.neoforge.transfer.item declared as ItemStackModifier and TypeFieldDescriptionprivate final ItemStackItemResource.innerStackA wrappedItemStackwhich must never be modified or exposed.Methods in net.neoforged.neoforge.transfer.item that return ItemStackModifier and TypeMethodDescriptionprotected ItemStackprotected ItemStackItemStackResourceHandler.createSnapshot()protected ItemStackCarriedSlotWrapper.getStack()protected abstract ItemStackItemStackResourceHandler.getStack()Return the stack of this handler.static ItemStackItemUtil.getStack(ResourceHandler<ItemResource> handler, int index) Returns a new item stack with the contents of the handler at the given index.protected ItemStackLivingEntityEquipmentWrapper.SlotWrapper.getStack()protected ItemStackVanillaContainerWrapper.SlotWrapper.getStack()protected ItemStackResourceHandlerSlot.getStackCopy()protected ItemStackItemStacksResourceHandler.getStackFrom(ItemResource resource, int amount) protected ItemStackItemAccessItemHandler.getStackFromContents(ItemContainerContents contents, int slot) Retrieves a copy of a single stack from the underlying data component, returningEMPTYif the component does not have a slot present.static ItemStackItemUtil.insertItemReturnRemaining(ResourceHandler<ItemResource> handler, int index, ItemStack stack, boolean simulate, @Nullable TransactionContext transaction) Attempts to insert an item stack into the index of a handler, returning any leftover.static ItemStackItemUtil.insertItemReturnRemaining(ResourceHandler<ItemResource> handler, ItemStack stack, boolean simulate, @Nullable TransactionContext transaction) Attempts to insert an item stack into a handler, leaving distribution to the handler, and returning any leftover.ItemResource.toStack()Creates anItemStackwith a count of 1.ItemResource.toStack(int count) Creates anItemStackof the specified count.Methods in net.neoforged.neoforge.transfer.item with parameters of type ItemStackModifier and TypeMethodDescriptionprotected ItemStackintItemStacksResourceHandler.getAmountFrom(ItemStack stack) intResourceHandlerSlot.getMaxStackSize(ItemStack stack) ItemStacksResourceHandler.getResourceFrom(ItemStack stack) static ItemStackItemUtil.insertItemReturnRemaining(ResourceHandler<ItemResource> handler, int index, ItemStack stack, boolean simulate, @Nullable TransactionContext transaction) Attempts to insert an item stack into the index of a handler, returning any leftover.static ItemStackItemUtil.insertItemReturnRemaining(ResourceHandler<ItemResource> handler, ItemStack stack, boolean simulate, @Nullable TransactionContext transaction) Attempts to insert an item stack into a handler, leaving distribution to the handler, and returning any leftover.booleanReturns true if this resource matches the item and components of the passed stack.booleanItemStacksResourceHandler.matches(ItemStack stack, ItemResource resource) booleanstatic ItemResourceCreates an ItemResource using the default or copy of the passed in item stack.voidResourceHandlerSlot.onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn) protected voidLivingEntityEquipmentWrapper.SlotWrapper.onRootCommit(ItemStack originalState) protected voidVanillaContainerWrapper.SlotWrapper.onRootCommit(ItemStack original) protected voidItemStackResourceHandler.revertToSnapshot(ItemStack snapshot) protected voidprotected abstract voidSet the stack of this handler.protected voidprotected voidprotected voidResourceHandlerSlot.setStackCopy(ItemStack stack) Method parameters in net.neoforged.neoforge.transfer.item with type arguments of type ItemStackConstructors in net.neoforged.neoforge.transfer.item with parameters of type ItemStackConstructor parameters in net.neoforged.neoforge.transfer.item with type arguments of type ItemStack -
Uses of ItemStack in net.neoforged.neoforge.world.inventory
Fields in net.neoforged.neoforge.world.inventory declared as ItemStackMethods in net.neoforged.neoforge.world.inventory that return ItemStackModifier and TypeMethodDescriptionfinal ItemStackStackCopySlot.getItem()protected abstract ItemStackStackCopySlot.getStackCopy()Gets the itemstack from the storage.final ItemStackStackCopySlot.remove(int amount) Methods in net.neoforged.neoforge.world.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionfinal voidprotected abstract voidStackCopySlot.setStackCopy(ItemStack stack) Sets the itemstack from the storage.
IShearable.onSheared(net.minecraft.world.entity.player.Player, net.minecraft.world.item.ItemStack, net.minecraft.world.level.Level, net.minecraft.core.BlockPos)instead.