Uses of Class
net.minecraft.item.ItemStack
Package
Description
Provides the cauldron behavior system,
which determines what happens when a player interacts with a cauldron.
The basic AI system for Minecraft living entities.
Contains utility method classes, various enums, serialization helpers, and
miscellaneous classes.
-
Uses of ItemStack in net.minecraft.advancement
Modifier and TypeMethodDescriptionAdvancement.Builder.display
(ItemStack icon, Text title, Text description, @Nullable Identifier background, AdvancementFrame frame, boolean showToast, boolean announceToChat, boolean hidden) ModifierConstructorDescriptionAdvancementDisplay
(ItemStack icon, Text title, Text description, Optional<Identifier> background, AdvancementFrame frame, boolean showToast, boolean announceToChat, boolean hidden) -
Uses of ItemStack in net.minecraft.advancement.criterion
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
FishingRodHookedCriterion.Conditions.matches
(ItemStack rodStack, LootContext hookedEntity, Collection<ItemStack> fishingLoots) boolean
InventoryChangedCriterion.Conditions.matches
(PlayerInventory inventory, ItemStack stack, int full, int empty, int occupied) boolean
boolean
KilledByArrowCriterion.Conditions.matches
(Collection<LootContext> victimContexts, int uniqueEntityTypeCount, @Nullable ItemStack weapon) boolean
boolean
boolean
VillagerTradeCriterion.Conditions.matches
(LootContext villager, ItemStack stack) boolean
BeeNestDestroyedCriterion.Conditions.test
(BlockState state, ItemStack stack, int count) boolean
PlayerInteractedWithEntityCriterion.Conditions.test
(ItemStack stack, LootContext entity) boolean
ThrownItemPickedUpByEntityCriterion.Conditions.test
(ServerPlayerEntity player, ItemStack stack, LootContext entity) boolean
void
AnyBlockUseCriterion.trigger
(ServerPlayerEntity player, BlockPos pos, ItemStack stack) void
BeeNestDestroyedCriterion.trigger
(ServerPlayerEntity player, BlockState state, ItemStack stack, int beeCount) void
ConsumeItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
EnchantedItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, int levels) void
FilledBucketCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
FishingRodHookedCriterion.trigger
(ServerPlayerEntity player, ItemStack rod, FishingBobberEntity bobber, Collection<ItemStack> fishingLoots) void
InventoryChangedCriterion.trigger
(ServerPlayerEntity player, PlayerInventory inventory, ItemStack stack) private void
InventoryChangedCriterion.trigger
(ServerPlayerEntity player, PlayerInventory inventory, ItemStack stack, int full, int empty, int occupied) void
ItemCriterion.trigger
(ServerPlayerEntity player, BlockPos pos, ItemStack stack) void
ItemDurabilityChangedCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, int durability) void
KilledByArrowCriterion.trigger
(ServerPlayerEntity player, Collection<Entity> piercingKilledEntities, @Nullable ItemStack weapon) void
PlayerInteractedWithEntityCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, Entity entity) void
ShotCrossbowCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
ThrownItemPickedUpByEntityCriterion.trigger
(ServerPlayerEntity player, ItemStack stack, @Nullable Entity entity) void
UsedTotemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
UsingItemCriterion.trigger
(ServerPlayerEntity player, ItemStack stack) void
VillagerTradeCriterion.trigger
(ServerPlayerEntity player, MerchantEntity merchant, ItemStack stack) Modifier and TypeMethodDescriptionboolean
FishingRodHookedCriterion.Conditions.matches
(ItemStack rodStack, LootContext hookedEntity, Collection<ItemStack> fishingLoots) (package private) boolean
RecipeCraftedCriterion.Conditions.matches
(RegistryKey<Recipe<?>> recipeKey, List<ItemStack> ingredients) void
FishingRodHookedCriterion.trigger
(ServerPlayerEntity player, ItemStack rod, FishingBobberEntity bobber, Collection<ItemStack> fishingLoots) void
RecipeCraftedCriterion.trigger
(ServerPlayerEntity player, RegistryKey<Recipe<?>> recipeKey, List<ItemStack> ingredients) -
Uses of ItemStack in net.minecraft.block
Modifier and TypeMethodDescriptionstatic ItemStack
LightBlock.addNbtForLevel
(ItemStack stack, int level) static ItemStack
ShulkerBoxBlock.getItemStack
(@Nullable DyeColor color) AbstractBannerBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.AbstractPlantBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.AttachedStemBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.BambooShootBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.BigDripleafStemBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.Block.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.CandleCakeBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.CaveVinesBodyBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.CaveVinesHeadBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.CropBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.DecoratedPotBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.EndGatewayBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.EndPortalBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.FlowerPotBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.FrostedIceBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.LightBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.NetherPortalBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.NetherWartBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.PistonExtensionBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.PistonHeadBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.ShulkerBoxBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.StemBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.SweetBerryBushBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.TallSeagrassBlock.getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.BarrierBlock.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) BubbleColumnBlock.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) FluidBlock.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) FluidDrainable.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) PowderSnowBlock.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) default ItemStack
Waterloggable.tryDrainFluid
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, BlockState state) Modifier and TypeMethodDescriptionAbstractBlock.AbstractBlockState.getDroppedStacks
(LootWorldContext.Builder builder) AbstractBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.BeehiveBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.Block.getDroppedStacks
(BlockState state, ServerWorld world, BlockPos pos, @Nullable BlockEntity blockEntity) Block.getDroppedStacks
(BlockState state, ServerWorld world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack stack) DecoratedPotBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.FluidBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.PistonExtensionBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.ShulkerBoxBlock.getDroppedStacks
(BlockState state, LootWorldContext.Builder builder) Returns the block's dropped item stacks.Modifier and TypeMethodDescriptionstatic ItemStack
LightBlock.addNbtForLevel
(ItemStack stack, int level) (package private) static BlockState
ComposterBlock.addToComposter
(@Nullable Entity user, BlockState state, WorldAccess world, BlockPos pos, ItemStack stack) void
BeehiveBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.void
Block.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.void
IceBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.void
TallPlantBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.void
TurtleEggBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) Called server-side when the block is broken by the player using correct tool.void
BeehiveBlock.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.void
Block.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.void
DecoratedPotBlock.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.void
ShulkerBoxBlock.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.void
SpawnerBlock.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.void
TrialSpawnerBlock.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.static boolean
WitherSkullBlock.canDispense
(World world, BlockPos pos, ItemStack stack) boolean
ComposterBlock.ComposterInventory.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
ComposterBlock.DummyInventory.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
ComposterBlock.FullComposterInventory.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.static BlockState
ComposterBlock.compost
(Entity user, BlockState state, ServerWorld world, ItemStack stack, BlockPos pos) protected void
Block.dropExperienceWhenMined
(ServerWorld world, BlockPos pos, ItemStack tool, IntProvider experience) Drops experience orbs.private static void
Block.dropStack
(World world, Supplier<ItemEntity> itemEntitySupplier, ItemStack stack) static void
static void
static void
Block.dropStacks
(BlockState state, World world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack tool) private static DispenserBehavior
DispenserBlock.getBehaviorForItem
(ItemStack stack) protected DispenserBehavior
DispenserBlock.getBehaviorForItem
(World world, ItemStack stack) protected DispenserBehavior
DropperBlock.getBehaviorForItem
(World world, ItemStack stack) Block.getDroppedStacks
(BlockState state, ServerWorld world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack stack) private static boolean
RespawnAnchorBlock.isChargeItem
(ItemStack stack) void
AbstractRedstoneGateBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
BedBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
Block.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
CommandBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
CrafterBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
DoorBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
JukeboxBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
PaleMossCarpetBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
PistonBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
PitcherCropBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
SmallDripleafBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
StructureBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
TallPlantBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
TripwireHookBlock.onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
WallWitherSkullBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
WitherSkullBlock.onPlaced
(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) Called when the player placed the block.void
AbstractBlock.AbstractBlockState.onStacksDropped
(ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) protected void
AbstractBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
ExperienceDroppingBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
InfestedBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
RedstoneOreBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
SculkCatalystBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
SculkSensorBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
SculkShriekerBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.protected void
SpawnerBlock.onStacksDropped
(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.AbstractBlock.AbstractBlockState.onUseWithItem
(ItemStack stack, World world, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
AbstractBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
AbstractCauldronBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
AbstractSignBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
BeehiveBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
CakeBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
CampfireBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
CandleBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
CandleCakeBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
ChiseledBookshelfBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
ComposterBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
DecoratedPotBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
FlowerPotBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
HangingSignBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
JukeboxBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
LecternBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
NoteBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
PumpkinBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
RedstoneOreBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
RespawnAnchorBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
SweetBerryBushBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
TntBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) VaultBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected ActionResult
WallHangingSignBlock.onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) private static void
LecternBlock.putBook
(@Nullable LivingEntity user, World world, BlockPos pos, BlockState state, ItemStack stack) static boolean
LecternBlock.putBookIfAbsent
(@Nullable LivingEntity user, World world, BlockPos pos, BlockState state, ItemStack stack) private boolean
HangingSignBlock.shouldTryAttaching
(PlayerEntity player, BlockHitResult hitResult, SignBlockEntity sign, ItemStack stack) private boolean
WallHangingSignBlock.shouldTryAttaching
(BlockState state, PlayerEntity player, BlockHitResult hitResult, SignBlockEntity sign, ItemStack stack) private void
CrafterBlock.transferOrSpawnStack
(ServerWorld world, BlockPos pos, CrafterBlockEntity blockEntity, ItemStack stack, BlockState state, RecipeEntry<?> recipe) private static void
ChiseledBookshelfBlock.tryAddBook
(World world, BlockPos pos, PlayerEntity player, ChiseledBookshelfBlockEntity blockEntity, ItemStack stack, int slot) Modifier and TypeMethodDescriptionvoid
AbstractBlock.AbstractBlockState.onExploded
(ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
AbstractBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
AbstractCandleBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
BeehiveBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
BellBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
ButtonBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
DoorBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
FenceGateBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
LeverBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) protected void
TrapdoorBlock.onExploded
(BlockState state, ServerWorld world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) ModifierConstructorDescriptionprotected
EntityShapeContext
(boolean descending, double minY, ItemStack heldItem, Predicate<FluidState> walkOnFluidPredicate, @Nullable Entity entity) FullComposterInventory
(BlockState state, WorldAccess world, BlockPos pos, ItemStack outputItem) -
Uses of ItemStack in net.minecraft.block.cauldron
Modifier and TypeMethodDescriptionprivate static ActionResult
CauldronBehavior.cleanArmor
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) private static ActionResult
CauldronBehavior.cleanBanner
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) private static ActionResult
CauldronBehavior.cleanShulkerBox
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) static ActionResult
CauldronBehavior.emptyCauldron
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, ItemStack output, Predicate<BlockState> fullPredicate, SoundEvent soundEvent) Empties a cauldron if it's full.static ActionResult
CauldronBehavior.fillCauldron
(World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, BlockState state, SoundEvent soundEvent) Fills a cauldron from a bucket stack.CauldronBehavior.interact
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) Called when a player interacts with a cauldron.private static ActionResult
CauldronBehavior.tryFillWithLava
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) private static ActionResult
CauldronBehavior.tryFillWithPowderSnow
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) private static ActionResult
CauldronBehavior.tryFillWithWater
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) -
Uses of ItemStack in net.minecraft.block.dispenser
Modifier and TypeMethodDescriptionprotected ItemStack
ItemDispenserBehavior.decrementStackWithRemainder
(BlockPointer pointer, ItemStack stack, ItemStack remainder) DispenserBehavior.dispense
(BlockPointer pointer, ItemStack stack) final ItemStack
ItemDispenserBehavior.dispense
(BlockPointer pointer, ItemStack stack) protected ItemStack
BlockPlacementDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) BoatDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
EquippableDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
ItemDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) MinecartDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) ProjectileDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
ShearsDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) Modifier and TypeMethodDescriptionprivate void
ItemDispenserBehavior.addStackOrSpawn
(BlockPointer pointer, ItemStack stack) protected ItemStack
ItemDispenserBehavior.decrementStackWithRemainder
(BlockPointer pointer, ItemStack stack, ItemStack remainder) DispenserBehavior.dispense
(BlockPointer pointer, ItemStack stack) static boolean
EquippableDispenserBehavior.dispense
(BlockPointer pointer, ItemStack stack) final ItemStack
ItemDispenserBehavior.dispense
(BlockPointer pointer, ItemStack stack) protected ItemStack
BlockPlacementDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) BoatDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
EquippableDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
ItemDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) MinecartDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) ProjectileDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) protected ItemStack
ShearsDispenserBehavior.dispenseSilently
(BlockPointer pointer, ItemStack stack) static void
ItemDispenserBehavior.spawnItem
(World world, ItemStack stack, int speed, Direction side, Position pos) private static boolean
ShearsDispenserBehavior.tryShearEntity
(ServerWorld world, BlockPos pos, ItemStack shears) -
Uses of ItemStack in net.minecraft.block.entity
Modifier and TypeFieldDescription(package private) ItemStack
LecternBlockEntity.book
private ItemStack
BrushableBlockEntity.item
private ItemStack
JukeboxBlockEntity.recordStack
private ItemStack
DecoratedPotBlockEntity.stack
Modifier and TypeFieldDescriptionprivate DefaultedList
<ItemStack> CrafterBlockEntity.inputStacks
protected DefaultedList
<ItemStack> AbstractFurnaceBlockEntity.inventory
private DefaultedList
<ItemStack> BarrelBlockEntity.inventory
private DefaultedList
<ItemStack> BrewingStandBlockEntity.inventory
private DefaultedList
<ItemStack> ChestBlockEntity.inventory
private final DefaultedList
<ItemStack> ChiseledBookshelfBlockEntity.inventory
private DefaultedList
<ItemStack> DispenserBlockEntity.inventory
private DefaultedList
<ItemStack> HopperBlockEntity.inventory
private DefaultedList
<ItemStack> ShulkerBoxBlockEntity.inventory
private final DefaultedList
<ItemStack> CampfireBlockEntity.itemsBeingCooked
Modifier and TypeMethodDescriptionDispenserBlockEntity.addToFirstFreeSlot
(ItemStack stack) DecoratedPotBlockEntity.asStack()
DecoratedPotBlockEntity.decreaseStack
(int count) JukeboxBlockEntity.decreaseStack
(int count) private static ItemStack
VaultBlockEntity.Server.generateDisplayItem
(ServerWorld world, BlockPos pos, RegistryKey<LootTable> lootTable) LecternBlockEntity.getBook()
BrushableBlockEntity.getItem()
BannerBlockEntity.getPickStack()
ChiseledBookshelfBlockEntity.getStack
(int slot) Returns the stack currently stored atslot
.CrafterBlockEntity.getStack
(int slot) Returns the stack currently stored atslot
.DecoratedPotBlockEntity.getStack()
JukeboxBlockEntity.getStack()
LockableContainerBlockEntity.getStack
(int slot) Returns the stack currently stored atslot
.LootableContainerBlockEntity.getStack
(int slot) Returns the stack currently stored atslot
.static ItemStack
DecoratedPotBlockEntity.getStackWith
(Sherds sherds) ChiseledBookshelfBlockEntity.removeStack
(int slot) Removes the stack currently stored atslot
.ChiseledBookshelfBlockEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.HopperBlockEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.LockableContainerBlockEntity.removeStack
(int slot) Removes the stack currently stored atslot
.LockableContainerBlockEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.LootableContainerBlockEntity.removeStack
(int slot) Removes the stack currently stored atslot
.LootableContainerBlockEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.private ItemStack
LecternBlockEntity.resolveBook
(ItemStack book, @Nullable PlayerEntity player) private static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, int slot, @Nullable Direction side) static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, @Nullable Direction side) Modifier and TypeMethodDescriptionVaultBlockEntity.Server.generateLoot
(ServerWorld world, VaultConfig config, BlockPos pos, PlayerEntity player, ItemStack key) protected DefaultedList
<ItemStack> AbstractFurnaceBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> BarrelBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> BrewingStandBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> ChestBlockEntity.getHeldStacks()
CrafterBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> DispenserBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> HopperBlockEntity.getHeldStacks()
protected abstract DefaultedList
<ItemStack> LockableContainerBlockEntity.getHeldStacks()
protected DefaultedList
<ItemStack> ShulkerBoxBlockEntity.getHeldStacks()
CampfireBlockEntity.getItemsBeingCooked()
Modifier and TypeMethodDescriptionboolean
CampfireBlockEntity.addItem
(ServerWorld world, @Nullable LivingEntity entity, ItemStack stack) DispenserBlockEntity.addToFirstFreeSlot
(ItemStack stack) static void
Spawner.appendSpawnDataToTooltip
(ItemStack stack, List<Text> tooltip, String spawnDataKey) private boolean
CrafterBlockEntity.betterSlotExists
(int count, ItemStack stack, int slot) boolean
BrushableBlockEntity.brush
(long worldTime, ServerWorld world, PlayerEntity player, Direction hitDirection, ItemStack brush) boolean
AbstractFurnaceBlockEntity.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
BrewingStandBlockEntity.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.private static boolean
HopperBlockEntity.canExtract
(Inventory hopperInventory, Inventory fromInventory, ItemStack stack, int slot, Direction facing) boolean
ShulkerBoxBlockEntity.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.private static boolean
HopperBlockEntity.canInsert
(Inventory inventory, ItemStack stack, int slot, @Nullable Direction side) boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.private static boolean
HopperBlockEntity.canMergeItems
(ItemStack first, ItemStack second) boolean
ChiseledBookshelfBlockEntity.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.boolean
JukeboxBlockEntity.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.private void
BrushableBlockEntity.finishBrushing
(ServerWorld world, PlayerEntity player, ItemStack brush) private void
BrushableBlockEntity.generateItem
(ServerWorld world, PlayerEntity player, ItemStack brush) VaultBlockEntity.Server.generateLoot
(ServerWorld world, VaultConfig config, BlockPos pos, PlayerEntity player, ItemStack key) protected int
AbstractFurnaceBlockEntity.getFuelTime
(FuelRegistry fuelRegistry, ItemStack stack) protected int
BlastFurnaceBlockEntity.getFuelTime
(FuelRegistry fuelRegistry, ItemStack stack) protected int
SmokerBlockEntity.getFuelTime
(FuelRegistry fuelRegistry, ItemStack stack) private static int
LecternBlockEntity.getPageCount
(ItemStack stack) Spawner.getSpawnedEntityText
(ItemStack stack, String spawnDataKey) boolean
Returns whetherstack
is valid for theslot
.boolean
Returns whetherstack
is valid for theslot
.boolean
Returns whetherstack
is valid for theslot
.boolean
Returns whetherstack
is valid for theslot
.boolean
Returns whetherstack
is valid for theslot
.private static boolean
VaultBlockEntity.Server.isValidKey
(VaultConfig config, ItemStack stack) final void
BlockEntity.readComponents
(ItemStack stack) void
void
private ItemStack
LecternBlockEntity.resolveBook
(ItemStack book, @Nullable PlayerEntity player) void
void
LecternBlockEntity.setBook
(ItemStack book, @Nullable PlayerEntity player) void
void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
void
Sets the stack stored atslot
tostack
.void
void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
BlockEntity.setStackNbt
(ItemStack stack, RegistryWrapper.WrapperLookup registries) Setsstack
'snet.minecraft.item.BlockItem#BLOCK_ENTITY_TAG_KEY
NBT value to the block entity's NBT data.private void
BrushableBlockEntity.spawnItem
(ServerWorld world, PlayerEntity player, ItemStack brush) private static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, int slot, @Nullable Direction side) static ItemStack
HopperBlockEntity.transfer
(@Nullable Inventory from, Inventory to, ItemStack stack, @Nullable Direction side) static void
VaultBlockEntity.Server.tryUnlock
(ServerWorld world, BlockPos pos, BlockState state, VaultConfig config, VaultServerData serverData, VaultSharedData sharedData, PlayerEntity player, ItemStack stack) Modifier and TypeMethodDescriptionprivate static boolean
AbstractFurnaceBlockEntity.canAcceptRecipeOutput
(DynamicRegistryManager dynamicRegistryManager, @Nullable RecipeEntry<? extends AbstractCookingRecipe> recipe, SingleStackRecipeInput input, DefaultedList<ItemStack> inventory, int maxCount) private static boolean
BrewingStandBlockEntity.canCraft
(BrewingRecipeRegistry brewingRecipeRegistry, DefaultedList<ItemStack> slots) private static void
BrewingStandBlockEntity.craft
(World world, BlockPos pos, DefaultedList<ItemStack> slots) private static boolean
AbstractFurnaceBlockEntity.craftRecipe
(DynamicRegistryManager dynamicRegisryManager, @Nullable RecipeEntry<? extends AbstractCookingRecipe> recipe, SingleStackRecipeInput input, DefaultedList<ItemStack> inventory, int maxCount) protected void
AbstractFurnaceBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
BarrelBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
BrewingStandBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
ChestBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
CrafterBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
DispenserBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
HopperBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected abstract void
LockableContainerBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) protected void
ShulkerBoxBlockEntity.setHeldStacks
(DefaultedList<ItemStack> inventory) private static void
VaultBlockEntity.Server.unlock
(ServerWorld world, BlockState state, BlockPos pos, VaultConfig config, VaultServerData serverData, VaultSharedData sharedData, List<ItemStack> itemsToEject) void
AbstractFurnaceBlockEntity.unlockLastRecipe
(PlayerEntity player, List<ItemStack> ingredients) -
Uses of ItemStack in net.minecraft.block.enums
Modifier and TypeMethodDescriptionprivate void
VaultState.ejectItem
(ServerWorld world, BlockPos pos, ItemStack stack, float pitchModifier) -
Uses of ItemStack in net.minecraft.block.jukebox
Modifier and TypeMethodDescriptionstatic Optional
<RegistryEntry<JukeboxSong>> JukeboxSong.getSongEntryFromStack
(RegistryWrapper.WrapperLookup registries, ItemStack stack) -
Uses of ItemStack in net.minecraft.block.spawner
Modifier and TypeMethodDescriptionTrialSpawnerData.getItemsToDropWhenOminous
(ServerWorld world, TrialSpawnerConfig config, BlockPos pos) -
Uses of ItemStack in net.minecraft.block.vault
Modifier and TypeFieldDescriptionprivate ItemStack
VaultSharedData.displayItem
private final ItemStack
VaultConfig.keyItem
The field for thekeyItem
record component.Modifier and TypeMethodDescriptionVaultSharedData.getDisplayItem()
(package private) ItemStack
VaultServerData.getItemToDisplay()
(package private) ItemStack
VaultServerData.getItemToEject()
VaultConfig.keyItem()
Returns the value of thekeyItem
record component.Modifier and TypeMethodDescription(package private) void
VaultServerData.setItemsToEject
(List<ItemStack> itemsToEject) ModifierConstructorDescriptionVaultConfig
(RegistryKey<LootTable> lootTable, double activationRange, double deactivationRange, ItemStack keyItem, Optional<RegistryKey<LootTable>> overrideLootTableToDisplay) VaultConfig
(RegistryKey<LootTable> registryKey, double double2, double double3, ItemStack itemStack, Optional<RegistryKey<LootTable>> optional, EntityDetector entityDetector, EntityDetector.Selector selector) (package private)
VaultSharedData
(ItemStack displayItem, Set<UUID> connectedPlayers, double connectedParticlesRange) ModifierConstructorDescription(package private)
VaultServerData
(Set<UUID> rewardedPlayers, long stateUpdatingResumesAt, List<ItemStack> itemsToEject, int totalEjectionsNeeded) -
Uses of ItemStack in net.minecraft.client
Modifier and TypeMethodDescriptionprivate void
MinecraftClient.addBlockEntityNbt
(ItemStack stack, BlockEntity blockEntity, DynamicRegistryManager registryManager) -
Uses of ItemStack in net.minecraft.client.color.item
-
Uses of ItemStack in net.minecraft.client.gui
Modifier and TypeMethodDescriptionprivate void
DrawContext.drawCooldownProgress
(ItemStack stack, int x, int y) private void
DrawContext.drawItem
(@Nullable LivingEntity entity, @Nullable World world, ItemStack stack, int x, int y, int seed) private void
DrawContext.drawItem
(@Nullable LivingEntity entity, @Nullable World world, ItemStack stack, int x, int y, int seed, int z) void
DrawContext.drawItem
(LivingEntity entity, ItemStack stack, int x, int y, int seed) void
void
void
private void
DrawContext.drawItemBar
(ItemStack stack, int x, int y) void
DrawContext.drawItemTooltip
(TextRenderer textRenderer, ItemStack stack, int x, int y) void
DrawContext.drawItemWithoutEntity
(ItemStack stack, int x, int y) void
DrawContext.drawItemWithoutEntity
(ItemStack stack, int x, int y, int seed) private void
DrawContext.drawStackCount
(TextRenderer textRenderer, ItemStack stack, int x, int y, @Nullable String stackCountText) void
DrawContext.drawStackOverlay
(TextRenderer textRenderer, ItemStack stack, int x, int y) void
DrawContext.drawStackOverlay
(TextRenderer textRenderer, ItemStack stack, int x, int y, @Nullable String stackCountText) -
Uses of ItemStack in net.minecraft.client.gui.hud
Modifier and TypeMethodDescriptionprivate void
InGameHud.renderHotbarItem
(DrawContext context, int x, int y, RenderTickCounter tickCounter, PlayerEntity player, ItemStack stack, int seed) -
Uses of ItemStack in net.minecraft.client.gui.screen
Modifier and TypeFieldDescription(package private) final ItemStack
GameModeSelectionScreen.GameModeSelection.icon
Modifier and TypeMethodDescriptionScreen.getTooltipFromItem
(MinecraftClient client, ItemStack stack) ModifierConstructorDescriptionprivate
GameModeSelection
(Text text, String command, ItemStack icon) -
Uses of ItemStack in net.minecraft.client.gui.screen.advancement
Modifier and TypeMethodDescriptionvoid
AdvancementTabType.drawIcon
(DrawContext context, int x, int y, int index, ItemStack stack) -
Uses of ItemStack in net.minecraft.client.gui.screen.ingame
Modifier and TypeFieldDescriptionprivate ItemStack
LoomScreen.banner
private ItemStack
LoomScreen.dye
private ItemStack
LoomScreen.pattern
private ItemStack
HandledScreen.quickMovingStack
private final ItemStack
BookEditScreen.stack
private ItemStack
EnchantmentScreen.stack
private ItemStack
HandledScreen.touchDragStack
private ItemStack
HandledScreen.touchDropReturningStack
Modifier and TypeFieldDescriptionfinal DefaultedList
<ItemStack> CreativeInventoryScreen.CreativeScreenHandler.itemList
Modifier and TypeMethodDescriptionCreativeInventoryScreen.CreativeScreenHandler.getCursorStack()
CreativeInventoryScreen.CreativeSlot.getStack()
CreativeInventoryScreen.CreativeScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.CreativeInventoryScreen.CreativeSlot.takeStack
(int amount) Modifier and TypeMethodDescriptionboolean
boolean
CreativeInventoryScreen.CreativeScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.static @Nullable BookScreen.Contents
private void
HandledScreen.drawItem
(DrawContext context, ItemStack stack, int x, int y, @Nullable String amountText) private void
SmithingScreen.equipArmorStand
(ItemStack stack) int
CreativeInventoryScreen.CreativeSlot.getMaxItemCount
(ItemStack stack) CreativeInventoryScreen.getTooltipFromItem
(ItemStack stack) HandledScreen.getTooltipFromItem
(ItemStack stack) private boolean
HandledScreen.isItemTooltipSticky
(ItemStack item) void
AnvilScreen.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
CreativeInventoryListener.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
ForgingScreen.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
SmithingScreen.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
CreativeInventoryScreen.CreativeSlot.onTakeItem
(PlayerEntity player, ItemStack stack) private void
MerchantScreen.renderFirstBuyItem
(DrawContext context, ItemStack adjustedFirstBuyItem, ItemStack originalFirstBuyItem, int x, int y) void
CreativeInventoryScreen.CreativeScreenHandler.setCursorStack
(ItemStack stack) void
Sets the slot's stack tostack
and marks the slot as dirty.void
CreativeInventoryScreen.CreativeSlot.setStackNoCallbacks
(ItemStack stack) Modifier and TypeMethodDescriptionprivate void
CreativeInventoryScreen.refreshSelectedTab
(Collection<ItemStack> displayStacks) ModifierConstructorDescriptionBookEditScreen
(PlayerEntity player, ItemStack stack, Hand hand, WritableBookContentComponent writableBookContent) -
Uses of ItemStack in net.minecraft.client.gui.screen.recipebook
Modifier and TypeFieldDescriptionprivate final ItemStack
RecipeBookWidget.Tab.primaryIcon
The field for theprimaryIcon
record component.Modifier and TypeFieldDescriptionAnimatedResultButton.Result.displayItems
The field for thedisplayItems
record component.GhostRecipe.CyclingItem.items
The field for theitems
record component.RecipeBookWidget.Tab.secondaryIcon
The field for thesecondaryIcon
record component.RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot.stacks
The field for thestacks
record component.Modifier and TypeMethodDescriptionGhostRecipe.CyclingItem.get
(int index) RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot.get
(int index) AnimatedResultButton.getDisplayStack()
AnimatedResultButton.Result.getDisplayStack
(int currentIndex) RecipeBookWidget.Tab.primaryIcon()
Returns the value of theprimaryIcon
record component.Modifier and TypeMethodDescriptionAnimatedResultButton.Result.displayItems()
Returns the value of thedisplayItems
record component.GhostRecipe.CyclingItem.items()
Returns the value of theitems
record component.RecipeBookWidget.Tab.secondaryIcon()
Returns the value of thesecondaryIcon
record component.RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot.stacks()
Returns the value of thestacks
record component.Modifier and TypeMethodDescriptionprotected static RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot
ModifierConstructorDescriptionTab
(ItemStack itemStack, Optional<ItemStack> optional, RecipeBookGroup recipeBookGroup) ModifierConstructorDescription(package private)
CyclingItem
(List<ItemStack> list, boolean bool) (package private)
Result
(NetworkRecipeId networkRecipeId, List<ItemStack> list) Tab
(ItemStack itemStack, Optional<ItemStack> optional, RecipeBookGroup recipeBookGroup) -
Uses of ItemStack in net.minecraft.client.gui.screen.world
Modifier and TypeMethodDescriptionprivate ItemStack
CustomizeFlatLevelScreen.SuperflatLayersListWidget.SuperflatLayerEntry.createItemStackFor
(BlockState state) Modifier and TypeMethodDescriptionprivate void
CustomizeFlatLevelScreen.SuperflatLayersListWidget.SuperflatLayerEntry.renderIcon
(DrawContext context, int x, int y, ItemStack iconItem) -
Uses of ItemStack in net.minecraft.client.gui.tooltip
Modifier and TypeMethodDescriptionBundleTooltipComponent.firstStacksInContents
(int numberOfStacksShown) Modifier and TypeMethodDescriptionboolean
BundleTooltipSubmenuHandler.onScroll
(double horizontal, double vertical, int slotId, ItemStack item) boolean
void
private void
BundleTooltipSubmenuHandler.sendPacket
(ItemStack item, int slotId, int selectedItemIndex) Modifier and TypeMethodDescriptionprivate void
BundleTooltipComponent.drawItem
(int index, int x, int y, List<ItemStack> stacks, int seed, TextRenderer textRenderer, DrawContext drawContext) private int
BundleTooltipComponent.numContentItemsAfter
(List<ItemStack> items) private static boolean
BundleTooltipComponent.shouldDrawItem
(List<ItemStack> items, int itemIndex) -
Uses of ItemStack in net.minecraft.client.item
Modifier and TypeMethodDescriptiondefault float
ClampedModelPredicateProvider.call
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) Deprecated.float
ModelPredicateProvider.call
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) Deprecated.static @Nullable ModelPredicateProvider
ModelPredicateProviderRegistry.get
(ItemStack stack, Identifier id) private float
CompassAnglePredicateProvider.getAngle
(ItemStack stack, ClientWorld world, int seed, Entity entity) private static int
ModelPredicateProviderRegistry.getHoneyLevel
(ItemStack stack) CompassAnglePredicateProvider.CompassTarget.getPos
(ClientWorld world, ItemStack stack, Entity entity) float
ClampedModelPredicateProvider.unclampedCall
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) float
CompassAnglePredicateProvider.unclampedCall
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) -
Uses of ItemStack in net.minecraft.client.network
Modifier and TypeMethodDescriptionprivate static ItemStack
ClientPlayNetworkHandler.getActiveDeathProtector
(PlayerEntity player) Modifier and TypeMethodDescriptionvoid
ClientPlayerInteractionManager.clickCreativeStack
(ItemStack stack, int slotId) void
ClientPlayerEntity.dropCreativeStack
(ItemStack stack) void
ClientPlayerInteractionManager.dropCreativeStack
(ItemStack stack) void
ClientPlayerEntity.onPickupSlotClick
(ItemStack cursorStack, ItemStack slotStack, ClickType clickType) Called when a player performs apickup slot action
in a screen handler.void
Called when the player uses (defaults to right click) a writable or written book item. -
Uses of ItemStack in net.minecraft.client.option
Modifier and TypeMethodDescriptionHotbarStorageEntry.deserialize
(RegistryWrapper.WrapperLookup registries) -
Uses of ItemStack in net.minecraft.client.particle
ModifierConstructorDescription(package private)
CrackParticle
(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ, ItemStack stack) protected
CrackParticle
(ClientWorld world, double x, double y, double z, ItemStack stack) -
Uses of ItemStack in net.minecraft.client.render
Modifier and TypeMethodDescriptionstatic RenderLayer
RenderLayers.getItemLayer
(ItemStack stack) void
GameRenderer.showFloatingItem
(ItemStack floatingItem) -
Uses of ItemStack in net.minecraft.client.render.block.entity
Modifier and TypeMethodDescriptionstatic void
VaultBlockEntityRenderer.renderDisplayItem
(float tickDelta, World world, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, ItemStack stack, ItemRenderer itemRenderer, float prevRotation, float rotation, Random random) -
Uses of ItemStack in net.minecraft.client.render.entity
Modifier and TypeMethodDescriptionprivate ModelIdentifier
ItemFrameEntityRenderer.getModelId
(boolean glow, ItemStack stack) static int
static void
ItemEntityRenderer.renderStack
(ItemRenderer itemRenderer, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, ItemStack stack, BakedModel model, boolean depth, Random random) static void
ItemEntityRenderer.renderStack
(ItemRenderer itemRenderer, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, ItemStack stack, Random random, World world) -
Uses of ItemStack in net.minecraft.client.render.entity.equipment
Modifier and TypeMethodDescriptionvoid
EquipmentRenderer.render
(EquipmentModel.LayerType layerType, Identifier modelId, Model model, ItemStack stack, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) void
EquipmentRenderer.render
(EquipmentModel.LayerType layerType, Identifier modelId, Model model, ItemStack stack, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, @Nullable Identifier texture) -
Uses of ItemStack in net.minecraft.client.render.entity.feature
Modifier and TypeMethodDescriptionprivate boolean
CapeFeatureRenderer.hasCustomModelForLayer
(ItemStack stack, EquipmentModel.LayerType layerType) static boolean
ArmorFeatureRenderer.hasModel
(ItemStack stack, EquipmentSlot slot) private void
LlamaDecorFeatureRenderer.render
(MatrixStack matrices, VertexConsumerProvider vertexConsumers, LlamaEntityRenderState state, ItemStack stack, Identifier modelId, int light) private void
ArmorFeatureRenderer.renderArmor
(MatrixStack matrices, VertexConsumerProvider vertexConsumers, ItemStack stack, EquipmentSlot slot, int light, A armorModel) private void
WolfArmorFeatureRenderer.renderCracks
(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, ItemStack stack, Model model) protected void
HeldItemFeatureRenderer.renderItem
(S state, @Nullable BakedModel model, ItemStack stack, ModelTransformationMode modelTransformation, Arm arm, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) protected void
PlayerHeldItemFeatureRenderer.renderItem
(S s, @Nullable BakedModel bakedModel, ItemStack itemStack, ModelTransformationMode modelTransformationMode, Arm arm, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2) private void
PlayerHeldItemFeatureRenderer.renderSpyglass
(BakedModel model, ItemStack stack, Arm arm, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) -
Uses of ItemStack in net.minecraft.client.render.entity.state
Modifier and TypeFieldDescriptionHorseEntityRenderState.armor
LlamaEntityRenderState.bodyArmor
WolfEntityRenderState.bodyArmor
ItemFrameEntityRenderState.contents
BipedEntityRenderState.equippedChestStack
BipedEntityRenderState.equippedFeetStack
LivingEntityRenderState.equippedHeadStack
BipedEntityRenderState.equippedLegsStack
LivingEntityRenderState.leftHandStack
LivingEntityRenderState.rightHandStack
FireworkRocketEntityRenderState.stack
FlyingItemEntityRenderState.stack
ItemEntityRenderState.stack
OminousItemSpawnerEntityRenderState.stack
-
Uses of ItemStack in net.minecraft.client.render.item
Modifier and TypeFieldDescriptionprivate ItemStack
HeldItemRenderer.mainHand
private ItemStack
HeldItemRenderer.offHand
Modifier and TypeMethodDescriptionprivate void
HeldItemRenderer.applyBrushTransformation
(MatrixStack matrices, float tickDelta, Arm arm, ItemStack stack, PlayerEntity player, float equipProgress) private void
HeldItemRenderer.applyEatOrDrinkTransformation
(MatrixStack matrices, float tickDelta, Arm arm, ItemStack stack, PlayerEntity player) ItemRenderer.getModel
(ItemStack stack, LivingEntity entity, ModelTransformationMode transformationMode) ItemRenderer.getModel
(ItemStack stack, @Nullable World world, @Nullable LivingEntity entity, int seed) private BakedModel
ItemRenderer.getModelOrOverride
(BakedModel model, ItemStack stack, @Nullable World world, @Nullable LivingEntity entity, int seed) private static boolean
HeldItemRenderer.isChargedCrossbow
(ItemStack stack) void
BuiltinModelItemRenderer.render
(ItemStack stack, ModelTransformationMode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) private void
ItemRenderer.renderBakedItemModel
(BakedModel model, ItemStack stack, int light, int overlay, MatrixStack matrices, VertexConsumer vertices) private void
ItemRenderer.renderBakedItemQuads
(MatrixStack matrices, VertexConsumer vertices, List<BakedQuad> quads, ItemStack stack, int light, int overlay) void
ItemRenderer.renderBundle
(ItemStack stack, ModelTransformationMode transformationMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, @Nullable World world, @Nullable LivingEntity entity, int seed) private void
HeldItemRenderer.renderFirstPersonItem
(AbstractClientPlayerEntity player, float tickDelta, float pitch, Hand hand, float swingProgress, ItemStack item, float equipProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) private void
HeldItemRenderer.renderFirstPersonMap
(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int swingProgress, ItemStack stack) void
HeldItemRenderer.renderItem
(LivingEntity entity, ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) void
ItemRenderer.renderItem
(@Nullable LivingEntity entity, ItemStack item, ModelTransformationMode transformationMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, @Nullable World world, int light, int overlay, int seed) void
ItemRenderer.renderItem
(ItemStack stack, ModelTransformationMode transformationMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model) private void
ItemRenderer.renderItem
(ItemStack stack, ModelTransformationMode transformationMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, boolean useInventoryModel) private void
ItemRenderer.renderItem
(ItemStack stack, ModelTransformationMode transformationMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, boolean useInventoryModel, float z) void
ItemRenderer.renderItem
(ItemStack stack, ModelTransformationMode transformationMode, int light, int overlay, MatrixStack matrices, VertexConsumerProvider vertexConsumers, @Nullable World world, int seed) private void
ItemRenderer.renderItem
(ItemStack stack, ModelTransformationMode transformationMode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, boolean useInventoryModel) private void
HeldItemRenderer.renderMapInOneHand
(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, float equipProgress, Arm arm, float swingProgress, ItemStack stack) private static boolean
ItemRenderer.usesDynamicDisplay
(ItemStack stack) -
Uses of ItemStack in net.minecraft.client.render.model.json
Modifier and TypeMethodDescriptionModelOverrideList.getModel
(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) -
Uses of ItemStack in net.minecraft.client.search
Modifier and TypeFieldDescriptionprivate CompletableFuture
<SearchProvider<ItemStack>> SearchManager.itemTagReloadFuture
private CompletableFuture
<SearchProvider<ItemStack>> SearchManager.itemTooltipReloadFuture
Modifier and TypeMethodDescriptionSearchManager.getItemTagReloadFuture()
SearchManager.getItemTooltipReloadFuture()
Modifier and TypeMethodDescriptionvoid
SearchManager.addItemTagReloader
(List<ItemStack> stacks) void
SearchManager.addItemTooltipReloader
(RegistryWrapper.WrapperLookup registries, List<ItemStack> stacks) SearchManager.collectItemTooltips
(Stream<ItemStack> stacks, Item.TooltipContext context, TooltipType type) -
Uses of ItemStack in net.minecraft.client.toast
Modifier and TypeFieldDescriptionprivate final ItemStack
RecipeToast.DisplayItems.categoryItem
The field for thecategoryItem
record component.private final ItemStack
RecipeToast.DisplayItems.unlockedItem
The field for theunlockedItem
record component.Modifier and TypeMethodDescriptionRecipeToast.DisplayItems.categoryItem()
Returns the value of thecategoryItem
record component.RecipeToast.DisplayItems.unlockedItem()
Returns the value of theunlockedItem
record component.Modifier and TypeMethodDescriptionprivate void
RecipeToast.addRecipes
(ItemStack categoryItem, ItemStack unlockedItem) ModifierConstructorDescription(package private)
DisplayItems
(ItemStack itemStack, ItemStack itemStack2) -
Uses of ItemStack in net.minecraft.client.tutorial
Modifier and TypeMethodDescriptionvoid
TutorialManager.onPickupSlotClick
(ItemStack cursorStack, ItemStack slotStack, ClickType clickType) Called when a player performs apickup slot action
in a screen handler.void
CraftPlanksTutorialStepHandler.onSlotUpdate
(ItemStack stack) void
FindTreeTutorialStepHandler.onSlotUpdate
(ItemStack stack) void
PunchTreeTutorialStepHandler.onSlotUpdate
(ItemStack stack) void
TutorialManager.onSlotUpdate
(ItemStack stack) default void
TutorialStepHandler.onSlotUpdate
(ItemStack stack) -
Uses of ItemStack in net.minecraft.command.argument
Modifier and TypeFieldDescriptionprivate final ArgumentParser
<List<Predicate<ItemStack>>> ItemPredicateArgumentType.parser
ItemPredicateArgumentType.ComponentCheck.presenceChecker
The field for thepresenceChecker
record component.ItemPredicateArgumentType.SubPredicateCheck.type
The field for thetype
record component.ItemPredicateArgumentType.ComponentCheck.valueChecker
The field for thevalueChecker
record component.Modifier and TypeMethodDescriptionItemStackArgument.createStack
(int amount, boolean checkOverstack) Modifier and TypeMethodDescriptionItemPredicateArgumentType.Context.componentMatchPredicate
(com.mojang.brigadier.ImmutableStringReader immutableStringReader, ItemPredicateArgumentType.ComponentCheck componentCheck, NbtElement nbtElement) ItemPredicateArgumentType.Context.componentPresencePredicate
(com.mojang.brigadier.ImmutableStringReader immutableStringReader, ItemPredicateArgumentType.ComponentCheck componentCheck) ItemPredicateArgumentType.ComponentCheck.createPredicate
(com.mojang.brigadier.ImmutableStringReader reader, RegistryOps<NbtElement> ops, NbtElement nbt) ItemPredicateArgumentType.SubPredicateCheck.createPredicate
(com.mojang.brigadier.ImmutableStringReader reader, RegistryOps<NbtElement> ops, NbtElement nbt) ItemPredicateArgumentType.Context.itemMatchPredicate
(com.mojang.brigadier.ImmutableStringReader immutableStringReader, Identifier identifier) ItemPredicateArgumentType.ComponentCheck.presenceChecker()
Returns the value of thepresenceChecker
record component.ItemPredicateArgumentType.Context.subPredicatePredicate
(com.mojang.brigadier.ImmutableStringReader immutableStringReader, ItemPredicateArgumentType.SubPredicateCheck subPredicateCheck, NbtElement nbtElement) ItemPredicateArgumentType.Context.tagMatchPredicate
(com.mojang.brigadier.ImmutableStringReader immutableStringReader, Identifier identifier) ItemPredicateArgumentType.SubPredicateCheck.type()
Returns the value of thetype
record component.ItemPredicateArgumentType.ComponentCheck.valueChecker()
Returns the value of thevalueChecker
record component.Modifier and TypeMethodDescriptionModifierConstructorDescription(package private)
ComponentCheck
(Identifier identifier, Predicate<ItemStack> predicate, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder) (package private)
ComponentCheck
(Identifier identifier, Predicate<ItemStack> predicate, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder) (package private)
SubPredicateCheck
(Identifier identifier, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder) -
Uses of ItemStack in net.minecraft.component.type
Modifier and TypeFieldDescriptionprivate final ItemStack
UseRemainderComponent.convertInto
The field for theconvertInto
record component.private final ItemStack
ContainerComponent.Slot.item
The field for theitem
record component.Modifier and TypeFieldDescriptionChargedProjectilesComponent.projectiles
BundleContentsComponent.Builder.stacks
BundleContentsComponent.stacks
private final DefaultedList
<ItemStack> ContainerComponent.stacks
Modifier and TypeMethodDescriptionUseRemainderComponent.convert
(ItemStack stack, int oldCount, boolean inCreative, UseRemainderComponent.StackInserter inserter) UseRemainderComponent.convertInto()
Returns the value of theconvertInto
record component.ContainerComponent.copyFirstStack()
Returns a copy of the first contained stack in this component.static ItemStack
PotionContentsComponent.createStack
(Item item, RegistryEntry<Potion> potion) ConsumableComponent.finishConsumption
(World world, LivingEntity user, ItemStack stack) BundleContentsComponent.get
(int index) ContainerComponent.Slot.item()
Returns the value of theitem
record component.BundleContentsComponent.Builder.removeSelected()
static ItemStack
Modifier and TypeMethodDescriptionNbtComponent.createPredicate
(ComponentType<NbtComponent> type, NbtCompound nbt) ChargedProjectilesComponent.getProjectiles()
BundleContentsComponent.iterate()
BundleContentsComponent.iterateCopy()
ContainerComponent.iterateNonEmpty()
Returns an iterable over this component's non-empty item stacks.ContainerComponent.iterateNonEmptyCopy()
Returns an iterable over copies of this component's non-empty item stacks.BundleContentsComponent.stream()
ContainerComponent.stream()
Returns a stream over copies of this component's stored item stacks.ContainerComponent.streamNonEmpty()
Returns a stream over copies of this component's non-empty item stacks.Modifier and TypeMethodDescriptionint
void
void
DeathProtectionComponent.applyDeathEffects
(ItemStack stack, LivingEntity entity) static boolean
BundleContentsComponent.canBeBundled
(ItemStack stack) boolean
ConsumableComponent.canConsume
(LivingEntity user, ItemStack stack) ConsumableComponent.consume
(LivingEntity user, ItemStack stack, Hand hand) UseRemainderComponent.convert
(ItemStack stack, int oldCount, boolean inCreative, UseRemainderComponent.StackInserter inserter) EquippableComponent.equip
(ItemStack stack, PlayerEntity player) ConsumableComponent.finishConsumption
(World world, LivingEntity user, ItemStack stack) static int
ConsumableComponent.ConsumableSoundProvider.getConsumeSound
(ItemStack stack) private int
BundleContentsComponent.Builder.getInsertionIndex
(ItemStack stack) private int
BundleContentsComponent.Builder.getMaxAllowed
(ItemStack stack) (package private) static Fraction
BundleContentsComponent.getOccupancy
(ItemStack stack) boolean
static ChargedProjectilesComponent
void
Consumable.onConsume
(World world, LivingEntity user, ItemStack stack, ConsumableComponent consumable) void
FoodComponent.onConsume
(World world, LivingEntity user, ItemStack stack, ConsumableComponent consumable) void
OminousBottleAmplifierComponent.onConsume
(World world, LivingEntity user, ItemStack stack, ConsumableComponent consumable) void
PotionContentsComponent.onConsume
(World world, LivingEntity user, ItemStack stack, ConsumableComponent consumable) void
SuspiciousStewEffectsComponent.onConsume
(World world, LivingEntity user, ItemStack stack, ConsumableComponent consumable) static void
NbtComponent.set
(ComponentType<NbtComponent> type, ItemStack stack, Consumer<NbtCompound> nbtSetter) static void
NbtComponent.set
(ComponentType<NbtComponent> type, ItemStack stack, NbtCompound nbt) void
UseCooldownComponent.set
(ItemStack stack, LivingEntity user) static ItemStack
void
ConsumableComponent.spawnParticlesAndPlaySound
(Random random, LivingEntity user, ItemStack stack, int particleCount) static ActionResult
JukeboxPlayableComponent.tryPlayStack
(World world, BlockPos pos, ItemStack stack, PlayerEntity player) Modifier and TypeMethodDescriptionprivate static Fraction
BundleContentsComponent.calculateOccupancy
(List<ItemStack> stacks) void
ContainerComponent.copyTo
(DefaultedList<ItemStack> stacks) Copies the contents of this component to a list of item stacks.private static int
ContainerComponent.findLastNonEmptyIndex
(List<ItemStack> stacks) static ContainerComponent
ContainerComponent.fromStacks
(List<ItemStack> stacks) Creates a container component from a list of item stacks.static ChargedProjectilesComponent
private static com.mojang.serialization.DataResult
<BundleContentsComponent> BundleContentsComponent.validateOccupancy
(List<ItemStack> stacks) ModifierConstructorDescriptionBundleContentsComponent
(List<ItemStack> stacks) (package private)
BundleContentsComponent
(List<ItemStack> stacks, Fraction occupancy, int selectedStackIndex) private
ChargedProjectilesComponent
(List<ItemStack> projectiles) private
ContainerComponent
(List<ItemStack> stacks) private
ContainerComponent
(DefaultedList<ItemStack> stacks) -
Uses of ItemStack in net.minecraft.data.server.recipe
Modifier and TypeMethodDescriptionstatic ShapelessRecipeJsonBuilder
ShapelessRecipeJsonBuilder.create
(RegistryEntryLookup<Item> registryLookup, RecipeCategory category, ItemStack output) protected ShapelessRecipeJsonBuilder
RecipeGenerator.createShapeless
(RecipeCategory category, ItemStack output) ModifierConstructorDescriptionprivate
ShapelessRecipeJsonBuilder
(RegistryEntryLookup<Item> registryLookup, RecipeCategory category, ItemStack output) -
Uses of ItemStack in net.minecraft.enchantment
Modifier and TypeFieldDescriptionprivate final ItemStack
EnchantmentEffectContext.stack
The field for thestack
record component.Modifier and TypeMethodDescriptionstatic ItemStack
EnchantmentHelper.enchant
(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Enchants thetarget
item stack and returns it.static ItemStack
EnchantmentHelper.enchant
(Random random, ItemStack stack, int level, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> enchantments) static ItemStack
EnchantmentHelper.getEnchantedBookWith
(EnchantmentLevelEntry entry) EnchantmentEffectContext.stack()
Returns the value of thestack
record component.Modifier and TypeMethodDescriptionstatic ItemEnchantmentsComponent
EnchantmentHelper.apply
(ItemStack stack, Consumer<ItemEnchantmentsComponent.Builder> applier) static void
EnchantmentHelper.applyAttributeModifiers
(ItemStack stack, AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) static void
EnchantmentHelper.applyAttributeModifiers
(ItemStack stack, EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeModifierConsumer) static void
EnchantmentHelper.applyEnchantmentProvider
(ItemStack stack, DynamicRegistryManager registryManager, RegistryKey<EnchantmentProvider> providerKey, LocalDifficulty localDifficulty, Random random) static void
EnchantmentHelper.applyLocationBasedEffects
(ServerWorld world, ItemStack stack, LivingEntity user, EquipmentSlot slot) static int
EnchantmentHelper.calculateRequiredExperienceLevel
(Random random, int slotIndex, int bookshelfCount, ItemStack stack) Returns the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen.static boolean
EnchantmentHelper.canHaveEnchantments
(ItemStack stack) private static LootContext
Enchantment.createEnchantedItemLootContext
(ServerWorld world, int level, ItemStack stack) static ItemStack
EnchantmentHelper.enchant
(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Enchants thetarget
item stack and returns it.static ItemStack
EnchantmentHelper.enchant
(Random random, ItemStack stack, int level, DynamicRegistryManager dynamicRegistryManager, Optional<? extends RegistryEntryList<Enchantment>> enchantments) private static void
EnchantmentHelper.forEachEnchantment
(ItemStack stack, EnchantmentHelper.Consumer consumer) private static void
EnchantmentHelper.forEachEnchantment
(ItemStack stack, EquipmentSlot slot, LivingEntity entity, EnchantmentHelper.ContextAwareConsumer contextAwareConsumer) static List
<EnchantmentLevelEntry> EnchantmentHelper.generateEnchantments
(Random random, ItemStack stack, int level, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Generate the enchantments for enchanting thestack
.static int
EnchantmentHelper.getAmmoUse
(ServerWorld world, ItemStack rangedWeaponStack, ItemStack projectileStack, int baseAmmoUse) static float
EnchantmentHelper.getArmorEffectiveness
(ServerWorld world, ItemStack stack, Entity user, DamageSource damageSource, float baseArmorEffectiveness) static int
EnchantmentHelper.getBlockExperience
(ServerWorld world, ItemStack stack, int baseBlockExperience) static float
EnchantmentHelper.getCrossbowChargeTime
(ItemStack stack, LivingEntity user, float baseCrossbowChargeTime) static float
EnchantmentHelper.getDamage
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseDamage) static <T> Optional
<T> EnchantmentHelper.getEffect
(ItemStack stack, ComponentType<List<T>> componentType) static ItemEnchantmentsComponent
EnchantmentHelper.getEnchantments
(ItemStack stack) private static ComponentType
<ItemEnchantmentsComponent> EnchantmentHelper.getEnchantmentsComponentType
(ItemStack stack) static int
EnchantmentHelper.getFishingLuckBonus
(ServerWorld world, ItemStack stack, Entity user) static float
EnchantmentHelper.getFishingTimeReduction
(ServerWorld world, ItemStack stack, Entity user) EnchantmentHelper.getHighestLevelEffect
(ItemStack stack, ComponentType<T> componentType) static int
EnchantmentHelper.getItemDamage
(ServerWorld world, ItemStack stack, int baseItemDamage) static int
EnchantmentHelper.getLevel
(RegistryEntry<Enchantment> enchantment, ItemStack stack) Gets the level of an enchantment on an item stack.static List
<EnchantmentLevelEntry> EnchantmentHelper.getPossibleEntries
(int level, ItemStack stack, Stream<RegistryEntry<Enchantment>> possibleEnchantments) Gets all the possible entries for enchanting thestack
at the givenpower
.static int
EnchantmentHelper.getProjectileCount
(ServerWorld world, ItemStack stack, Entity user, int baseProjectileCount) static int
EnchantmentHelper.getProjectilePiercing
(ServerWorld world, ItemStack weaponStack, ItemStack projectileStack) static float
EnchantmentHelper.getProjectileSpread
(ServerWorld world, ItemStack stack, Entity user, float baseProjectileSpread) static int
EnchantmentHelper.getRepairWithXp
(ServerWorld world, ItemStack stack, int baseRepairWithXp) static float
EnchantmentHelper.getSmashDamagePerFallenBlock
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseSmashDamagePerFallenBlock) static int
EnchantmentHelper.getTridentReturnAcceleration
(ServerWorld world, ItemStack stack, Entity user) static float
EnchantmentHelper.getTridentSpinAttackStrength
(ItemStack stack, LivingEntity user) static boolean
EnchantmentHelper.hasAnyEnchantmentsIn
(ItemStack stack, TagKey<Enchantment> tag) static boolean
EnchantmentHelper.hasAnyEnchantmentsWith
(ItemStack stack, ComponentType<?> componentType) static boolean
EnchantmentHelper.hasEnchantments
(ItemStack stack) boolean
Enchantment.isAcceptableItem
(ItemStack stack) boolean
Enchantment.isPrimaryItem
(ItemStack stack) boolean
Enchantment.isSupportedItem
(ItemStack stack) void
Enchantment.modifyAmmoUse
(ServerWorld world, int level, ItemStack projectileStack, MutableFloat ammoUse) void
Enchantment.modifyArmorEffectiveness
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat armorEffectiveness) void
Enchantment.modifyBlockExperience
(ServerWorld world, int level, ItemStack stack, MutableFloat blockExperience) void
Enchantment.modifyDamage
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damage) void
Enchantment.modifyDamageProtection
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damageProtection) void
Enchantment.modifyFishingLuckBonus
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat fishingLuckBonus) void
Enchantment.modifyFishingTimeReduction
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat fishingTimeReduction) void
Enchantment.modifyItemDamage
(ServerWorld world, int level, ItemStack stack, MutableFloat itemDamage) void
Enchantment.modifyKnockback
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat knockback) static float
EnchantmentHelper.modifyKnockback
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseKnockback) void
Enchantment.modifyMobExperience
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat mobExperience) void
Enchantment.modifyProjectileCount
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat projectileCount) void
Enchantment.modifyProjectilePiercing
(ServerWorld world, int level, ItemStack stack, MutableFloat projectilePiercing) void
Enchantment.modifyProjectileSpread
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat projectileSpread) void
Enchantment.modifyRepairWithXp
(ServerWorld world, int level, ItemStack stack, MutableFloat repairWithXp) void
Enchantment.modifySmashDamagePerFallenBlock
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat smashDamagePerFallenBlock) void
Enchantment.modifyTridentReturnAcceleration
(ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat tridentReturnAcceleration) private void
Enchantment.modifyValue
(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat value) private void
Enchantment.modifyValue
(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, Entity user, MutableFloat value) private void
Enchantment.modifyValue
(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, MutableFloat value) static void
EnchantmentHelper.onHitBlock
(ServerWorld world, ItemStack stack, @Nullable LivingEntity user, Entity enchantedEntity, @Nullable EquipmentSlot slot, Vec3d pos, BlockState state, Consumer<Item> onBreak) static void
EnchantmentHelper.onProjectileSpawned
(ServerWorld world, ItemStack weaponStack, ProjectileEntity projectile, Consumer<Item> onBreak) static void
EnchantmentHelper.onTargetDamaged
(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon) static void
EnchantmentHelper.onTargetDamaged
(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon, Consumer<Item> breakCallback) static void
EnchantmentHelper.removeLocationBasedEffects
(ItemStack stack, LivingEntity user, EquipmentSlot slot) static void
EnchantmentHelper.set
(ItemStack stack, ItemEnchantmentsComponent enchantments) Modifier and TypeMethodDescriptionstatic Optional
<EnchantmentEffectContext> EnchantmentHelper.chooseEquipmentWith
(ComponentType<?> componentType, LivingEntity entity, Predicate<ItemStack> stackPredicate) Returns a pair of an equipment slot and the item stack in the supplied entity's slot.ModifierConstructorDescriptionEnchantmentEffectContext
(ItemStack itemStack, @Nullable EquipmentSlot equipmentSlot, @Nullable LivingEntity livingEntity, Consumer<Item> consumer) EnchantmentEffectContext
(ItemStack stack, EquipmentSlot slot, LivingEntity owner) -
Uses of ItemStack in net.minecraft.enchantment.provider
Modifier and TypeMethodDescriptionvoid
ByCostEnchantmentProvider.provideEnchantments
(ItemStack stack, ItemEnchantmentsComponent.Builder componentBuilder, Random random, LocalDifficulty localDifficulty) void
ByCostWithDifficultyEnchantmentProvider.provideEnchantments
(ItemStack stack, ItemEnchantmentsComponent.Builder componentBuilder, Random random, LocalDifficulty localDifficulty) void
EnchantmentProvider.provideEnchantments
(ItemStack stack, ItemEnchantmentsComponent.Builder componentBuilder, Random random, LocalDifficulty localDifficulty) void
SingleEnchantmentProvider.provideEnchantments
(ItemStack stack, ItemEnchantmentsComponent.Builder componentBuilder, Random random, LocalDifficulty localDifficulty) -
Uses of ItemStack in net.minecraft.entity
Modifier and TypeFieldDescriptionprotected ItemStack
LivingEntity.activeItemStack
LivingEntity.riptideStack
private ItemStack
LivingEntity.syncedBodyArmorStack
Modifier and TypeFieldDescriptionprivate static final TrackedData
<ItemStack> EyeOfEnderEntity.ITEM
private static final TrackedData
<ItemStack> OminousItemSpawnerEntity.ITEM
private static final TrackedData
<ItemStack> ItemEntity.STACK
private final DefaultedList
<ItemStack> LivingEntity.syncedArmorStacks
private final DefaultedList
<ItemStack> LivingEntity.syncedHandStacks
Modifier and TypeMethodDescriptionLivingEntity.getActiveItem()
LivingEntity.getBlockingItem()
Returns the item stack currently being used for blocking, such as shields.Bucketable.getBucketItem()
EquipmentHolder.getEquippedStack
(EquipmentSlot slot) abstract ItemStack
LivingEntity.getEquippedStack
(EquipmentSlot slot) private ItemStack
EyeOfEnderEntity.getItem()
OminousItemSpawnerEntity.getItem()
LivingEntity.getMainHandStack()
LivingEntity.getOffHandStack()
Entity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.LivingEntity.getProjectileType
(ItemStack stack) EyeOfEnderEntity.getStack()
FlyingItemEntity.getStack()
ItemEntity.getStack()
Returns the item stack contained in this item entity.LivingEntity.getStackInArm
(Arm arm) LivingEntity.getStackInHand
(Hand hand) private ItemStack
LivingEntity.getSyncedArmorStack
(EquipmentSlot slot) private ItemStack
LivingEntity.getSyncedHandStack
(EquipmentSlot slot) Entity.getWeaponStack()
LivingEntity.getWeaponStack()
static ItemStack
Modifier and TypeMethodDescriptionLivingEntity.getAllArmorItems()
LivingEntity.getArmorItems()
private @Nullable Map
<EquipmentSlot, ItemStack> LivingEntity.getEquipmentChanges()
Returns the difference between the last sent equipment set and the current one.LivingEntity.getEquippedItems()
LivingEntity.getHandItems()
Modifier and TypeMethodDescriptionboolean
LivingEntity.areItemsDifferent
(ItemStack stack, ItemStack stack2) final boolean
LivingEntity.canEquip
(ItemStack stack, EquipmentSlot slot) final boolean
LivingEntity.canEquipFromDispenser
(ItemStack stack) static boolean
LivingEntity.canGlideWith
(ItemStack stack, EquipmentSlot slot) static boolean
EntityType.copier
(World world, ItemStack stack, @Nullable PlayerEntity player) static void
Bucketable.copyDataToStack
(MobEntity entity, ItemStack stack) Deprecated.void
Bucketable.copyDataToStack
(ItemStack stack) static OminousItemSpawnerEntity
EntityType.customNameCopier
(Consumer<T> chained, ItemStack stack) Entity.dropStack
(ServerWorld world, ItemStack stack) Dropsstack
at the entity's position.Entity.dropStack
(ServerWorld world, ItemStack stack, float yOffset) Dropsstack
at the entity's position with the given Y offset.void
EquipmentHolder.equipStack
(EquipmentSlot slot, ItemStack stack) abstract void
LivingEntity.equipStack
(EquipmentSlot slot, ItemStack stack) protected void
LivingEntity.forEachShearedItem
(ServerWorld world, RegistryKey<LootTable> lootTableKey, ItemStack tool, BiConsumer<ServerWorld, ItemStack> lootConsumer) final EquipmentSlot
LivingEntity.getPreferredEquipmentSlot
(ItemStack stack) LivingEntity.getProjectileType
(ItemStack stack) default @Nullable EquipmentSlot
EquipmentHolder.getSlotForStack
(ItemStack stack, List<EquipmentSlot> slotBlacklist) void
LivingEntity.giveOrDropStack
(ItemStack stack) private static void
ItemEntity.merge
(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) private static void
ItemEntity.merge
(ItemEntity targetEntity, ItemStack stack1, ItemStack stack2) static ItemStack
EntityType.nbtCopier
(Consumer<T> chained, World world, ItemStack stack, @Nullable PlayerEntity player) private void
LivingEntity.onEquipmentRemoved
(ItemStack removedEquipment, EquipmentSlot slot, AttributeContainer container) void
LivingEntity.onEquipStack
(EquipmentSlot slot, ItemStack oldStack, ItemStack newStack) private void
LivingEntity.playEquipmentBreakEffects
(ItemStack stack) protected void
LivingEntity.processEquippedStack
(ItemStack stack) void
Saddleable.saddle
(ItemStack stack, @Nullable SoundCategory soundCategory) void
private void
void
Sets the item stack contained in this item entity tostack
.void
LivingEntity.setStackInHand
(Hand hand, ItemStack stack) private void
LivingEntity.setSyncedArmorStack
(EquipmentSlot slot, ItemStack armor) private void
LivingEntity.setSyncedHandStack
(EquipmentSlot slot, ItemStack stack) void
Shearable.sheared
(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears) EntityType.spawnFromItemStack
(ServerWorld world, @Nullable ItemStack stack, @Nullable PlayerEntity player, BlockPos pos, SpawnReason spawnReason, boolean alignPosition, boolean invertY) void
LivingEntity.spawnItemParticles
(ItemStack stack, int count) private Entity
OminousItemSpawnerEntity.spawnProjectile
(ServerWorld world, ProjectileItem item, ItemStack stack) protected void
LivingEntity.tickItemStackUsage
(ItemStack stack) Modifier and TypeMethodDescriptionprivate void
LivingEntity.checkHandStackSwap
(Map<EquipmentSlot, ItemStack> equipmentChanges) Notifies nearby players if the stacks in the hands have been swapped.protected boolean
LivingEntity.forEachGeneratedItem
(ServerWorld world, RegistryKey<LootTable> lootTableKey, Function<LootWorldContext.Builder, LootWorldContext> lootContextParametersFactory, BiConsumer<ServerWorld, ItemStack> lootConsumer) boolean
LivingEntity.forEachGiftedItem
(ServerWorld world, RegistryKey<LootTable> lootTableKey, BiConsumer<ServerWorld, ItemStack> lootConsumer) protected void
LivingEntity.forEachShearedItem
(ServerWorld world, RegistryKey<LootTable> lootTableKey, ItemStack tool, BiConsumer<ServerWorld, ItemStack> lootConsumer) boolean
Checks if this entity is holding a certain item.private void
LivingEntity.sendEquipmentChanges
(Map<EquipmentSlot, ItemStack> equipmentChanges) Sends equipment changes to nearby players.ModifierConstructorDescriptionItemEntity
(World world, double x, double y, double z, ItemStack stack) ItemEntity
(World world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) -
Uses of ItemStack in net.minecraft.entity.ai.brain.sensor
-
Uses of ItemStack in net.minecraft.entity.ai.brain.task
Modifier and TypeMethodDescriptionprivate ItemStack
CelebrateRaidWinTask.createFirework
(DyeColor color, int flight) Modifier and TypeMethodDescriptionstatic void
TargetUtil.give
(LivingEntity entity, ItemStack stack, Vec3d targetLocation) static void
TargetUtil.give
(LivingEntity entity, ItemStack stack, Vec3d targetLocation, Vec3d velocityFactor, float yOffset) private static void
HoldTradeOffersTask.holdOffer
(VillagerEntity villager, ItemStack stack) static void
GiveInventoryToLookTargetTask.playThrowSound
(LivingEntity entity, ItemStack stack, Vec3d target) private void
GiveInventoryToLookTargetTask.triggerCriterion
(LookTarget target, ItemStack stack, ServerPlayerEntity player) -
Uses of ItemStack in net.minecraft.entity.ai.goal
ModifierConstructorDescriptionHoldInHandsGoal
(T actor, ItemStack item, @Nullable SoundEvent sound, Predicate<? super T> condition) ModifierConstructorDescriptionTemptGoal
(PathAwareEntity entity, double speed, Predicate<ItemStack> foodPredicate, boolean canBeScared) -
Uses of ItemStack in net.minecraft.entity.boss.dragon
Modifier and TypeMethodDescriptionEnderDragonPart.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none. -
Uses of ItemStack in net.minecraft.entity.damage
-
Uses of ItemStack in net.minecraft.entity.data
Modifier and TypeFieldDescriptionstatic final TrackedDataHandler
<ItemStack> TrackedDataHandlerRegistry.ITEM_STACK
-
Uses of ItemStack in net.minecraft.entity.decoration
Modifier and TypeFieldDescriptionprivate final ItemStack
DisplayEntity.ItemDisplayEntity.Data.itemStack
The field for theitemStack
record component.Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> ArmorStandEntity.armorItems
private final DefaultedList
<ItemStack> ArmorStandEntity.heldItems
private static final TrackedData
<ItemStack> DisplayEntity.ItemDisplayEntity.ITEM
private static final TrackedData
<ItemStack> ItemFrameEntity.ITEM_STACK
Modifier and TypeMethodDescriptionprotected ItemStack
GlowItemFrameEntity.getAsItemStack()
protected ItemStack
ItemFrameEntity.getAsItemStack()
ArmorStandEntity.getEquippedStack
(EquipmentSlot slot) ItemFrameEntity.getHeldItemStack()
private ItemStack
DisplayEntity.ItemDisplayEntity.getItemStack()
ArmorStandEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.EndCrystalEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.ItemFrameEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.LeashKnotEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.DisplayEntity.ItemDisplayEntity.Data.itemStack()
Returns the value of theitemStack
record component.Modifier and TypeMethodDescriptionArmorStandEntity.getArmorItems()
ArmorStandEntity.getHandItems()
Modifier and TypeMethodDescriptionAbstractDecorationEntity.dropStack
(ServerWorld world, ItemStack stack, float yOffset) Dropsstack
at the entity's position with the given Y offset.private boolean
ArmorStandEntity.equip
(PlayerEntity player, EquipmentSlot slot, ItemStack stack, Hand hand) void
ArmorStandEntity.equipStack
(EquipmentSlot slot, ItemStack stack) private void
ItemFrameEntity.removeFromFrame
(ItemStack stack) private void
ItemFrameEntity.setAsStackHolder
(ItemStack stack) void
ItemFrameEntity.setHeldItemStack
(ItemStack stack) void
ItemFrameEntity.setHeldItemStack
(ItemStack value, boolean update) private void
DisplayEntity.ItemDisplayEntity.setItemStack
(ItemStack stack) ModifierConstructorDescriptionData
(ItemStack itemStack, ModelTransformationMode modelTransformationMode) -
Uses of ItemStack in net.minecraft.entity.decoration.painting
Modifier and TypeMethodDescriptionPaintingEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none. -
Uses of ItemStack in net.minecraft.entity.mob
Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> MobEntity.armorItems
private final DefaultedList
<ItemStack> MobEntity.handItems
Modifier and TypeMethodDescriptionprotected ItemStack
MobEntity.getBodyArmor()
MobEntity.getEquippedStack
(EquipmentSlot slot) private static ItemStack
PiglinBrain.getItemFromStack
(ItemEntity stack) MobEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.HostileEntity.getProjectileType
(ItemStack stack) protected ItemStack
DrownedEntity.getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.protected ItemStack
HuskEntity.getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.protected ItemStack
ZombieEntity.getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.protected ItemStack
ZombieVillagerEntity.getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.protected ItemStack
ZombifiedPiglinEntity.getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.private ItemStack
PiglinEntity.makeInitialWeapon()
MobEntity.tryEquip
(ServerWorld world, ItemStack stack) Modifier and TypeMethodDescriptionMobEntity.getAllArmorItems()
MobEntity.getArmorItems()
PiglinBrain.getBarteredItem
(PiglinEntity piglin) MobEntity.getHandItems()
Modifier and TypeMethodDescriptionprivate static boolean
PiglinBrain.acceptsForBarter
(ItemStack stack) protected ItemStack
private static void
PiglinBrain.barterItem
(PiglinEntity piglin, ItemStack stack) protected boolean
PiglinEntity.canEquipStack
(ItemStack stack) Returns whether this piglin can equip into or replace current equipment slot.boolean
MobEntity.canGather
(ServerWorld world, ItemStack stack) protected static boolean
PiglinBrain.canGather
(PiglinEntity piglin, ItemStack stack) boolean
PiglinBruteEntity.canGather
(ServerWorld world, ItemStack stack) boolean
PiglinEntity.canGather
(ServerWorld world, ItemStack stack) boolean
ZombieEntity.canGather
(ServerWorld world, ItemStack stack) boolean
ZombifiedPiglinEntity.canGather
(ServerWorld world, ItemStack stack) protected boolean
PiglinEntity.canInsertIntoInventory
(ItemStack stack) boolean
MobEntity.canPickupItem
(ItemStack stack) boolean
ZombieEntity.canPickupItem
(ItemStack stack) protected PersistentProjectileEntity
AbstractSkeletonEntity.createArrowProjectile
(ItemStack arrow, float damageModifier, @Nullable ItemStack shotFrom) protected PersistentProjectileEntity
BoggedEntity.createArrowProjectile
(ItemStack arrow, float damageModifier, @Nullable ItemStack shotFrom) protected PersistentProjectileEntity
StrayEntity.createArrowProjectile
(ItemStack arrow, float damageModifier, @Nullable ItemStack shotFrom) protected PersistentProjectileEntity
WitherSkeletonEntity.createArrowProjectile
(ItemStack arrow, float damageModifier, @Nullable ItemStack shotFrom) private void
BoggedEntity.dropShearedItems
(ServerWorld world, ItemStack shears) private void
PiglinEntity.equipAtChance
(EquipmentSlot slot, ItemStack stack, Random random) void
MobEntity.equipBodyArmor
(ItemStack stack) protected void
MobEntity.equipLootStack
(EquipmentSlot slot, ItemStack stack) void
AbstractSkeletonEntity.equipStack
(EquipmentSlot slot, ItemStack stack) void
MobEntity.equipStack
(EquipmentSlot slot, ItemStack stack) protected void
PiglinEntity.equipToMainHand
(ItemStack stack) protected void
PiglinEntity.equipToOffHand
(ItemStack stack) private double
MobEntity.getAttributeValueWithStack
(ItemStack stack, RegistryEntry<EntityAttribute> attribute, EquipmentSlot slot) HostileEntity.getProjectileType
(ItemStack stack) private static boolean
MobEntity.hasComponentsOtherThanDamage
(ItemStack stack) boolean
HoglinEntity.isBreedingItem
(ItemStack stack) private static boolean
protected static boolean
PiglinBrain.isGoldenItem
(ItemStack stack) private boolean
PillagerEntity.isRaidCaptain
(ItemStack stack) protected static boolean
PiglinBrain.isWillingToTrade
(PiglinEntity piglin, ItemStack nearbyItems) boolean
MobEntity.prefersNewDamageableItem
(ItemStack newStack, ItemStack oldStack) protected boolean
DrownedEntity.prefersNewEquipment
(ItemStack newStack, ItemStack oldStack, EquipmentSlot slot) protected boolean
MobEntity.prefersNewEquipment
(ItemStack newStack, ItemStack oldStack, EquipmentSlot slot) protected boolean
PiglinEntity.prefersNewEquipment
(ItemStack newStack, ItemStack oldStack, EquipmentSlot slot) void
BoggedEntity.sheared
(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears) private static void
PiglinBrain.swapItemWithOffHand
(ServerWorld world, PiglinEntity piglin, ItemStack stack) MobEntity.tryEquip
(ServerWorld world, ItemStack stack) Modifier and TypeMethodDescriptionprivate static void
PiglinBrain.doBarter
(PiglinEntity piglin, List<ItemStack> items) private static void
PiglinBrain.drop
(PiglinEntity piglin, List<ItemStack> items, Vec3d pos) private static void
PiglinBrain.dropBarteredItem
(PiglinEntity piglin, List<ItemStack> items) private static void
PiglinBrain.dropBarteredItem
(PiglinEntity piglin, PlayerEntity player, List<ItemStack> items) MobEntity.dropEquipment
(ServerWorld world, Predicate<ItemStack> dropPredicate) -
Uses of ItemStack in net.minecraft.entity.passive
Modifier and TypeMethodDescriptionAxolotlEntity.getBucketItem()
CodEntity.getBucketItem()
PufferfishEntity.getBucketItem()
SalmonEntity.getBucketItem()
TadpoleEntity.getBucketItem()
TropicalFishEntity.getBucketItem()
GoatEntity.getGoatHornStack()
Modifier and TypeMethodDescriptionArmadilloBrain.getTemptItemPredicate()
AxolotlBrain.getTemptItemPredicate()
CamelBrain.getTemptItemPredicate()
FrogBrain.getTemptItemPredicate()
GoatBrain.getTemptItemPredicate()
SnifferBrain.getTemptItemPredicate()
Modifier and TypeMethodDescriptionprivate void
AbstractDonkeyEntity.addChest
(PlayerEntity player, ItemStack chest) private boolean
AllayEntity.areDifferentPotions
(ItemStack stack, ItemStack stack2) boolean
AllayEntity.areItemsDifferent
(ItemStack stack, ItemStack stack2) private boolean
AllayEntity.areItemsEqual
(ItemStack stack, ItemStack stack2) private boolean
boolean
AllayEntity.canGather
(ServerWorld world, ItemStack stack) boolean
VillagerEntity.canGather
(ServerWorld world, ItemStack stack) boolean
FoxEntity.canPickupItem
(ItemStack stack) void
AxolotlEntity.copyDataToStack
(ItemStack stack) void
FishEntity.copyDataToStack
(ItemStack stack) void
SalmonEntity.copyDataToStack
(ItemStack stack) void
TadpoleEntity.copyDataToStack
(ItemStack stack) void
TropicalFishEntity.copyDataToStack
(ItemStack stack) private void
TadpoleEntity.decrementItem
(PlayerEntity player, ItemStack stack) private void
AllayEntity.decrementStackUnlessInCreative
(PlayerEntity player, ItemStack stack) private void
protected void
AnimalEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) protected void
AxolotlEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) private void
TadpoleEntity.eatSlimeBall
(PlayerEntity player, ItemStack stack) void
AbstractHorseEntity.equipHorseArmor
(PlayerEntity player, ItemStack stack) WanderingTraderEntity.getConsumeSound
(ItemStack stack) Cracks.getCrackLevel
(ItemStack stack) private Optional
<SuspiciousStewEffectsComponent> MooshroomEntity.getStewEffectFrom
(ItemStack flower) AbstractHorseEntity.interactHorse
(PlayerEntity player, ItemStack stack) boolean
AbstractHorseEntity.isBreedingItem
(ItemStack stack) abstract boolean
AnimalEntity.isBreedingItem
(ItemStack stack) boolean
ArmadilloEntity.isBreedingItem
(ItemStack stack) boolean
AxolotlEntity.isBreedingItem
(ItemStack stack) boolean
BeeEntity.isBreedingItem
(ItemStack stack) boolean
CamelEntity.isBreedingItem
(ItemStack stack) boolean
CatEntity.isBreedingItem
(ItemStack stack) boolean
ChickenEntity.isBreedingItem
(ItemStack stack) boolean
CowEntity.isBreedingItem
(ItemStack stack) boolean
FoxEntity.isBreedingItem
(ItemStack stack) boolean
FrogEntity.isBreedingItem
(ItemStack stack) boolean
GoatEntity.isBreedingItem
(ItemStack stack) boolean
LlamaEntity.isBreedingItem
(ItemStack stack) boolean
OcelotEntity.isBreedingItem
(ItemStack stack) boolean
PandaEntity.isBreedingItem
(ItemStack stack) boolean
ParrotEntity.isBreedingItem
(ItemStack stack) boolean
PigEntity.isBreedingItem
(ItemStack stack) boolean
PolarBearEntity.isBreedingItem
(ItemStack stack) boolean
RabbitEntity.isBreedingItem
(ItemStack stack) boolean
SheepEntity.isBreedingItem
(ItemStack stack) boolean
SnifferEntity.isBreedingItem
(ItemStack stack) boolean
StriderEntity.isBreedingItem
(ItemStack stack) boolean
TurtleEntity.isBreedingItem
(ItemStack stack) boolean
WolfEntity.isBreedingItem
(ItemStack stack) private boolean
TadpoleEntity.isFrogFood
(ItemStack stack) void
MerchantEntity.onSellingItem
(ItemStack stack) protected boolean
AbstractHorseEntity.receiveFood
(PlayerEntity player, ItemStack item) protected boolean
CamelEntity.receiveFood
(PlayerEntity player, ItemStack item) protected boolean
LlamaEntity.receiveFood
(PlayerEntity player, ItemStack item) void
AbstractHorseEntity.saddle
(ItemStack stack, @Nullable SoundCategory soundCategory) void
PigEntity.saddle
(ItemStack stack, @Nullable SoundCategory soundCategory) void
StriderEntity.saddle
(ItemStack stack, @Nullable SoundCategory soundCategory) void
MooshroomEntity.sheared
(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears) void
SheepEntity.sheared
(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears) void
SnowGolemEntity.sheared
(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears) private void
private void
DolphinEntity.PlayWithItemsGoal.spitOutItem
(ItemStack stack) ModifierConstructorDescriptionOcelotTemptGoal
(OcelotEntity ocelot, double speed, Predicate<ItemStack> foodPredicate, boolean canBeScared) -
Uses of ItemStack in net.minecraft.entity.player
Modifier and TypeFieldDescriptionfinal DefaultedList
<ItemStack> PlayerInventory.armor
private final List
<DefaultedList<ItemStack>> PlayerInventory.combinedInventory
final DefaultedList
<ItemStack> PlayerInventory.main
final DefaultedList
<ItemStack> PlayerInventory.offHand
Modifier and TypeMethodDescriptionPlayerInventory.dropSelectedItem
(boolean entireStack) PlayerInventory.getArmorStack
(int slot) PlayerEntity.getEquippedStack
(EquipmentSlot slot) PlayerInventory.getMainHandStack()
PlayerEntity.getProjectileType
(ItemStack stack) PlayerInventory.getStack
(int slot) Returns the stack currently stored atslot
.PlayerEntity.getWeaponStack()
PlayerInventory.removeStack
(int slot) Removes the stack currently stored atslot
.PlayerInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.Modifier and TypeMethodDescriptionvoid
PlayerInventory.addPickBlock
(ItemStack stack) private int
private int
void
PlayerEntity.applyEnchantmentCosts
(ItemStack enchantedItem, int experienceLevels) boolean
PlayerEntity.canPlaceOn
(BlockPos pos, Direction facing, ItemStack stack) private boolean
PlayerInventory.canStackAddMore
(ItemStack existingStack, ItemStack stack) boolean
void
PlayerEntity.disableShield
(ItemStack shield) void
PlayerEntity.dropCreativeStack
(ItemStack stack) void
PlayerEntity.equipStack
(EquipmentSlot slot, ItemStack stack) float
ItemCooldownManager.getCooldownProgress
(ItemStack stack, float tickDelta) int
PlayerInventory.getOccupiedSlotWithRoomForStack
(ItemStack stack) PlayerEntity.getProjectileType
(ItemStack stack) int
PlayerInventory.getSlotWithStack
(ItemStack stack) boolean
PlayerEntity.giveItemStack
(ItemStack stack) boolean
PlayerInventory.insertStack
(int slot, ItemStack stack) boolean
PlayerInventory.insertStack
(ItemStack stack) boolean
ItemCooldownManager.isCoolingDown
(ItemStack stack) void
void
PlayerInventory.offerOrDrop
(ItemStack stack) void
PlayerEntity.onPickupSlotClick
(ItemStack cursorStack, ItemStack slotStack, ClickType clickType) Called when a player performs apickup slot action
in a screen handler.void
void
void
Sets the stack stored atslot
tostack
.static boolean
PlayerInventory.usableWhenFillingSlot
(ItemStack stack) void
Called when the player uses (defaults to right click) a writable or written book item.void
PlayerEntity.useRiptide
(int riptideTicks, float riptideAttackDamage, ItemStack stack) -
Uses of ItemStack in net.minecraft.entity.projectile
Modifier and TypeFieldDescriptionprivate ItemStack
PersistentProjectileEntity.stack
PersistentProjectileEntity.weapon
Modifier and TypeFieldDescriptionprivate static final TrackedData
<ItemStack> AbstractFireballEntity.ITEM
private static final TrackedData
<ItemStack> FireworkRocketEntity.ITEM
Modifier and TypeMethodDescriptionprotected ItemStack
PersistentProjectileEntity.asItemStack()
protected ItemStack
ArrowEntity.getDefaultItemStack()
protected abstract ItemStack
PersistentProjectileEntity.getDefaultItemStack()
protected ItemStack
SpectralArrowEntity.getDefaultItemStack()
protected ItemStack
TridentEntity.getDefaultItemStack()
private static ItemStack
FireworkRocketEntity.getDefaultStack()
private ItemStack
AbstractFireballEntity.getItem()
PersistentProjectileEntity.getItemStack()
Returns the read-only item stack representing the projectile.AbstractFireballEntity.getStack()
AbstractWindChargeEntity.getStack()
FireworkRocketEntity.getStack()
PersistentProjectileEntity.getWeaponStack()
TridentEntity.getWeaponStack()
Modifier and TypeMethodDescriptionProjectileEntity.ProjectileCreator.create
(ServerWorld world, LivingEntity shooter, ItemStack stack) static PersistentProjectileEntity
ProjectileUtil.createArrowProjectile
(LivingEntity entity, ItemStack stack, float damageModifier, @Nullable ItemStack bow) private byte
TridentEntity.getLoyalty
(ItemStack stack) protected void
PersistentProjectileEntity.onBlockHitEnchantmentEffects
(ServerWorld world, BlockHitResult blockHitResult, ItemStack weaponStack) protected void
TridentEntity.onBlockHitEnchantmentEffects
(ServerWorld world, BlockHitResult blockHitResult, ItemStack weaponStack) void
protected void
protected void
static <T extends ProjectileEntity>
TProjectileEntity.spawn
(T projectile, ServerWorld world, ItemStack projectileStack) static <T extends ProjectileEntity>
TProjectileEntity.spawn
(T projectile, ServerWorld world, ItemStack projectileStack, Consumer<T> beforeSpawn) static <T extends ProjectileEntity>
TProjectileEntity.spawnWithVelocity
(ProjectileEntity.ProjectileCreator<T> creator, ServerWorld world, ItemStack projectileStack, LivingEntity shooter, double velocityX, double velocityY, double velocityZ, float power, float divergence) static <T extends ProjectileEntity>
TProjectileEntity.spawnWithVelocity
(ProjectileEntity.ProjectileCreator<T> creator, ServerWorld world, ItemStack projectileStack, LivingEntity shooter, float roll, float power, float divergence) static <T extends ProjectileEntity>
TProjectileEntity.spawnWithVelocity
(T projectile, ServerWorld world, ItemStack projectileStack, double velocityX, double velocityY, double velocityZ, float power, float divergence) void
ProjectileEntity.triggerProjectileSpawned
(ServerWorld world, ItemStack projectileStack) int
ModifierConstructorDescriptionArrowEntity
(World world, double x, double y, double z, ItemStack stack, @Nullable ItemStack shotFrom) ArrowEntity
(World world, LivingEntity owner, ItemStack stack, @Nullable ItemStack shotFrom) FireworkRocketEntity
(World world, double x, double y, double z, ItemStack stack) FireworkRocketEntity
(World world, @Nullable Entity entity, double x, double y, double z, ItemStack stack) FireworkRocketEntity
(World world, ItemStack stack, double x, double y, double z, boolean shotAtAngle) FireworkRocketEntity
(World world, ItemStack stack, Entity entity, double x, double y, double z, boolean shotAtAngle) FireworkRocketEntity
(World world, ItemStack stack, LivingEntity shooter) FishingBobberEntity
(PlayerEntity thrower, World world, int luckBonus, int waitTimeReductionTicks, ItemStack stack) protected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, double x, double y, double z, World world, ItemStack stack, @Nullable ItemStack weapon) protected
PersistentProjectileEntity
(EntityType<? extends PersistentProjectileEntity> type, LivingEntity owner, World world, ItemStack stack, @Nullable ItemStack shotFrom) SpectralArrowEntity
(World world, double x, double y, double z, ItemStack stack, @Nullable ItemStack shotFrom) SpectralArrowEntity
(World world, LivingEntity owner, ItemStack stack, @Nullable ItemStack shotFrom) TridentEntity
(World world, double x, double y, double z, ItemStack stack) TridentEntity
(World world, LivingEntity owner, ItemStack stack) -
Uses of ItemStack in net.minecraft.entity.projectile.thrown
Modifier and TypeFieldDescriptionprivate static final TrackedData
<ItemStack> ThrownItemEntity.ITEM
ModifierConstructorDescriptionEggEntity
(World world, LivingEntity owner, ItemStack stack) EnderPearlEntity
(World world, LivingEntity owner, ItemStack stack) ExperienceBottleEntity
(World world, double x, double y, double z, ItemStack stack) ExperienceBottleEntity
(World world, LivingEntity owner, ItemStack stack) PotionEntity
(World world, double x, double y, double z, ItemStack stack) PotionEntity
(World world, LivingEntity owner, ItemStack stack) SnowballEntity
(World world, double x, double y, double z, ItemStack stack) SnowballEntity
(World world, LivingEntity owner, ItemStack stack) ThrownItemEntity
(EntityType<? extends ThrownItemEntity> type, double x, double y, double z, World world, ItemStack stack) ThrownItemEntity
(EntityType<? extends ThrownItemEntity> type, LivingEntity owner, World world, ItemStack stack) -
Uses of ItemStack in net.minecraft.entity.vehicle
Modifier and TypeFieldDescriptionprivate DefaultedList
<ItemStack> AbstractChestBoatEntity.inventory
private DefaultedList
<ItemStack> StorageMinecartEntity.inventory
Modifier and TypeMethodDescriptiondefault ItemStack
VehicleInventory.getInventoryStack
(int slot) final ItemStack
AbstractBoatEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.abstract ItemStack
AbstractMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.ChestMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.CommandBlockMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.FurnaceMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.HopperMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.MinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.SpawnerMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.TntMinecartEntity.getPickBlockStack()
Returns the stack for creative "pick block" functionality, ornull
if there is none.AbstractChestBoatEntity.getStack
(int slot) Returns the stack currently stored atslot
.StorageMinecartEntity.getStack
(int slot) Returns the stack currently stored atslot
.default ItemStack
VehicleInventory.removeInventoryStack
(int slot) default ItemStack
VehicleInventory.removeInventoryStack
(int slot, int amount) AbstractChestBoatEntity.removeStack
(int slot) Removes the stack currently stored atslot
.AbstractChestBoatEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.StorageMinecartEntity.removeStack
(int slot) Removes the stack currently stored atslot
.StorageMinecartEntity.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.Modifier and TypeMethodDescriptionAbstractChestBoatEntity.getInventory()
StorageMinecartEntity.getInventory()
VehicleInventory.getInventory()
Modifier and TypeMethodDescriptionstatic <T extends AbstractMinecartEntity>
TAbstractMinecartEntity.create
(World world, double x, double y, double z, EntityType<T> type, SpawnReason reason, ItemStack stack, @Nullable PlayerEntity player) default void
VehicleInventory.setInventoryStack
(int slot, ItemStack stack) void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
. -
Uses of ItemStack in net.minecraft.inventory
Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> SimpleInventory.heldStacks
private final DefaultedList
<ItemStack> CraftingInventory.stacks
private final DefaultedList
<ItemStack> CraftingResultInventory.stacks
Modifier and TypeMethodDescriptionAddsstack
to this inventory as much as possible.default ItemStack
SingleStackInventory.decreaseStack
(int count) default ItemStack
SingleStackInventory.emptyStack()
StackReference.get()
Gets the current item stack.CraftingInventory.getStack
(int slot) Returns the stack currently stored atslot
.CraftingResultInventory.getStack
(int slot) Returns the stack currently stored atslot
.DoubleInventory.getStack
(int slot) Returns the stack currently stored atslot
.Inventory.getStack
(int slot) Returns the stack currently stored atslot
.SimpleInventory.getStack
(int slot) Returns the stack currently stored atslot
.SingleStackInventory.getStack()
default ItemStack
SingleStackInventory.getStack
(int slot) Returns the stack currently stored atslot
.SimpleInventory.removeItem
(Item item, int count) Searches this inventory for the specified item and removes the given amount from this inventory.CraftingInventory.removeStack
(int slot) Removes the stack currently stored atslot
.CraftingInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.CraftingResultInventory.removeStack
(int slot) Removes the stack currently stored atslot
.CraftingResultInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.DoubleInventory.removeStack
(int slot) Removes the stack currently stored atslot
.DoubleInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.static ItemStack
Inventories.removeStack
(List<ItemStack> stacks, int slot) Sets the stack atslot
toEMPTY
and returns the old stack.Inventory.removeStack
(int slot) Removes the stack currently stored atslot
.Inventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.SimpleInventory.removeStack
(int slot) Removes the stack currently stored atslot
.SimpleInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.default ItemStack
SingleStackInventory.removeStack
(int slot) Removes the stack currently stored atslot
.default ItemStack
SingleStackInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.static ItemStack
Inventories.splitStack
(List<ItemStack> stacks, int slot, int amount) Returns the copy of the stack split from the stack atslot
.Modifier and TypeMethodDescriptionSimpleInventory.clearToList()
Clears this inventory and returns all the non-empty stacks in a list.CraftingInventory.getHeldStacks()
Returns the stacks held by the inventory.RecipeInputInventory.getHeldStacks()
Returns the stacks held by the inventory.SimpleInventory.getHeldStacks()
Modifier and TypeMethodDescriptionAddsstack
to this inventory as much as possible.private void
SimpleInventory.addToExistingSlot
(ItemStack stack) private void
SimpleInventory.addToNewSlot
(ItemStack stack) boolean
SidedInventory.canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.boolean
Returns whetherstack
can be inserted into this inventory.boolean
Returns true if this lock can be opened with the key item stack.default boolean
Inventory.canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.default int
Inventory.getMaxCount
(ItemStack stack) boolean
Returns whetherstack
is valid for theslot
.default boolean
Returns whetherstack
is valid for theslot
.static int
Inventories.remove
(ItemStack stack, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun) Removes a number, not exceedingmaxCount
, of items from an item stack based on a predicate and returns that number.boolean
Sets thestack
.void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.void
Sets the stack stored atslot
tostack
.default void
Sets the stack stored atslot
tostack
.void
private void
Modifier and TypeMethodDescriptiondefault boolean
Inventory.containsAny
(Predicate<ItemStack> predicate) Returns whether this inventory contains any of the stacks matchingpredicate
.static StackReference
static StackReference
static StackReference
StackReference.of
(LivingEntity entity, EquipmentSlot slot, Predicate<ItemStack> filter) Creates a stack reference backed by an equipment slot of a living entity and guarded by a condition for setting stacks into the inventory.static StackReference
Creates a stack reference backed by an index within an inventory and guarded by a condition for setting stacks into the inventory.static void
Inventories.readNbt
(NbtCompound nbt, DefaultedList<ItemStack> stacks, RegistryWrapper.WrapperLookup registries) Readsnbt
and sets the elements ofstacks
accordingly.static int
Inventories.remove
(Inventory inventory, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun) Removes a number, not exceedingmaxCount
, of items from an inventory based on a predicate and returns that number.static int
Inventories.remove
(ItemStack stack, Predicate<ItemStack> shouldRemove, int maxCount, boolean dryRun) Removes a number, not exceedingmaxCount
, of items from an item stack based on a predicate and returns that number.static ItemStack
Inventories.removeStack
(List<ItemStack> stacks, int slot) Sets the stack atslot
toEMPTY
and returns the old stack.static ItemStack
Inventories.splitStack
(List<ItemStack> stacks, int slot, int amount) Returns the copy of the stack split from the stack atslot
.static NbtCompound
Inventories.writeNbt
(NbtCompound nbt, DefaultedList<ItemStack> stacks, boolean setIfEmpty, RegistryWrapper.WrapperLookup registries) Writes the inventory tonbt
.static NbtCompound
Inventories.writeNbt
(NbtCompound nbt, DefaultedList<ItemStack> stacks, RegistryWrapper.WrapperLookup registries) Writes the inventory tonbt
.ModifierConstructorDescriptionprivate
CraftingInventory
(ScreenHandler handler, int width, int height, DefaultedList<ItemStack> stacks) -
Uses of ItemStack in net.minecraft.item
Modifier and TypeFieldDescriptionstatic final ItemStack
ItemStack.EMPTY
The empty item stack that holds no item.ItemGroup.icon
private final ItemStack
ItemUsageContext.stack
Modifier and TypeFieldDescriptionRangedWeaponItem.BOW_PROJECTILES
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.CODEC
RangedWeaponItem.CROSSBOW_HELD_PROJECTILES
private Collection
<ItemStack> ItemGroup.displayStacks
private static final Hash.Strategy
<? super ItemStack> ItemStackSet.HASH_STRATEGY
ItemGroup.Builder.iconSupplier
ItemGroup.iconSupplier
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.OPTIONAL_CODEC
static final PacketCodec
<RegistryByteBuf, List<ItemStack>> ItemStack.OPTIONAL_LIST_PACKET_CODEC
static final PacketCodec
<RegistryByteBuf, ItemStack> ItemStack.OPTIONAL_PACKET_CODEC
static final PacketCodec
<RegistryByteBuf, ItemStack> ItemStack.PACKET_CODEC
final Collection
<ItemStack> ItemGroup.EntriesImpl.parentTabStacks
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.REGISTRY_ENTRY_CODEC
ItemGroup.EntriesImpl.searchTabStacks
ItemGroup.searchTabStacks
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.UNCOUNTED_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.VALIDATED_CODEC
static final com.mojang.serialization.Codec
<ItemStack> ItemStack.VALIDATED_UNCOUNTED_CODEC
Modifier and TypeMethodDescriptionprivate ItemStack
ItemStack.applyRemainderAndCooldown
(LivingEntity user, ItemStack stack) ItemStack.copy()
Returns a copy of this item stack, including the item count, components, and bobbing animation time.ItemStack.copyAndEmpty()
ItemStack.copyComponentsToNewStack
(ItemConvertible item, int count) Returns a new item stack with the components copied from this item stack.private ItemStack
ItemStack.copyComponentsToNewStackIgnoreEmpty
(ItemConvertible item, int count) Returns a new item stack with the components copied from this item stack, even if this stack is empty.ItemStack.copyWithCount
(int count) Returns a copy of this item stack, including the components, and bobbing animation time.static ItemStack
FilledMapItem.createMap
(World world, int x, int z, byte scale, boolean showIcons, boolean unlimitedTracking) ItemStack.damage
(int amount, ItemConvertible itemAfterBreaking, LivingEntity entity, EquipmentSlot slot) static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack) Returns the stack to put in the player's hand after exchanging stacks.static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack, boolean creativeOverride) Returns the stack to put in the player's hand after exchanging stacks.protected ItemStack
GlassBottleItem.fill
(ItemStack stack, PlayerEntity player, ItemStack outputStack) Item.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.ItemStack.finishUsing
(World world, LivingEntity user) SpyglassItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.static ItemStack
ItemStack.fromNbtOrEmpty
(RegistryWrapper.WrapperLookup registries, NbtCompound nbt) Item.getDefaultStack()
Returns the default stack for this item.PotionItem.getDefaultStack()
Returns the default stack for this item.TippedArrowItem.getDefaultStack()
Returns the default stack for this item.static ItemStack
BucketItem.getEmptiedStack
(ItemStack stack, PlayerEntity player) static ItemStack
RangedWeaponItem.getHeldProjectile
(LivingEntity entity, Predicate<ItemStack> predicate) ItemGroup.getIcon()
protected static ItemStack
RangedWeaponItem.getProjectile
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean multishot) final ItemStack
Item.getRecipeRemainder()
Gets the remainder item that should be left behind when this item is used as a crafting ingredient.static ItemStack
BundleItem.getSelectedStack
(ItemStack stack) ItemUsageContext.getStack()
static ItemStack
GoatHornItem.getStackForInstrument
(Item item, RegistryEntry<Instrument> instrument) ItemStack.split
(int amount) Returns the copy of the stack "split" from the current stack with item count being at mostamount
.ItemStack.splitUnlessCreative
(int amount, @Nullable LivingEntity entity) ItemStack.withItem
(ItemConvertible item) Modifier and TypeMethodDescriptionItemStackSet.create()
static PacketCodec
<RegistryByteBuf, ItemStack> ItemStack.createExtraValidatingPacketCodec
(PacketCodec<RegistryByteBuf, ItemStack> basePacketCodec) Returns a packet codec that ensures the validity of the decoded stack by checking if it can be re-encoded.static com.mojang.serialization.MapCodec
<ItemStack> ItemStack.createOptionalCodec
(String fieldName) ItemStack.fromNbt
(RegistryWrapper.WrapperLookup registries, NbtElement nbt) ItemGroup.getDisplayStacks()
CrossbowItem.getHeldProjectiles()
RangedWeaponItem.getHeldProjectiles()
BowItem.getProjectiles()
CrossbowItem.getProjectiles()
RangedWeaponItem.getProjectiles()
ItemGroup.getSearchTabStacks()
RangedWeaponItem.load
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) BundleItem.popFirstBundledStack
(ItemStack stack, PlayerEntity player, BundleContentsComponent contents) private static com.mojang.serialization.DataResult
<ItemStack> Modifier and TypeMethodDescriptiondefault void
void
ItemGroup.Entries.add
(ItemStack stack, ItemGroup.StackVisibility visibility) void
ItemGroup.EntriesImpl.add
(ItemStack stack, ItemGroup.StackVisibility visibility) static void
BannerItem.appendBannerTooltip
(ItemStack stack, List<Text> tooltip) void
AirBlockItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
BannerItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
BlockItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
CrossbowItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
DecorationItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
DiscFragmentItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
EntityBucketItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
FilledMapItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
FireworkRocketItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
FireworkStarItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
GoatHornItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
Item.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
LingeringPotionItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
PotionItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
ShieldItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
SmithingTemplateItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
TippedArrowItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.void
WrittenBookItem.appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType type) Called by the client to append tooltips to an item.private ItemStack
ItemStack.applyRemainderAndCooldown
(LivingEntity user, ItemStack stack) static boolean
Returns whether the given item stacks are equal, including the item count and components.static boolean
ItemStack.areItemsAndComponentsEqual
(ItemStack stack, ItemStack otherStack) Returns whether the given item stacks' items and components are equal.static boolean
ItemStack.areItemsEqual
(ItemStack left, ItemStack right) Returns whether the given item stacks contain the same item, regardless of item count or components.protected boolean
DecorationItem.canPlaceOn
(PlayerEntity player, Direction side, ItemStack stack, BlockPos pos) protected boolean
ItemFrameItem.canPlaceOn
(PlayerEntity player, Direction side, ItemStack stack, BlockPos pos) boolean
ItemStack.canRepairWith
(ItemStack ingredient) boolean
private static void
BlockItem.copyComponentsToBlockEntity
(World world, BlockPos pos, ItemStack stack) static void
ArrowItem.createArrow
(World world, ItemStack stack, LivingEntity shooter, @Nullable ItemStack shotFrom) SpectralArrowItem.createArrow
(World world, ItemStack stack, LivingEntity shooter, @Nullable ItemStack shotFrom) protected ProjectileEntity
CrossbowItem.createArrowEntity
(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) protected ProjectileEntity
RangedWeaponItem.createArrowEntity
(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) ArrowItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) private @Nullable AbstractBoatEntity
BoatItem.createEntity
(World world, HitResult hitResult, ItemStack stack, PlayerEntity player) EggItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) ExperienceBottleItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) FireChargeItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) FireworkRocketItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) ProjectileItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) SnowballItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) SpectralArrowItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) ThrowablePotionItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) TridentItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) WindChargeItem.createEntity
(World world, Position pos, ItemStack stack, Direction direction) private void
BundleItem.dropContentsOnUse
(World world, PlayerEntity player, ItemStack stack) private boolean
BundleItem.dropFirstBundledStack
(ItemStack stack, PlayerEntity player) static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack) Returns the stack to put in the player's hand after exchanging stacks.static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack, boolean creativeOverride) Returns the stack to put in the player's hand after exchanging stacks.protected ItemStack
GlassBottleItem.fill
(ItemStack stack, PlayerEntity player, ItemStack outputStack) static void
FilledMapItem.fillExplorationMap
(ServerWorld world, ItemStack map) Item.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.SpyglassItem.finishUsing
(ItemStack stack, World world, LivingEntity user) Called when an entity finishes using the item, such as eating food or drinking a potion.static float
BundleItem.getAmountFilled
(ItemStack stack) static ItemStack
BucketItem.getEmptiedStack
(ItemStack stack, PlayerEntity player) EntityType
<?> SpawnEggItem.getEntityType
(ItemStack stack) int
FuelRegistry.getFuelTicks
(ItemStack item) private Optional
<RegistryEntry<Instrument>> GoatHornItem.getInstrument
(ItemStack stack, RegistryWrapper.WrapperLookup registries) int
BundleItem.getItemBarColor
(ItemStack stack) Returns the RGB color of the item bar, usually used for durability display.int
Item.getItemBarColor
(ItemStack stack) Returns the RGB color of the item bar, usually used for durability display.int
BundleItem.getItemBarStep
(ItemStack stack) Returns the step, or the length of the colored area of the item bar, forstack
.int
Item.getItemBarStep
(ItemStack stack) Returns the step, or the length of the colored area of the item bar, forstack
.(package private) CrossbowItem.LoadingSounds
CrossbowItem.getLoadingSounds
(ItemStack stack) FilledMapItem.getMapState
(ItemStack map, World world) int
BowItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
BrushItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
BundleItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
CrossbowItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
EnderEyeItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
GoatHornItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
Item.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
ShieldItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
SpyglassItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.int
TridentItem.getMaxUseTime
(ItemStack stack, LivingEntity user) Returns the maximum use (right-click) time of this item, in ticks.float
Item.getMiningSpeed
(ItemStack stack, BlockState state) static int
BundleItem.getNumberOfStacksShown
(ItemStack stack) protected static ItemStack
RangedWeaponItem.getProjectile
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean multishot) private static float
CrossbowItem.getPullProgress
(int useTicks, ItemStack stack, LivingEntity user) static int
CrossbowItem.getPullTime
(ItemStack stack, LivingEntity user) static ItemStack
BundleItem.getSelectedStack
(ItemStack stack) static int
BundleItem.getSelectedStackIndex
(ItemStack stack) BundleItem.getTooltipData
(ItemStack stack) Item.getTooltipData
(ItemStack stack) BowItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.BrushItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.CrossbowItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.GoatHornItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.Item.getUseAction
(ItemStack stack) Returns the use action the item should perform.ShieldItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.SpyglassItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.TridentItem.getUseAction
(ItemStack stack) Returns the use action the item should perform.protected int
CrossbowItem.getWeaponStackDamage
(ItemStack projectile) protected int
RangedWeaponItem.getWeaponStackDamage
(ItemStack projectile) boolean
Checks if the glint effect should be applied when the item is rendered.boolean
Checks if the glint effect should be applied when the item is rendered.static int
static boolean
BundleItem.hasSelectedStack
(ItemStack stack) void
CompassItem.inventoryTick
(ItemStack stack, World world, Entity entity, int slot, boolean selected) Called on both the client and the server every tick if the item is in the player's inventory.void
FilledMapItem.inventoryTick
(ItemStack stack, World world, Entity entity, int slot, boolean selected) Called on both the client and the server every tick if the item is in the player's inventory.void
Item.inventoryTick
(ItemStack stack, World world, Entity entity, int slot, boolean selected) Called on both the client and the server every tick if the item is in the player's inventory.static boolean
boolean
Item.isCorrectForDrops
(ItemStack stack, BlockState state) boolean
boolean
BundleItem.isItemBarVisible
(ItemStack stack) Returns whether to show the item bar forstack
.boolean
Item.isItemBarVisible
(ItemStack stack) Returns whether to show the item bar forstack
.boolean
SpawnEggItem.isOfSameEntityType
(ItemStack stack, EntityType<?> type) boolean
CrossbowItem.isUsedOnRelease
(ItemStack stack) boolean
Item.isUsedOnRelease
(ItemStack stack) RangedWeaponItem.load
(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) private static boolean
CrossbowItem.loadProjectiles
(LivingEntity shooter, ItemStack crossbow) boolean
BundleItem.onClicked
(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) Called when the item atslot
gets clicked by the cursor holdingotherStack
.boolean
Item.onClicked
(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) Called when the item atslot
gets clicked by the cursor holdingotherStack
.boolean
ItemStack.onClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) void
Called when the item is made by crafting, smelting, smithing, etc.void
Called when the item is made by crafting, smelting, smithing, etc.void
Item.onCraftByPlayer
(ItemStack stack, World world, PlayerEntity player) Called when a player acquires the item by crafting, smelting, smithing, etc.void
void
EntityBucketItem.onEmptied
(@Nullable PlayerEntity player, World world, ItemStack stack, BlockPos pos) default void
FluidModificationItem.onEmptied
(@Nullable PlayerEntity player, World world, ItemStack stack, BlockPos pos) boolean
BundleItem.onStackClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player) Called when the item at the cursor is clicked atslot
.boolean
Item.onStackClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player) Called when the item at the cursor is clicked atslot
.boolean
BowItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.boolean
CrossbowItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.boolean
Item.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.boolean
SpyglassItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.boolean
TridentItem.onStoppedUsing
(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) Called on both the client and the server when an entity stops using an item before reaching the maximum use time.private BlockState
BlockItem.placeFromNbt
(BlockPos pos, World world, ItemStack stack, BlockState state) BundleItem.popFirstBundledStack
(ItemStack stack, PlayerEntity player, BundleContentsComponent contents) void
Item.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
MaceItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
MiningToolItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
SwordItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) void
TridentItem.postDamageEntity
(ItemStack stack, LivingEntity target, LivingEntity attacker) boolean
Item.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
MaceItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
MiningToolItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
SwordItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
TridentItem.postHit
(ItemStack stack, LivingEntity target, LivingEntity attacker) Called on the server when the item is used to hit an entity.boolean
Item.postMine
(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) Called on the server when the item is used to break a block.boolean
ShearsItem.postMine
(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) Called on the server when the item is used to break a block.protected boolean
BlockItem.postPlacement
(BlockPos pos, World world, @Nullable PlayerEntity player, ItemStack stack, BlockState state) protected boolean
SignItem.postPlacement
(BlockPos pos, World world, @Nullable PlayerEntity player, ItemStack stack, BlockState state) void
Item.postProcessComponents
(ItemStack stack) Processes the components applied to an item stack of this item.void
PlayerHeadItem.postProcessComponents
(ItemStack stack) Processes the components applied to an item stack of this item.static boolean
WrittenBookItem.resolve
(ItemStack book, ServerCommandSource commandSource, @Nullable PlayerEntity player) private static void
static void
BlockItem.setBlockEntityData
(ItemStack stack, BlockEntityType<?> type, NbtCompound nbt) static void
BundleItem.setSelectedStackIndex
(ItemStack stack, int selectedStackIndex) void
CrossbowItem.shootAll
(World world, LivingEntity shooter, Hand hand, ItemStack stack, float speed, float divergence, @Nullable LivingEntity target) protected void
RangedWeaponItem.shootAll
(ServerWorld world, LivingEntity shooter, Hand hand, ItemStack stack, List<ItemStack> projectiles, float speed, float divergence, boolean critical, @Nullable LivingEntity target) SpawnEggItem.spawnBaby
(PlayerEntity user, MobEntity entity, EntityType<? extends MobEntity> entityType, ServerWorld world, Vec3d pos, ItemStack stack) private void
EntityBucketItem.spawnEntity
(ServerWorld world, ItemStack stack, BlockPos pos) void
BrushItem.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
BundleItem.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
CrossbowItem.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.void
Item.usageTick
(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) Called on both the server and the client every tick while an entity uses the item.private boolean
DebugStickItem.use
(PlayerEntity player, BlockState state, WorldAccess world, BlockPos pos, boolean update, ItemStack stack) DyeItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.Item.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.NameTagItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.SaddleItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.static boolean
BoneMealItem.useOnFertilizable
(ItemStack stack, World world, BlockPos pos) static boolean
BoneMealItem.useOnGround
(ItemStack stack, World world, BlockPos blockPos, @Nullable Direction facing) private static com.mojang.serialization.DataResult
<ItemStack> static boolean
BlockItem.writeNbtToBlockEntity
(World world, @Nullable PlayerEntity player, BlockPos pos, ItemStack stack) Modifier and TypeMethodDescriptiondefault void
ItemGroup.Entries.addAll
(Collection<ItemStack> stacks) default void
ItemGroup.Entries.addAll
(Collection<ItemStack> stacks, ItemGroup.StackVisibility visibility) static PacketCodec
<RegistryByteBuf, ItemStack> ItemStack.createExtraValidatingPacketCodec
(PacketCodec<RegistryByteBuf, ItemStack> basePacketCodec) Returns a packet codec that ensures the validity of the decoded stack by checking if it can be re-encoded.static ItemStack
RangedWeaponItem.getHeldProjectile
(LivingEntity entity, Predicate<ItemStack> predicate) static int
ItemStack.listHashCode
(List<ItemStack> stacks) Deprecated.protected void
RangedWeaponItem.shootAll
(ServerWorld world, LivingEntity shooter, Hand hand, ItemStack stack, List<ItemStack> projectiles, float speed, float divergence, boolean critical, @Nullable LivingEntity target) static void
ItemUsage.spawnItemContents
(ItemEntity itemEntity, Iterable<ItemStack> contents) Spawns item entity's contents at the item entity's position.static boolean
ItemStack.stacksEqual
(List<ItemStack> left, List<ItemStack> right) Deprecated.ModifierConstructorDescriptionAutomaticItemPlacementContext
(World world, BlockPos pos, Direction facing, ItemStack stack, Direction side) ItemPlacementContext
(PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult) protected
ItemPlacementContext
(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) protected
ItemUsageContext
(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) ModifierConstructorDescription(package private)
ItemGroup
(ItemGroup.Row row, int column, ItemGroup.Type type, Text displayName, Supplier<ItemStack> iconSupplier, ItemGroup.EntryCollector entryCollector) -
Uses of ItemStack in net.minecraft.item.consume
Modifier and TypeMethodDescriptionboolean
ApplyEffectsConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) boolean
ClearAllEffectsConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) boolean
ConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) boolean
PlaySoundConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) boolean
RemoveEffectsConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) boolean
TeleportRandomlyConsumeEffect.onConsume
(World world, ItemStack stack, LivingEntity user) -
Uses of ItemStack in net.minecraft.item.equipment.trim
Modifier and TypeMethodDescriptionArmorTrimMaterials.get
(RegistryWrapper.WrapperLookup registries, ItemStack stack) ArmorTrimPatterns.get
(RegistryWrapper.WrapperLookup registries, ItemStack stack) -
Uses of ItemStack in net.minecraft.item.map
Modifier and TypeMethodDescriptionstatic void
MapState.addDecorationsNbt
(ItemStack stack, BlockPos pos, String id, RegistryEntry<MapDecorationType> decorationType) MapState.getEqualPredicate
(ItemStack stack) void
MapState.update
(PlayerEntity player, ItemStack stack) -
Uses of ItemStack in net.minecraft.loot
Modifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.combinedFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.combinedFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.javaFunctions
private final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.javaFunctions
Modifier and TypeMethodDescriptionprivate ObjectArrayList
<ItemStack> LootTable.generateLoot
(LootContext context) LootTable.generateLoot
(LootWorldContext parameters) LootTable.generateLoot
(LootWorldContext parameters, long seed) LootTable.generateLoot
(LootWorldContext parameters, Random random) LootTable.processStacks
(ServerWorld world, Consumer<ItemStack> consumer) Modifier and TypeMethodDescriptiondefault void
ContainerComponentModifier.apply
(ItemStack stack, UnaryOperator<ItemStack> contentsOperator) default void
default void
Modifier and TypeMethodDescriptionvoid
LootPool.addGeneratedLoot
(Consumer<ItemStack> lootConsumer, LootContext context) default void
ContainerComponentModifier.apply
(ItemStack stack, UnaryOperator<ItemStack> contentsOperator) default void
default void
void
LootChoice.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) void
LootTable.generateLoot
(LootContext context, Consumer<ItemStack> lootConsumer) void
LootTable.generateLoot
(LootWorldContext parameters, long seed, Consumer<ItemStack> lootConsumer) void
LootTable.generateLoot
(LootWorldContext parameters, Consumer<ItemStack> lootConsumer) void
LootTable.generateUnprocessedLoot
(LootContext context, Consumer<ItemStack> lootConsumer) void
LootTable.generateUnprocessedLoot
(LootWorldContext parameters, Consumer<ItemStack> lootConsumer) LootTable.processStacks
(ServerWorld world, Consumer<ItemStack> consumer) private void
LootTable.shuffle
(ObjectArrayList<ItemStack> drops, int freeSlots, Random random) private void
LootPool.supplyOnce
(Consumer<ItemStack> lootConsumer, LootContext context) -
Uses of ItemStack in net.minecraft.loot.context
Modifier and TypeFieldDescriptionstatic final ContextParameter
<ItemStack> LootContextParameters.TOOL
Modifier and TypeMethodDescriptionvoid
void
LootWorldContext.addDynamicDrops
(Identifier id, Consumer<ItemStack> lootConsumer) void
LootContext.drop
(Identifier id, Consumer<ItemStack> lootConsumer) -
Uses of ItemStack in net.minecraft.loot.entry
Modifier and TypeFieldDescription(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LeafEntry.compiledFunctions
(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LeafEntry.compiledFunctions
Modifier and TypeMethodDescriptionvoid
DynamicEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) void
EmptyEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) void
ItemEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) protected abstract void
LeafEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) void
LootTableEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) void
TagEntry.generateLoot
(Consumer<ItemStack> lootConsumer, LootContext context) -
Uses of ItemStack in net.minecraft.loot.function
Modifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> AndLootFunction.applier
private final BiFunction
<ItemStack, LootContext, ItemStack> AndLootFunction.applier
static final BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.NOOP
static final BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.NOOP
Modifier and TypeMethodDescriptionprivate static ItemStack
EnchantRandomlyLootFunction.addEnchantmentToStack
(ItemStack stack, RegistryEntry<Enchantment> enchantment, Random random) AndLootFunction.apply
(ItemStack itemStack, LootContext lootContext) final ItemStack
ConditionalLootFunction.apply
(ItemStack itemStack, LootContext lootContext) ApplyBonusLootFunction.process
(ItemStack stack, LootContext context) protected abstract ItemStack
ConditionalLootFunction.process
(ItemStack stack, LootContext context) CopyComponentsLootFunction.process
(ItemStack stack, LootContext context) CopyNameLootFunction.process
(ItemStack stack, LootContext context) CopyNbtLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
CopyStateLootFunction.process
(ItemStack stack, LootContext context) EnchantedCountIncreaseLootFunction.process
(ItemStack stack, LootContext context) EnchantRandomlyLootFunction.process
(ItemStack stack, LootContext context) EnchantWithLevelsLootFunction.process
(ItemStack stack, LootContext context) ExplorationMapLootFunction.process
(ItemStack stack, LootContext context) ExplosionDecayLootFunction.process
(ItemStack stack, LootContext context) FillPlayerHeadLootFunction.process
(ItemStack stack, LootContext context) FilteredLootFunction.process
(ItemStack stack, LootContext context) FurnaceSmeltLootFunction.process
(ItemStack stack, LootContext context) LimitCountLootFunction.process
(ItemStack stack, LootContext context) ModifyContentsLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
ReferenceLootFunction.process
(ItemStack stack, LootContext context) SetAttributesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetBannerPatternLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetBookCoverLootFunction.process
(ItemStack stack, LootContext context) SetComponentsLootFunction.process
(ItemStack stack, LootContext context) SetContentsLootFunction.process
(ItemStack stack, LootContext context) SetCountLootFunction.process
(ItemStack stack, LootContext context) SetCustomDataLootFunction.process
(ItemStack stack, LootContext context) SetCustomModelDataLootFunction.process
(ItemStack stack, LootContext context) SetDamageLootFunction.process
(ItemStack stack, LootContext context) SetEnchantmentsLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetFireworkExplosionLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetFireworksLootFunction.process
(ItemStack stack, LootContext context) SetInstrumentLootFunction.process
(ItemStack stack, LootContext context) SetItemLootFunction.process
(ItemStack stack, LootContext context) SetLootTableLootFunction.process
(ItemStack stack, LootContext context) SetLoreLootFunction.process
(ItemStack stack, LootContext context) SetNameLootFunction.process
(ItemStack stack, LootContext context) SetOminousBottleAmplifierLootFunction.process
(ItemStack stack, LootContext context) SetPotionLootFunction.process
(ItemStack stack, LootContext context) SetStewEffectLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetWritableBookPagesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetWrittenBookPagesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
ToggleTooltipsLootFunction.process
(ItemStack stack, LootContext context) Modifier and TypeMethodDescriptionLootFunction.apply
(BiFunction<ItemStack, LootContext, ItemStack> itemApplier, Consumer<ItemStack> lootConsumer, LootContext context) static BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.join
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> terms) static BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.join
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> terms) Modifier and TypeMethodDescriptionprivate static ItemStack
EnchantRandomlyLootFunction.addEnchantmentToStack
(ItemStack stack, RegistryEntry<Enchantment> enchantment, Random random) AndLootFunction.apply
(ItemStack itemStack, LootContext lootContext) final ItemStack
ConditionalLootFunction.apply
(ItemStack itemStack, LootContext lootContext) void
ApplyBonusLootFunction.process
(ItemStack stack, LootContext context) protected abstract ItemStack
ConditionalLootFunction.process
(ItemStack stack, LootContext context) CopyComponentsLootFunction.process
(ItemStack stack, LootContext context) CopyNameLootFunction.process
(ItemStack stack, LootContext context) CopyNbtLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
CopyStateLootFunction.process
(ItemStack stack, LootContext context) EnchantedCountIncreaseLootFunction.process
(ItemStack stack, LootContext context) EnchantRandomlyLootFunction.process
(ItemStack stack, LootContext context) EnchantWithLevelsLootFunction.process
(ItemStack stack, LootContext context) ExplorationMapLootFunction.process
(ItemStack stack, LootContext context) ExplosionDecayLootFunction.process
(ItemStack stack, LootContext context) FillPlayerHeadLootFunction.process
(ItemStack stack, LootContext context) FilteredLootFunction.process
(ItemStack stack, LootContext context) FurnaceSmeltLootFunction.process
(ItemStack stack, LootContext context) LimitCountLootFunction.process
(ItemStack stack, LootContext context) ModifyContentsLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
ReferenceLootFunction.process
(ItemStack stack, LootContext context) SetAttributesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetBannerPatternLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetBookCoverLootFunction.process
(ItemStack stack, LootContext context) SetComponentsLootFunction.process
(ItemStack stack, LootContext context) SetContentsLootFunction.process
(ItemStack stack, LootContext context) SetCountLootFunction.process
(ItemStack stack, LootContext context) SetCustomDataLootFunction.process
(ItemStack stack, LootContext context) SetCustomModelDataLootFunction.process
(ItemStack stack, LootContext context) SetDamageLootFunction.process
(ItemStack stack, LootContext context) SetEnchantmentsLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetFireworkExplosionLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetFireworksLootFunction.process
(ItemStack stack, LootContext context) SetInstrumentLootFunction.process
(ItemStack stack, LootContext context) SetItemLootFunction.process
(ItemStack stack, LootContext context) SetLootTableLootFunction.process
(ItemStack stack, LootContext context) SetLoreLootFunction.process
(ItemStack stack, LootContext context) SetNameLootFunction.process
(ItemStack stack, LootContext context) SetOminousBottleAmplifierLootFunction.process
(ItemStack stack, LootContext context) SetPotionLootFunction.process
(ItemStack stack, LootContext context) SetStewEffectLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetWritableBookPagesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
SetWrittenBookPagesLootFunction.process
(ItemStack stack, LootContext context) protected ItemStack
ToggleTooltipsLootFunction.process
(ItemStack stack, LootContext context) Modifier and TypeMethodDescriptionLootFunction.apply
(BiFunction<ItemStack, LootContext, ItemStack> itemApplier, Consumer<ItemStack> lootConsumer, LootContext context) LootFunction.apply
(BiFunction<ItemStack, LootContext, ItemStack> itemApplier, Consumer<ItemStack> lootConsumer, LootContext context) LootFunction.apply
(BiFunction<ItemStack, LootContext, ItemStack> itemApplier, Consumer<ItemStack> lootConsumer, LootContext context) static BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.join
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> terms) static BiFunction
<ItemStack, LootContext, ItemStack> LootFunctionTypes.join
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> terms) -
Uses of ItemStack in net.minecraft.network.packet.c2s.play
Modifier and TypeFieldDescriptionprivate final ItemStack
ClickSlotC2SPacket.stack
private final ItemStack
CreativeInventoryActionC2SPacket.stack
The field for thestack
record component.Modifier and TypeFieldDescriptionprivate final Int2ObjectMap
<ItemStack> ClickSlotC2SPacket.modifiedStacks
private static final PacketCodec
<RegistryByteBuf, Int2ObjectMap<ItemStack>> ClickSlotC2SPacket.STACK_MAP_CODEC
Modifier and TypeMethodDescriptionClickSlotC2SPacket.getStack()
CreativeInventoryActionC2SPacket.stack()
Returns the value of thestack
record component.ModifierConstructorDescriptionClickSlotC2SPacket
(int syncId, int revision, int slot, int button, SlotActionType actionType, ItemStack stack, Int2ObjectMap<ItemStack> modifiedStacks) CreativeInventoryActionC2SPacket
(int slot, ItemStack stack) CreativeInventoryActionC2SPacket
(short short2, ItemStack itemStack) ModifierConstructorDescriptionClickSlotC2SPacket
(int syncId, int revision, int slot, int button, SlotActionType actionType, ItemStack stack, Int2ObjectMap<ItemStack> modifiedStacks) -
Uses of ItemStack in net.minecraft.network.packet.s2c.play
Modifier and TypeFieldDescriptionprivate final ItemStack
SetCursorItemS2CPacket.contents
The field for thecontents
record component.private final ItemStack
SetPlayerInventoryS2CPacket.contents
The field for thecontents
record component.private final ItemStack
InventoryS2CPacket.cursorStack
private final ItemStack
ScreenHandlerSlotUpdateS2CPacket.stack
Modifier and TypeFieldDescriptionInventoryS2CPacket.contents
private final List
<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> EntityEquipmentUpdateS2CPacket.equipmentList
Modifier and TypeMethodDescriptionSetCursorItemS2CPacket.contents()
Returns the value of thecontents
record component.SetPlayerInventoryS2CPacket.contents()
Returns the value of thecontents
record component.InventoryS2CPacket.getCursorStack()
ScreenHandlerSlotUpdateS2CPacket.getStack()
Modifier and TypeMethodDescriptionInventoryS2CPacket.getContents()
List
<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> EntityEquipmentUpdateS2CPacket.getEquipmentList()
ModifierConstructorDescriptionInventoryS2CPacket
(int syncId, int revision, DefaultedList<ItemStack> contents, ItemStack cursorStack) ScreenHandlerSlotUpdateS2CPacket
(int syncId, int revision, int slot, ItemStack stack) SetCursorItemS2CPacket
(ItemStack itemStack) SetPlayerInventoryS2CPacket
(int int2, ItemStack itemStack) ModifierConstructorDescriptionEntityEquipmentUpdateS2CPacket
(int entityId, List<com.mojang.datafixers.util.Pair<EquipmentSlot, ItemStack>> equipmentList) InventoryS2CPacket
(int syncId, int revision, DefaultedList<ItemStack> contents, ItemStack cursorStack) -
Uses of ItemStack in net.minecraft.particle
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<ItemStack> ItemStackParticleEffect.ITEM_STACK_CODEC
ModifierConstructorDescriptionItemStackParticleEffect
(ParticleType<ItemStackParticleEffect> type, ItemStack stack) -
Uses of ItemStack in net.minecraft.predicate
-
Uses of ItemStack in net.minecraft.predicate.item
Modifier and TypeFieldDescriptionprivate final Optional
<CollectionPredicate<ItemStack, ItemPredicate>> BundleContentsPredicate.items
The field for theitems
record component.private final Optional
<CollectionPredicate<ItemStack, ItemPredicate>> ContainerPredicate.items
The field for theitems
record component.Modifier and TypeMethodDescriptionBundleContentsPredicate.items()
Returns the value of theitems
record component.ContainerPredicate.items()
Returns the value of theitems
record component.Modifier and TypeMethodDescriptionboolean
AttributeModifiersPredicate.test
(ItemStack itemStack, AttributeModifiersComponent attributeModifiersComponent) boolean
BundleContentsPredicate.test
(ItemStack itemStack, BundleContentsComponent bundleContentsComponent) default boolean
boolean
boolean
ContainerPredicate.test
(ItemStack itemStack, ContainerComponent containerComponent) boolean
boolean
boolean
EnchantmentsPredicate.test
(ItemStack itemStack, ItemEnchantmentsComponent itemEnchantmentsComponent) boolean
FireworkExplosionPredicate.test
(ItemStack itemStack, FireworkExplosionComponent fireworkExplosionComponent) boolean
FireworksPredicate.test
(ItemStack itemStack, FireworksComponent fireworksComponent) boolean
boolean
boolean
JukeboxPlayablePredicate.test
(ItemStack itemStack, JukeboxPlayableComponent jukeboxPlayableComponent) boolean
PotionContentsPredicate.test
(ItemStack itemStack, PotionContentsComponent potionContentsComponent) boolean
boolean
WritableBookContentPredicate.test
(ItemStack itemStack, WritableBookContentComponent writableBookContentComponent) boolean
WrittenBookContentPredicate.test
(ItemStack itemStack, WrittenBookContentComponent writtenBookContentComponent) ModifierConstructorDescription -
Uses of ItemStack in net.minecraft.recipe
Modifier and TypeFieldDescription(package private) final ItemStack
ShapedRecipe.result
(package private) final ItemStack
ShapelessRecipe.result
private final ItemStack
SingleStackRecipe.result
(package private) final ItemStack
SmithingTransformRecipe.result
Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> RecipeCache.CachedRecipe.key
The field for thekey
record component.Modifier and TypeMethodDescriptionArmorDyeRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) BannerDuplicateRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) BookCloningRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) CraftingDecoratedPotRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) FireworkRocketRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) FireworkStarFadeRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) FireworkStarRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) MapCloningRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) MapExtendingRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) Recipe.craft
(T input, RegistryWrapper.WrapperLookup registries) Crafts this recipe.RepairItemRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) ShapedRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) ShapelessRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) ShieldDecorationRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) SingleStackRecipe.craft
(SingleStackRecipeInput singleStackRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) SmithingTransformRecipe.craft
(SmithingRecipeInput smithingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) SmithingTrimRecipe.craft
(SmithingRecipeInput smithingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) static ItemStack
SmithingTrimRecipe.craft
(RegistryWrapper.WrapperLookup registries, ItemStack base, ItemStack addition, ItemStack template) TippedArrowRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) TransmuteRecipe.craft
(CraftingRecipeInput craftingRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) private static ItemStack
MapExtendingRecipe.findFilledMap
(CraftingRecipeInput input) private static ItemStack
CraftingDecoratedPotRecipe.getBack
(CraftingRecipeInput input) private static ItemStack
CraftingDecoratedPotRecipe.getFront
(CraftingRecipeInput input) private static ItemStack
CraftingDecoratedPotRecipe.getLeft
(CraftingRecipeInput input) private static ItemStack
CraftingDecoratedPotRecipe.getRight
(CraftingRecipeInput input) protected ItemStack
SingleStackRecipe.result()
Modifier and TypeMethodDescriptionstatic DefaultedList
<ItemStack> CraftingRecipe.collectRecipeRemainders
(CraftingRecipeInput input) RepairItemRecipe.findPair
(CraftingRecipeInput craftingRecipeInput) RepairItemRecipe.findPair
(CraftingRecipeInput craftingRecipeInput) BannerDuplicateRecipe.getRecipeRemainders
(CraftingRecipeInput input) BookCloningRecipe.getRecipeRemainders
(CraftingRecipeInput input) default DefaultedList
<ItemStack> CraftingRecipe.getRecipeRemainders
(CraftingRecipeInput input) RecipeDisplayEntry.getStacks
(ContextParameterMap context) RecipeCache.CachedRecipe.key()
Returns the value of thekey
record component.Modifier and TypeMethodDescriptionvoid
void
void
RecipeFinder.addInputIfUsable
(ItemStack item) private static boolean
RepairItemRecipe.canCombineStacks
(ItemStack first, ItemStack second) boolean
static ItemStack
SmithingTrimRecipe.craft
(RegistryWrapper.WrapperLookup registries, ItemStack base, ItemStack addition, ItemStack template) AbstractCookingRecipe.RecipeFactory.create
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) SingleStackRecipe.RecipeFactory.create
(String group, Ingredient ingredient, ItemStack result) boolean
BrewingRecipeRegistry.hasItemRecipe
(ItemStack input, ItemStack ingredient) boolean
BrewingRecipeRegistry.hasPotionRecipe
(ItemStack input, ItemStack ingredient) boolean
boolean
BrewingRecipeRegistry.isItemRecipeIngredient
(ItemStack stack) boolean
BrewingRecipeRegistry.isPotionRecipeIngredient
(ItemStack stack) private boolean
BrewingRecipeRegistry.isPotionType
(ItemStack stack) boolean
BrewingRecipeRegistry.isValidIngredient
(ItemStack stack) static boolean
Ingredient.matches
(Optional<Ingredient> ingredient, ItemStack stack) boolean
Modifier and TypeMethodDescriptiondefault void
RecipeUnlocker.unlockLastRecipe
(PlayerEntity player, List<ItemStack> ingredients) ModifierConstructorDescriptionAbstractCookingRecipe
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) BlastingRecipe
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) CampfireCookingRecipe
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) ShapedRecipe
(String group, CraftingRecipeCategory category, RawShapedRecipe raw, ItemStack result) ShapedRecipe
(String group, CraftingRecipeCategory category, RawShapedRecipe raw, ItemStack result, boolean showNotification) ShapelessRecipe
(String group, CraftingRecipeCategory category, ItemStack result, List<Ingredient> ingredients) SingleStackRecipe
(String group, Ingredient ingredient, ItemStack result) SmeltingRecipe
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) SmithingTransformRecipe
(Optional<Ingredient> template, Optional<Ingredient> base, Optional<Ingredient> addition, ItemStack result) SmokingRecipe
(String group, CookingRecipeCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) StonecuttingRecipe
(String group, Ingredient ingredient, ItemStack result) ModifierConstructorDescription(package private)
CachedRecipe
(DefaultedList<ItemStack> defaultedList, int int2, int int3, @Nullable RecipeEntry<CraftingRecipe> recipeEntry) -
Uses of ItemStack in net.minecraft.recipe.display
Modifier and TypeFieldDescriptionprivate final ItemStack
SlotDisplay.StackSlotDisplay.stack
The field for thestack
record component.Modifier and TypeMethodDescriptiondefault ItemStack
SlotDisplay.getFirst
(ContextParameterMap context) SlotDisplay.StackSlotDisplay.stack()
Returns the value of thestack
record component.SlotDisplay.NoopDisplayedItemFactory.toDisplayed
(ItemStack itemStack) Modifier and TypeMethodDescriptionboolean
DisplayedItemFactory.FromStack.toDisplayed
(ItemStack stack) SlotDisplay.NoopDisplayedItemFactory.toDisplayed
(ItemStack itemStack) -
Uses of ItemStack in net.minecraft.recipe.input
Modifier and TypeFieldDescriptionprivate final ItemStack
SmithingRecipeInput.addition
The field for theaddition
record component.private final ItemStack
SmithingRecipeInput.base
The field for thebase
record component.private final ItemStack
SingleStackRecipeInput.item
The field for theitem
record component.private final ItemStack
SmithingRecipeInput.template
The field for thetemplate
record component.Modifier and TypeMethodDescriptionSmithingRecipeInput.addition()
Returns the value of theaddition
record component.SmithingRecipeInput.base()
Returns the value of thebase
record component.CraftingRecipeInput.getStackInSlot
(int slot) CraftingRecipeInput.getStackInSlot
(int x, int y) RecipeInput.getStackInSlot
(int slot) SingleStackRecipeInput.getStackInSlot
(int slot) SmithingRecipeInput.getStackInSlot
(int slot) SingleStackRecipeInput.item()
Returns the value of theitem
record component.SmithingRecipeInput.template()
Returns the value of thetemplate
record component.Modifier and TypeMethodDescriptionstatic CraftingRecipeInput
CraftingRecipeInput.createPositioned
(int width, int height, List<ItemStack> stacks) ModifierConstructorDescriptionSingleStackRecipeInput
(ItemStack itemStack) SmithingRecipeInput
(ItemStack itemStack, ItemStack itemStack2, ItemStack itemStack3) ModifierConstructorDescriptionprivate
CraftingRecipeInput
(int width, int height, List<ItemStack> stacks) -
Uses of ItemStack in net.minecraft.screen
Modifier and TypeFieldDescriptionprivate ItemStack
ScreenHandler.cursorStack
private ItemStack
StonecutterScreenHandler.inputStack
private ItemStack
ScreenHandler.previousCursorStack
Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> ScreenHandler.previousTrackedStacks
private final DefaultedList
<ItemStack> ScreenHandler.trackedStacks
A list of item stacks that is used for tracking changes inScreenHandler.sendContentUpdates()
.Modifier and TypeMethodDescriptionprivate ItemStack
GrindstoneScreenHandler.combineItems
(ItemStack firstInput, ItemStack secondInput) LecternScreenHandler.getBookItem()
ScreenHandler.getCursorStack()
private ItemStack
GrindstoneScreenHandler.getOutputStack
(ItemStack firstInput, ItemStack secondInput) private ItemStack
AbstractFurnaceScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.BeaconScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.BrewingStandScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.CartographyTableScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.CrafterScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.CraftingScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.EnchantmentScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.ForgingScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.Generic3x3ContainerScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.GenericContainerScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.GrindstoneScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.HopperScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.HorseScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.LecternScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.LoomScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.MerchantScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.PlayerScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.abstract ItemStack
ScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.ShulkerBoxScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.StonecutterScreenHandler.quickMove
(PlayerEntity player, int slot) Quick-moves the stack atslot
to other slots of the screen handler that belong to a different inventory or another section of the same inventory.Modifier and TypeMethodDescriptionSmithingScreenHandler.getInputStacks()
ScreenHandler.getStacks()
Returns a list of all stacks of the screen handler's slot.Modifier and TypeMethodDescriptionstatic int
ScreenHandler.calculateStackSize
(Set<Slot> slots, int mode, ItemStack stack) boolean
boolean
boolean
boolean
boolean
CartographyTableScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
CraftingScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
MerchantScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
PlayerScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
ScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
SmithingScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.boolean
StonecutterScreenHandler.canInsertIntoSlot
(ItemStack stack, Slot slot) Returns whetherstack
can be inserted toslot
.static boolean
ScreenHandler.canInsertItemIntoSlot
(@Nullable Slot slot, ItemStack stack, boolean allowOverflow) private void
ScreenHandler.checkSlotUpdates
(int slot, ItemStack stack, Supplier<ItemStack> copySupplier) private ItemStack
GrindstoneScreenHandler.combineItems
(ItemStack firstInput, ItemStack secondInput) private List
<EnchantmentLevelEntry> EnchantmentScreenHandler.generateEnchantments
(DynamicRegistryManager registryManager, ItemStack stack, int slot, int level) private ItemStack
GrindstoneScreenHandler.getOutputStack
(ItemStack firstInput, ItemStack secondInput) private List
<RegistryEntry<BannerPattern>> LoomScreenHandler.getPatternsFor
(ItemStack stack) private ItemStack
private boolean
ScreenHandler.handleSlotClick
(PlayerEntity player, ClickType clickType, Slot slot, ItemStack stack, ItemStack cursorStack) protected boolean
ScreenHandler.insertItem
(ItemStack stack, int startIndex, int endIndex, boolean fromLast) Tries to consumestack
by inserting to slots fromstartIndex
toendIndex - 1
(both inclusive) until the entire stack is used.protected boolean
protected boolean
AbstractFurnaceScreenHandler.isSmeltable
(ItemStack itemStack) protected boolean
ForgingScreenHandler.isValidIngredient
(ItemStack stack) boolean
SmithingScreenHandler.isValidIngredient
(ItemStack stack) static boolean
static boolean
private static void
ScreenHandler.offerOrDropStack
(PlayerEntity player, ItemStack stack) void
CrafterScreenHandler.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
ScreenHandlerListener.onSlotUpdate
(ScreenHandler handler, int slotId, ItemStack stack) void
BrewingStandScreenHandler.PotionSlot.onTakeItem
(PlayerEntity player, ItemStack stack) protected void
AnvilScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) protected abstract void
ForgingScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) protected void
SmithingScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) void
ScreenHandler.setCursorStack
(ItemStack stack) void
ScreenHandler.setPreviousCursorStack
(ItemStack stack) void
ScreenHandler.setPreviousTrackedSlot
(int slot, ItemStack stack) void
ScreenHandler.setPreviousTrackedSlotMutable
(int slot, ItemStack stack) void
ScreenHandler.setStackInSlot
(int slot, int revision, ItemStack stack) private void
GrindstoneScreenHandler.transferEnchantments
(ItemStack target, ItemStack source) void
ScreenHandlerSyncHandler.updateCursorStack
(ScreenHandler handler, ItemStack stack) private void
StonecutterScreenHandler.updateInput
(ItemStack stack) private void
CartographyTableScreenHandler.updateResult
(ItemStack map, ItemStack item, ItemStack oldResult) void
ScreenHandlerSyncHandler.updateSlot
(ScreenHandler handler, int slot, ItemStack stack) void
ScreenHandler.updateSlotStacks
(int revision, List<ItemStack> stacks, ItemStack cursorStack) void
ScreenHandlerSyncHandler.updateState
(ScreenHandler handler, DefaultedList<ItemStack> stacks, ItemStack cursorStack, int[] properties) private void
ScreenHandler.updateTrackedSlot
(int slot, ItemStack stack, Supplier<ItemStack> copySupplier) Modifier and TypeMethodDescriptionprivate void
ScreenHandler.checkSlotUpdates
(int slot, ItemStack stack, Supplier<ItemStack> copySupplier) void
ScreenHandler.updateSlotStacks
(int revision, List<ItemStack> stacks, ItemStack cursorStack) void
ScreenHandlerSyncHandler.updateState
(ScreenHandler handler, DefaultedList<ItemStack> stacks, ItemStack cursorStack, int[] properties) private void
ScreenHandler.updateTrackedSlot
(int slot, ItemStack stack, Supplier<ItemStack> copySupplier) -
Uses of ItemStack in net.minecraft.screen.slot
Modifier and TypeFieldDescriptionForgingSlotsManager.ForgingSlot.mayPlace
The field for themayPlace
record component.Modifier and TypeMethodDescriptionSlot.getStack()
CrafterOutputSlot.insertStack
(ItemStack stack) CrafterOutputSlot.insertStack
(ItemStack stack, int count) Slot.insertStack
(ItemStack stack) Slot.insertStack
(ItemStack stack, int count) CrafterOutputSlot.takeStack
(int amount) CraftingResultSlot.takeStack
(int amount) FurnaceOutputSlot.takeStack
(int amount) Slot.takeStack
(int amount) TradeOutputSlot.takeStack
(int amount) CrafterOutputSlot.takeStackRange
(int min, int max, PlayerEntity player) Slot.takeStackRange
(int min, int max, PlayerEntity player) Modifier and TypeMethodDescriptionprivate static DefaultedList
<ItemStack> CraftingResultSlot.copyInput
(CraftingRecipeInput input) private DefaultedList
<ItemStack> CraftingResultSlot.getRecipeRemainders
(CraftingRecipeInput input, World world) ForgingSlotsManager.ForgingSlot.mayPlace()
Returns the value of themayPlace
record component.CrafterOutputSlot.tryTakeStackRange
(int min, int max, PlayerEntity player) Slot.tryTakeStackRange
(int min, int max, PlayerEntity player) Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
int
FurnaceFuelSlot.getMaxItemCount
(ItemStack stack) int
Slot.getMaxItemCount
(ItemStack stack) CrafterOutputSlot.insertStack
(ItemStack stack) CrafterOutputSlot.insertStack
(ItemStack stack, int count) Slot.insertStack
(ItemStack stack) Slot.insertStack
(ItemStack stack, int count) static boolean
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
void
CrafterOutputSlot.onQuickTransfer
(ItemStack newItem, ItemStack original) void
Slot.onQuickTransfer
(ItemStack newItem, ItemStack original) void
CrafterOutputSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
CraftingResultSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
FurnaceOutputSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
Slot.onTakeItem
(PlayerEntity player, ItemStack stack) void
TradeOutputSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
Sets the slot's stack tostack
and marks the slot as dirty.void
void
Sets the slot's stack tostack
and marks the slot as dirty.void
Slot.setStackNoCallbacks
(ItemStack stack) Modifier and TypeMethodDescriptionModifierConstructorDescriptionForgingSlot
(int int2, int int3, int int4, Predicate<ItemStack> predicate) -
Uses of ItemStack in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static ItemStack
LootCommand.getHeldItem
(ServerCommandSource source, EquipmentSlot slot) private static ItemStack
ItemCommand.getStackInSlot
(Entity entity, int slotId) private static ItemStack
ItemCommand.getStackInSlotFromInventoryAt
(ServerCommandSource source, BlockPos pos, int slotId) private static ItemStack
ItemCommand.getStackWithModifier
(ServerCommandSource source, RegistryEntry<LootFunction> lootFunction, ItemStack stack) Modifier and TypeMethodDescriptionprivate static int
ItemCommand.executeBlockReplace
(ServerCommandSource source, BlockPos pos, int slot, ItemStack stack) private static int
ItemCommand.executeEntityReplace
(ServerCommandSource source, Collection<? extends Entity> targets, int slot, ItemStack stack) private static int
LootCommand.executeFish
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, RegistryEntry<LootTable> lootTable, BlockPos pos, ItemStack stack, LootCommand.Target constructor) private static int
LootCommand.executeMine
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, BlockPos pos, ItemStack stack, LootCommand.Target constructor) private static ItemStack
ItemCommand.getStackWithModifier
(ServerCommandSource source, RegistryEntry<LootFunction> lootFunction, ItemStack stack) private static boolean
private static boolean
LootCommand.itemsMatch
(ItemStack first, ItemStack second) Modifier and TypeMethodDescriptionvoid
int
LootCommand.Target.accept
(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, List<ItemStack> items, LootCommand.FeedbackMessage messageSender) private static int
ExecuteCommand.countMatchingItems
(Iterable<? extends Entity> entities, SlotRange slotRange, Predicate<ItemStack> predicate) private static int
ExecuteCommand.countMatchingItems
(ServerCommandSource source, BlockPos pos, SlotRange slotRange, Predicate<ItemStack> predicate) private static int
ClearCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Predicate<ItemStack> item) private static int
ClearCommand.execute
(ServerCommandSource source, Collection<ServerPlayerEntity> targets, Predicate<ItemStack> item, int maxCount) private static int
LootCommand.executeBlock
(ServerCommandSource source, BlockPos targetPos, int slot, int stackCount, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static int
LootCommand.executeGive
(Collection<ServerPlayerEntity> players, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static int
LootCommand.executeInsert
(ServerCommandSource source, BlockPos targetPos, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static int
LootCommand.executeReplace
(Collection<? extends Entity> targets, int slot, int stackCount, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static int
LootCommand.executeSpawn
(ServerCommandSource source, Vec3d pos, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender) private static void
LootCommand.replace
(Entity entity, List<ItemStack> stacks, int slot, int stackCount, List<ItemStack> addedStacks) private static void
LootCommand.sendDroppedFeedback
(ServerCommandSource source, List<ItemStack> stacks) private static void
LootCommand.sendDroppedFeedback
(ServerCommandSource source, List<ItemStack> stacks, RegistryKey<LootTable> lootTable) -
Uses of ItemStack in net.minecraft.server.network
Modifier and TypeMethodDescriptionvoid
ServerPlayerEntity.applyEnchantmentCosts
(ItemStack enchantedItem, int experienceLevels) private static boolean
ServerPlayNetworkHandler.canPlace
(ServerPlayerEntity player, ItemStack stack) Checks if a player can place a block or fluid from a bucket.private @Nullable ItemEntity
ServerPlayerEntity.dropPlayerItem
(ItemStack stack, boolean throwRandomly, boolean retainOwnership) void
ServerPlayerEntity.giveOrDropStack
(ItemStack stack) DemoServerPlayerInteractionManager.interactBlock
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand, BlockHitResult hitResult) ServerPlayerInteractionManager.interactBlock
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand, BlockHitResult hitResult) DemoServerPlayerInteractionManager.interactItem
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand) ServerPlayerInteractionManager.interactItem
(ServerPlayerEntity player, World world, ItemStack stack, Hand hand) private void
ServerPlayerEntity.sendMapPacket
(ItemStack stack) protected void
ServerPlayerEntity.tickItemStackUsage
(ItemStack stack) void
Called when the player uses (defaults to right click) a writable or written book item.Modifier and TypeMethodDescriptionvoid
ServerPlayerEntity.onRecipeCrafted
(RecipeEntry<?> recipe, List<ItemStack> ingredients) -
Uses of ItemStack in net.minecraft.test
Modifier and TypeMethodDescriptionprivate static ItemStack
StructureTestListener.createBookWithText
(String text, boolean required, String output) Modifier and TypeMethodDescriptionvoid
TestContext.useStackOnBlock
(PlayerEntity player, ItemStack stack, BlockPos pos, Direction direction) -
Uses of ItemStack in net.minecraft.text
-
Uses of ItemStack in net.minecraft.util
Modifier and TypeFieldDescriptionActionResult.ItemContext.newHandStack
The field for thenewHandStack
record component.Modifier and TypeMethodDescriptionActionResult.Success.getNewHandStack()
Returns the item stack that should replace the hand stack after this interaction, if any.ActionResult.ItemContext.newHandStack()
Returns the value of thenewHandStack
record component.Modifier and TypeMethodDescriptionstatic void
Spawns an item entity ofstack
around the given position.ActionResult.Success.withNewHandStack
(ItemStack newHandStack) Modifier and TypeMethodDescriptionstatic void
ItemScatterer.spawn
(World world, BlockPos pos, DefaultedList<ItemStack> stacks) Spawns item entities fromstacks
aroundpos
. -
Uses of ItemStack in net.minecraft.village
Modifier and TypeFieldDescriptionprivate final ItemStack
TradedItem.itemStack
The field for theitemStack
record component.private final ItemStack
TradeOffers.ProcessItemFactory.processed
private final ItemStack
TradeOffers.SellItemFactory.sell
private final ItemStack
TradeOffers.SellPotionHoldingItemFactory.sell
private final ItemStack
TradeOffer.sellItem
private final ItemStack
TradeOffers.SellEnchantedToolFactory.tool
Modifier and TypeFieldDescriptionprivate final DefaultedList
<ItemStack> MerchantInventory.inventory
Modifier and TypeMethodDescriptionTradeOffer.copySellItem()
Returns a copy of the sell item of this trade offer.private static ItemStack
TradedItem.createDisplayStack
(RegistryEntry<Item> item, int count, ComponentPredicate components) private static ItemStack
TradeOffers.createPotionStack
(RegistryEntry<Potion> potion) TradeOffer.getDisplayedFirstBuyItem()
Returns a copy of the first buy item of this trade offer, with its price adjusted depending on the demand bonus, the special price and the price multiplier.TradeOffer.getDisplayedSecondBuyItem()
Returns the second buy item of this trade offer.TradeOffer.getOriginalFirstBuyItem()
Returns the first buy item of this trade offer.TradeOffer.getSellItem()
Returns the sell item of this trade offer.MerchantInventory.getStack
(int slot) Returns the stack currently stored atslot
.TradedItem.itemStack()
Returns the value of theitemStack
record component.MerchantInventory.removeStack
(int slot) Removes the stack currently stored atslot
.MerchantInventory.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.Modifier and TypeMethodDescriptionboolean
TradeOffer.depleteBuyItems
(ItemStack firstBuyStack, ItemStack secondBuyStack) TradeOfferList.getValidOffer
(ItemStack firstBuyItem, ItemStack secondBuyItem, int index) boolean
boolean
TradeOffer.matchesBuyItems
(ItemStack stack, ItemStack buyItem) void
Merchant.onSellingItem
(ItemStack stack) void
SimpleMerchant.onSellingItem
(ItemStack stack) void
Sets the stack stored atslot
tostack
.ModifierConstructorDescriptionprivate
ProcessItemFactory
(ItemConvertible item, int count, int price, ItemStack processed, int processedCount, int maxUses, int experience, float multiplier) ProcessItemFactory
(TradedItem toBeProcessed, int count, ItemStack processed, int maxUses, int processedCount, float multiplier, Optional<RegistryKey<EnchantmentProvider>> enchantmentProviderKey) SellItemFactory
(ItemStack stack, int price, int count, int maxUses, int experience) SellItemFactory
(ItemStack stack, int price, int count, int maxUses, int experience, float multiplier) SellItemFactory
(ItemStack sell, int price, int count, int maxUses, int experience, float multiplier, Optional<RegistryKey<EnchantmentProvider>> enchantmentProviderKey) TradedItem
(RegistryEntry<Item> registryEntry, int int2, ComponentPredicate componentPredicate, ItemStack itemStack) private
TradeOffer
(TradedItem firstBuyItem, Optional<TradedItem> secondBuyItem, ItemStack sellItem, int uses, int maxUses, boolean rewardingPlayerExperience, int specialPrice, int demandBonus, float priceMultiplier, int merchantExperience) TradeOffer
(TradedItem firstBuyItem, Optional<TradedItem> secondBuyItem, ItemStack sellItem, int maxUses, int merchantExperience, float priceMultiplier) TradeOffer
(TradedItem firstBuyItem, Optional<TradedItem> secondBuyItem, ItemStack sellItem, int uses, int maxUses, int merchantExperience, float priceMultiplier) TradeOffer
(TradedItem firstBuyItem, Optional<TradedItem> secondBuyItem, ItemStack sellItem, int uses, int maxUses, int merchantExperience, float priceMultiplier, int demandBonus) TradeOffer
(TradedItem buyItem, ItemStack sellItem, int maxUses, int merchantExperience, float priceMultiplier) -
Uses of ItemStack in net.minecraft.village.raid
Modifier and TypeMethodDescriptionstatic ItemStack
Raid.createOminousBanner
(RegistryEntryLookup<BannerPattern> bannerPatternLookup) -
Uses of ItemStack in net.minecraft.world.explosion
Modifier and TypeMethodDescriptionprivate static void
ExplosionImpl.addDroppedItem
(List<ExplosionImpl.DroppedItem> droppedItemsOut, ItemStack item, BlockPos pos) void