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 pPlayer, Entity pEntity) Methods in net.minecraft.advancements.critereon with parameters of type LootContextModifier and TypeMethodDescriptionboolean
AnyBlockInteractionTrigger.TriggerInstance.matches
(LootContext pContext) private static boolean
BredAnimalsTrigger.TriggerInstance.matches
(Optional<ContextAwarePredicate> pPredicate, LootContext pContext) boolean
BredAnimalsTrigger.TriggerInstance.matches
(LootContext pParentContext, LootContext pPartnerContext, LootContext pChildContext) boolean
ContextAwarePredicate.matches
(LootContext pContext) boolean
CuredZombieVillagerTrigger.TriggerInstance.matches
(LootContext pZombie, LootContext pVillager) boolean
DefaultBlockInteractionTrigger.TriggerInstance.matches
(LootContext pContext) boolean
EffectsChangedTrigger.TriggerInstance.matches
(ServerPlayer pPlayer, LootContext pLootContext) boolean
FallAfterExplosionTrigger.TriggerInstance.matches
(ServerLevel pLevel, Vec3 pStartPosition, Vec3 pEndPosition, LootContext pContext) boolean
FishingRodHookedTrigger.TriggerInstance.matches
(ItemStack pRod, LootContext pContext, Collection<ItemStack> pStacks) boolean
ItemUsedOnLocationTrigger.TriggerInstance.matches
(LootContext pContext) boolean
KilledTrigger.TriggerInstance.matches
(ServerPlayer pPlayer, LootContext pContext, DamageSource pSource) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext pPlayerContext, List<LootContext> pEntityContexts) boolean
PickedUpItemTrigger.TriggerInstance.matches
(ServerPlayer pPlayer, ItemStack pStack, LootContext pContext) boolean
PlayerHurtEntityTrigger.TriggerInstance.matches
(ServerPlayer pPlayer, LootContext pContext, DamageSource pDamage, float pDealt, float pTaken, boolean pBlocked) boolean
PlayerInteractTrigger.TriggerInstance.matches
(ItemStack pItem, LootContext pLootContext) boolean
SummonedEntityTrigger.TriggerInstance.matches
(LootContext pLootContext) boolean
TameAnimalTrigger.TriggerInstance.matches
(LootContext pLootContext) boolean
TargetBlockTrigger.TriggerInstance.matches
(LootContext pContext, Vec3 pVector, int pSignalStrength) boolean
TradeTrigger.TriggerInstance.matches
(LootContext pContext, ItemStack pStack) Method parameters in net.minecraft.advancements.critereon with type arguments of type LootContextModifier and TypeMethodDescriptionboolean
ChanneledLightningTrigger.TriggerInstance.matches
(Collection<? extends LootContext> pVictims) boolean
KilledByCrossbowTrigger.TriggerInstance.matches
(Collection<LootContext> pContexts, int pBounds) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext pPlayerContext, List<LootContext> pEntityContexts) -
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 pLevel, int pEnchantmentLevel, Entity pEntity, Vec3 pOrigin, BlockState pState) static LootContext
Enchantment.damageContext
(ServerLevel pLevel, int pEnchantmentLevel, Entity pEntity, DamageSource pDamageSource) static LootContext
Enchantment.entityContext
(ServerLevel pLevel, int pEnchantmentLevel, Entity pEntity, Vec3 pOrigin) static LootContext
Enchantment.itemContext
(ServerLevel pLevel, int pEnchantmentLevel, ItemStack pTool) static LootContext
Enchantment.locationContext
(ServerLevel pLevel, int pEnchantmentLevel, Entity pEntity, boolean pEnchantmentActive) Methods in net.minecraft.world.item.enchantment with parameters of type LootContextModifier and TypeMethodDescriptionstatic <T> void
Enchantment.applyEffects
(List<ConditionalEffect<T>> pEffects, LootContext pContext, Consumer<T> pApplier) boolean
ConditionalEffect.matches
(LootContext pContext) boolean
TargetedConditionalEffect.matches
(LootContext pContext) -
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> pSequence) Methods in net.minecraft.world.level.storage.loot with parameters of type LootContextModifier and TypeMethodDescriptionprivate void
LootPool.addRandomItem
(Consumer<ItemStack> pStackConsumer, LootContext pContext) void
LootPool.addRandomItems
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the random items from this LootPool to the givenstackConsumer
.int
IntRange.IntLimiter.apply
(LootContext pLootContext, int pValue) int
IntRange.clamp
(LootContext pLootContext, int pValue) Clamp the given value so that it falls within this IntRange.private it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootContext p_230923_) void
LootTable.getRandomItems
(LootContext pContextData, Consumer<ItemStack> pOutput) Generate random items to the given Consumer, ensuring they do not exceed their maximum stack size.void
LootTable.getRandomItemsRaw
(LootContext pContext, Consumer<ItemStack> pOutput) Deprecated.boolean
IntRange.IntChecker.test
(LootContext pLootContext, int pValue) boolean
IntRange.test
(LootContext pLootContext, int pValue) 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 pLootContext) void
DynamicLoot.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
EmptyLootItem.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
LootItem.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
LootPoolEntry.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.protected abstract void
LootPoolSingletonContainer.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
NestedLootTable.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.void
TagEntry.createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.boolean
ComposableEntryContainer.expand
(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesfinal boolean
CompositeEntryBase.expand
(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesboolean
LootPoolSingletonContainer.expand
(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesboolean
TagEntry.expand
(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesprivate boolean
TagEntry.expandTag
(LootContext pContext, Consumer<LootPoolEntry> pGeneratorConsumer) -
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>> pFunctions) Methods in net.minecraft.world.level.storage.loot.functions with parameters of type LootContextModifier and TypeMethodDescriptionfinal ItemStack
LootItemConditionalFunction.apply
(ItemStack pStack, LootContext pContext) SequenceFunction.apply
(ItemStack pStack, LootContext pContext) static UnaryOperator
<Component> SetNameFunction.createResolver
(LootContext pLootContext, LootContext.EntityTarget pResolutionContext) Create a UnaryOperator that resolves Components based on the given LootContext and EntityTarget.LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) Create a decorated Consumer.CopyComponentsFunction.Source.get
(LootContext pContext) ApplyBonusCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ApplyExplosionDecay.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
CopyBlockState.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.CopyNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantedCountIncreaseFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantRandomlyFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.EnchantWithLevelsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ExplorationMapFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FillPlayerHead.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.FilteredFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
FunctionReference.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.LimitCount.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected abstract ItemStack
LootItemConditionalFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.ModifyContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetAttributesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBannerPatternFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetBookCoverFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetComponentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerContents.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetContainerLootTable.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetCustomModelDataFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetEnchantmentsFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworkExplosionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetFireworksFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetInstrumentFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemCountFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemDamageFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetNameFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetOminousBottleAmplifierFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetPotionFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetStewEffectFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWritableBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
SetWrittenBookPagesFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SmeltItemFunction.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.protected ItemStack
ToggleTooltips.run
(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.SetLoreFunction.updateLore
(ItemLore pItemLore, LootContext pContext) private ItemAttributeModifiers
SetAttributesFunction.updateModifiers
(LootContext pContext, ItemAttributeModifiers pModifiers) 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>> pFunctions) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> pStackModification, Consumer<ItemStack> pOriginalConsumer, LootContext pLootContext) 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 pLootContext, Entity pTargetEntity, Scoreboard pScoreboard, String pObjectiveName, IntRange pScoreRange) boolean
BonusLevelTableCondition.test
(LootContext pContext) final boolean
CompositeLootItemCondition.test
(LootContext pContext) boolean
ConditionReference.test
(LootContext pContext) boolean
DamageSourceCondition.test
(LootContext pContext) boolean
EnchantmentActiveCheck.test
(LootContext pContext) boolean
EntityHasScoreCondition.test
(LootContext pContext) boolean
ExplosionCondition.test
(LootContext pContext) boolean
InvertedLootItemCondition.test
(LootContext pContext) boolean
LocationCheck.test
(LootContext pContext) boolean
LootItemBlockStatePropertyCondition.test
(LootContext pContext) boolean
LootItemEntityPropertyCondition.test
(LootContext pContext) boolean
LootItemKilledByPlayerCondition.test
(LootContext pContext) boolean
LootItemRandomChanceCondition.test
(LootContext pContext) boolean
LootItemRandomChanceWithEnchantedBonusCondition.test
(LootContext pContext) boolean
MatchTool.test
(LootContext pContext) boolean
TimeCheck.test
(LootContext pContext) boolean
ValueCheckCondition.test
(LootContext pContext) boolean
WeatherCheck.test
(LootContext pContext) Constructor parameters in net.minecraft.world.level.storage.loot.predicates with type arguments of type LootContextModifierConstructorDescriptionprotected
CompositeLootItemCondition
(List<LootItemCondition> pTerms, Predicate<LootContext> pComposedPredicate) -
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 pLootContext) ContextNbtProvider.Getter.get
(LootContext pLootContext) NbtProvider.get
(LootContext pLootContext) StorageNbtProvider.get
(LootContext pLootContext) -
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 pLootContext) float
ConstantValue.getFloat
(LootContext pLootContext) float
EnchantmentLevelProvider.getFloat
(LootContext pLootContext) float
NumberProvider.getFloat
(LootContext pLootContext) float
ScoreboardValue.getFloat
(LootContext pLootContext) float
StorageValue.getFloat
(LootContext pLootContext) float
UniformGenerator.getFloat
(LootContext pLootContext) int
BinomialDistributionGenerator.getInt
(LootContext pLootContext) default int
NumberProvider.getInt
(LootContext pLootContext) int
StorageValue.getInt
(LootContext pLootContext) int
UniformGenerator.getInt
(LootContext pLootContext) private Optional
<NumericTag> StorageValue.getNumericTag
(LootContext pContext) -
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 pContext) FixedScoreboardNameProvider.getScoreHolder
(LootContext pContext) ScoreboardNameProvider.getScoreHolder
(LootContext pContext) -
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) -
Uses of LootContext in net.neoforged.neoforge.debug.loot
Methods in net.neoforged.neoforge.debug.loot with parameters of type LootContextModifier and TypeMethodDescriptionprotected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.DungeonLootEnhancerModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SilkTouchTestModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.SmeltingEnchantmentModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> GlobalLootModifiersTest.WheatSeedsConverterModifier.doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) private static ItemStack
GlobalLootModifiersTest.SmeltingEnchantmentModifier.smelt
(ItemStack stack, LootContext context) -
Uses of LootContext in net.neoforged.testframework.condition
Methods in net.neoforged.testframework.condition with parameters of type LootContext
CommonHooks.modifyLoot(ResourceLocation, ObjectArrayList, LootContext)
instead.