Uses of Class
net.minecraft.world.level.storage.loot.LootContext
Packages that use LootContext
Package
Description
-
Uses of LootContext in net.minecraft.advancements.critereon
Fields in net.minecraft.advancements.critereon with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final Predicate
<LootContext> ContextAwarePredicate.compositePredicates
Methods in net.minecraft.advancements.critereon that return LootContextModifier and TypeMethodDescriptionstatic LootContext
EntityPredicate.createContext
(ServerPlayer player, Entity entity) Methods in net.minecraft.advancements.critereon with parameters of type LootContextModifier and TypeMethodDescriptionboolean
AnyBlockInteractionTrigger.TriggerInstance.matches
(LootContext context) private static boolean
BredAnimalsTrigger.TriggerInstance.matches
(Optional<ContextAwarePredicate> predicate, LootContext context) boolean
BredAnimalsTrigger.TriggerInstance.matches
(LootContext parentContext, LootContext partnerContext, LootContext childContext) boolean
ContextAwarePredicate.matches
(LootContext context) boolean
CuredZombieVillagerTrigger.TriggerInstance.matches
(LootContext zombie, LootContext villager) boolean
DefaultBlockInteractionTrigger.TriggerInstance.matches
(LootContext context) boolean
EffectsChangedTrigger.TriggerInstance.matches
(ServerPlayer player, LootContext lootContext) boolean
FallAfterExplosionTrigger.TriggerInstance.matches
(ServerLevel level, Vec3 startPosition, Vec3 endPosition, LootContext context) boolean
FishingRodHookedTrigger.TriggerInstance.matches
(ItemStack rod, LootContext context, Collection<ItemStack> stacks) boolean
ItemUsedOnLocationTrigger.TriggerInstance.matches
(LootContext context) boolean
KilledTrigger.TriggerInstance.matches
(ServerPlayer player, LootContext context, DamageSource source) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext playerContext, List<LootContext> entityContexts) boolean
PickedUpItemTrigger.TriggerInstance.matches
(ServerPlayer player, ItemStack stack, LootContext context) boolean
PlayerHurtEntityTrigger.TriggerInstance.matches
(ServerPlayer player, LootContext context, DamageSource damage, float dealt, float taken, boolean blocked) boolean
PlayerInteractTrigger.TriggerInstance.matches
(ItemStack item, LootContext lootContext) boolean
SummonedEntityTrigger.TriggerInstance.matches
(LootContext lootContext) boolean
TameAnimalTrigger.TriggerInstance.matches
(LootContext lootContext) boolean
TargetBlockTrigger.TriggerInstance.matches
(LootContext context, Vec3 vector, int signalStrength) boolean
TradeTrigger.TriggerInstance.matches
(LootContext context, ItemStack stack) Method parameters in net.minecraft.advancements.critereon with type arguments of type LootContextModifier and TypeMethodDescriptionboolean
ChanneledLightningTrigger.TriggerInstance.matches
(Collection<? extends LootContext> victims) boolean
KilledByCrossbowTrigger.TriggerInstance.matches
(Collection<LootContext> contexts, int bounds) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext playerContext, List<LootContext> entityContexts) -
Uses of LootContext in net.minecraft.world.item.enchantment
Methods in net.minecraft.world.item.enchantment that return LootContextModifier and TypeMethodDescriptionstatic LootContext
Enchantment.blockHitContext
(ServerLevel level, int enchantmentLevel, Entity entity, Vec3 origin, BlockState state) static LootContext
Enchantment.damageContext
(ServerLevel level, int enchantmentLevel, Entity entity, DamageSource damageSource) static LootContext
Enchantment.entityContext
(ServerLevel level, int enchantmentLevel, Entity entity, Vec3 origin) static LootContext
Enchantment.itemContext
(ServerLevel level, int enchantmentLevel, ItemStack tool) static LootContext
Enchantment.locationContext
(ServerLevel level, int enchantmentLevel, Entity entity, boolean enchantmentActive) Methods in net.minecraft.world.item.enchantment with parameters of type LootContextModifier and TypeMethodDescriptionstatic <T> void
Enchantment.applyEffects
(List<ConditionalEffect<T>> effects, LootContext context, Consumer<T> applier) boolean
ConditionalEffect.matches
(LootContext context) boolean
TargetedConditionalEffect.matches
(LootContext context) -
Uses of LootContext in net.minecraft.world.level.storage.loot
Fields in net.minecraft.world.level.storage.loot with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootPool.compositeCondition
private final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.compositeFunction
Methods in net.minecraft.world.level.storage.loot that return LootContextModifier and TypeMethodDescriptionLootContext.Builder.create
(Optional<ResourceLocation> sequence) Methods in net.minecraft.world.level.storage.loot with parameters of type LootContextModifier and TypeMethodDescriptionprivate void
LootPool.addRandomItem
(Consumer<ItemStack> stackConsumer, LootContext context) void
LootPool.addRandomItems
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the random items from this LootPool to the givenstackConsumer
.int
IntRange.IntLimiter.apply
(LootContext lootContext, int value) int
IntRange.clamp
(LootContext lootContext, int value) Clamp the given value so that it falls within this IntRange.private it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootContext context) Generate random items to a List.void
LootTable.getRandomItems
(LootContext contextData, Consumer<ItemStack> output) Generate random items to the given Consumer, ensuring they do not exceed their maximum stack size.void
LootTable.getRandomItemsRaw
(LootContext context, Consumer<ItemStack> output) Deprecated.boolean
IntRange.IntChecker.test
(LootContext lootContext, int value) boolean
IntRange.test
(LootContext lootContext, int value) Check whether the given value falls within this IntRange.Constructors in net.minecraft.world.level.storage.loot with parameters of type LootContext -
Uses of LootContext in net.minecraft.world.level.storage.loot.entries
Fields in net.minecraft.world.level.storage.loot.entries with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootPoolEntryContainer.compositeCondition
(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LootPoolSingletonContainer.compositeFunction
Methods in net.minecraft.world.level.storage.loot.entries with parameters of type LootContextModifier and TypeMethodDescriptionprotected final boolean
LootPoolEntryContainer.canRun
(LootContext lootContext) void
DynamicLoot.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.void
EmptyLootItem.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.void
LootItem.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.void
LootPoolEntry.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.protected abstract void
LootPoolSingletonContainer.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.void
NestedLootTable.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.void
TagEntry.createItemStack
(Consumer<ItemStack> stackConsumer, LootContext lootContext) Generate the loot stacks of this entry.boolean
ComposableEntryContainer.expand
(LootContext lootContext, Consumer<LootPoolEntry> entryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesfinal boolean
CompositeEntryBase.expand
(LootContext lootContext, Consumer<LootPoolEntry> entryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesboolean
LootPoolSingletonContainer.expand
(LootContext lootContext, Consumer<LootPoolEntry> entryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesboolean
TagEntry.expand
(LootContext lootContext, Consumer<LootPoolEntry> entryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesprivate boolean
TagEntry.expandTag
(LootContext context, Consumer<LootPoolEntry> generatorConsumer) -
Uses of LootContext in net.minecraft.world.level.storage.loot.functions
Fields in net.minecraft.world.level.storage.loot.functions with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> SequenceFunction.compositeFunction
private final Predicate
<LootContext> LootItemConditionalFunction.compositePredicates
static final BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITY
Methods in net.minecraft.world.level.storage.loot.functions that return types with arguments of type LootContextModifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> functions) Methods in net.minecraft.world.level.storage.loot.functions with parameters of type LootContextModifier and TypeMethodDescriptionfinal ItemStack
LootItemConditionalFunction.apply
(ItemStack stack, LootContext context) SequenceFunction.apply
(ItemStack stack, LootContext context) static UnaryOperator
<Component> SetNameFunction.createResolver
(LootContext lootContext, LootContext.EntityTarget resolutionContext) Create a UnaryOperator that resolves Components based on the given LootContext and EntityTarget.LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> stackModification, Consumer<ItemStack> originalConsumer, LootContext lootContext) Create a decorated Consumer.CopyComponentsFunction.Source.get
(LootContext context) ApplyBonusCount.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.ApplyExplosionDecay.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
CopyBlockState.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.CopyComponentsFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.CopyCustomDataFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.CopyNameFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.EnchantedCountIncreaseFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.EnchantRandomlyFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.EnchantWithLevelsFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.ExplorationMapFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.FillPlayerHead.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.FilteredFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
FunctionReference.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.LimitCount.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected abstract ItemStack
LootItemConditionalFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetAttributesFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBannerPatternFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBookCoverFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetComponentsFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetContainerContents.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetContainerLootTable.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetCustomDataFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetCustomModelDataFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetEnchantmentsFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworkExplosionFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworksFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetInstrumentFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetItemCountFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetItemDamageFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetItemFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetNameFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetOminousBottleAmplifierFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetPotionFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetStewEffectFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWritableBookPagesFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWrittenBookPagesFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SmeltItemFunction.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
ToggleTooltips.run
(ItemStack stack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.updateLore
(ItemLore itemLore, LootContext context) private ItemAttributeModifiers
SetAttributesFunction.updateModifiers
(LootContext context, ItemAttributeModifiers modifiers) Method parameters in net.minecraft.world.level.storage.loot.functions with type arguments of type LootContextModifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> functions) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> stackModification, Consumer<ItemStack> originalConsumer, LootContext lootContext) Create a decorated Consumer. -
Uses of LootContext in net.minecraft.world.level.storage.loot.predicates
Fields in net.minecraft.world.level.storage.loot.predicates with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final Predicate
<LootContext> CompositeLootItemCondition.composedPredicate
Methods in net.minecraft.world.level.storage.loot.predicates with parameters of type LootContextModifier and TypeMethodDescriptionprotected boolean
EntityHasScoreCondition.hasScore
(LootContext lootContext, Entity targetEntity, Scoreboard scoreboard, String objectiveName, IntRange scoreRange) boolean
BonusLevelTableCondition.test
(LootContext context) final boolean
CompositeLootItemCondition.test
(LootContext context) boolean
ConditionReference.test
(LootContext context) boolean
DamageSourceCondition.test
(LootContext context) boolean
EnchantmentActiveCheck.test
(LootContext context) boolean
EntityHasScoreCondition.test
(LootContext context) boolean
ExplosionCondition.test
(LootContext context) boolean
InvertedLootItemCondition.test
(LootContext context) boolean
LocationCheck.test
(LootContext context) boolean
LootItemBlockStatePropertyCondition.test
(LootContext context) boolean
LootItemEntityPropertyCondition.test
(LootContext context) boolean
LootItemKilledByPlayerCondition.test
(LootContext context) boolean
LootItemRandomChanceCondition.test
(LootContext context) boolean
LootItemRandomChanceWithEnchantedBonusCondition.test
(LootContext context) boolean
MatchTool.test
(LootContext context) boolean
TimeCheck.test
(LootContext context) boolean
ValueCheckCondition.test
(LootContext context) boolean
WeatherCheck.test
(LootContext context) Constructor parameters in net.minecraft.world.level.storage.loot.predicates with type arguments of type LootContextModifierConstructorDescriptionprotected
CompositeLootItemCondition
(List<LootItemCondition> terms, Predicate<LootContext> composedPredicate) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.nbt
Methods in net.minecraft.world.level.storage.loot.providers.nbt with parameters of type LootContextModifier and TypeMethodDescriptionContextNbtProvider.get
(LootContext lootContext) ContextNbtProvider.Getter.get
(LootContext lootContext) NbtProvider.get
(LootContext lootContext) StorageNbtProvider.get
(LootContext lootContext) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.number
Methods in net.minecraft.world.level.storage.loot.providers.number with parameters of type LootContextModifier and TypeMethodDescriptionfloat
BinomialDistributionGenerator.getFloat
(LootContext lootContext) float
ConstantValue.getFloat
(LootContext lootContext) float
EnchantmentLevelProvider.getFloat
(LootContext lootContext) float
NumberProvider.getFloat
(LootContext lootContext) float
ScoreboardValue.getFloat
(LootContext lootContext) float
StorageValue.getFloat
(LootContext lootContext) float
UniformGenerator.getFloat
(LootContext lootContext) int
BinomialDistributionGenerator.getInt
(LootContext lootContext) default int
NumberProvider.getInt
(LootContext lootContext) int
StorageValue.getInt
(LootContext lootContext) int
UniformGenerator.getInt
(LootContext lootContext) private Optional
<NumericTag> StorageValue.getNumericTag
(LootContext context) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.score
Methods in net.minecraft.world.level.storage.loot.providers.score with parameters of type LootContextModifier and TypeMethodDescriptionContextScoreboardNameProvider.getScoreHolder
(LootContext context) FixedScoreboardNameProvider.getScoreHolder
(LootContext context) ScoreboardNameProvider.getScoreHolder
(LootContext context) -
Uses of LootContext in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common with parameters of type LootContextModifier and TypeMethodDescriptionCommonHooks.modifyLoot
(List<ItemStack> list, LootContext context) Deprecated.static it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> CommonHooks.modifyLoot
(ResourceLocation lootTableId, it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Handles the modification of loot table drops via the registered Global Loot Modifiers, so that custom effects can be processed. -
Uses of LootContext in net.neoforged.neoforge.common.loot
Fields in net.neoforged.neoforge.common.loot with type parameters of type LootContextModifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootModifier.combinedConditions
Methods in net.neoforged.neoforge.common.loot with parameters of type LootContextModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> IGlobalLootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the list of generated loot.final it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.apply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> AddTableLootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) protected abstract it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the generated loot (all loot conditions have already been checked and have returned true).boolean
CanItemPerformAbility.test
(LootContext lootContext) boolean
LootTableIdCondition.test
(LootContext lootContext)
CommonHooks.modifyLoot(ResourceLocation, ObjectArrayList, LootContext)
instead.