Uses of Class
net.minecraft.world.level.storage.loot.LootContext
Package
Description
-
Uses of LootContext in net.minecraft.advancements.critereon
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> ContextAwarePredicate.compositePredicates
Modifier and TypeMethodDescriptionstatic LootContext
EntityPredicate.createContext
(ServerPlayer p_36617_, Entity p_36618_) Modifier and TypeMethodDescriptionboolean
AnyBlockInteractionTrigger.TriggerInstance.matches
(LootContext p_320453_) private static boolean
BredAnimalsTrigger.TriggerInstance.matches
(Optional<ContextAwarePredicate> p_298925_, LootContext p_298317_) boolean
BredAnimalsTrigger.TriggerInstance.matches
(LootContext p_18676_, LootContext p_18677_, LootContext p_18678_) boolean
ContextAwarePredicate.matches
(LootContext p_286260_) boolean
CuredZombieVillagerTrigger.TriggerInstance.matches
(LootContext p_24300_, LootContext p_24301_) boolean
DefaultBlockInteractionTrigger.TriggerInstance.matches
(LootContext p_320120_) boolean
EffectsChangedTrigger.TriggerInstance.matches
(ServerPlayer p_149275_, LootContext p_149276_) boolean
FallAfterExplosionTrigger.TriggerInstance.matches
(ServerLevel p_335990_, Vec3 p_335477_, Vec3 p_336025_, LootContext p_335849_) boolean
FishingRodHookedTrigger.TriggerInstance.matches
(ItemStack p_40444_, LootContext p_40445_, Collection<ItemStack> p_40446_) boolean
ItemUsedOnLocationTrigger.TriggerInstance.matches
(LootContext p_286800_) boolean
KilledTrigger.TriggerInstance.matches
(ServerPlayer p_48131_, LootContext p_48132_, DamageSource p_48133_) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext p_153419_, List<LootContext> p_153420_) boolean
PickedUpItemTrigger.TriggerInstance.matches
(ServerPlayer p_221323_, ItemStack p_221324_, LootContext p_221325_) boolean
PlayerHurtEntityTrigger.TriggerInstance.matches
(ServerPlayer p_60143_, LootContext p_60144_, DamageSource p_60145_, float p_60146_, float p_60147_, boolean p_60148_) boolean
PlayerInteractTrigger.TriggerInstance.matches
(ItemStack p_61522_, LootContext p_61523_) boolean
SummonedEntityTrigger.TriggerInstance.matches
(LootContext p_68280_) boolean
TameAnimalTrigger.TriggerInstance.matches
(LootContext p_68853_) boolean
TargetBlockTrigger.TriggerInstance.matches
(LootContext p_70242_, Vec3 p_70243_, int p_70244_) boolean
TradeTrigger.TriggerInstance.matches
(LootContext p_70985_, ItemStack p_70986_) Modifier and TypeMethodDescriptionboolean
ChanneledLightningTrigger.TriggerInstance.matches
(Collection<? extends LootContext> p_21745_) boolean
KilledByCrossbowTrigger.TriggerInstance.matches
(Collection<LootContext> p_46898_, int p_46899_) boolean
LightningStrikeTrigger.TriggerInstance.matches
(LootContext p_153419_, List<LootContext> p_153420_) -
Uses of LootContext in net.minecraft.world.item.enchantment
Modifier and TypeMethodDescriptionstatic LootContext
Enchantment.blockHitContext
(ServerLevel p_350329_, int p_350503_, Entity p_350451_, Vec3 p_350874_, BlockState p_350311_) static LootContext
Enchantment.damageContext
(ServerLevel p_346018_, int p_345520_, Entity p_345257_, DamageSource p_346340_) static LootContext
Enchantment.entityContext
(ServerLevel p_346134_, int p_346059_, Entity p_346146_, Vec3 p_345814_) static LootContext
Enchantment.itemContext
(ServerLevel p_345514_, int p_345186_, ItemStack p_344997_) static LootContext
Enchantment.locationContext
(ServerLevel p_345134_, int p_346182_, Entity p_345416_, boolean p_345862_) Modifier and TypeMethodDescriptionstatic <T> void
Enchantment.applyEffects
(List<ConditionalEffect<T>> p_345860_, LootContext p_345578_, Consumer<T> p_346164_) boolean
ConditionalEffect.matches
(LootContext p_344977_) boolean
TargetedConditionalEffect.matches
(LootContext p_346180_) -
Uses of LootContext in net.minecraft.world.level.storage.loot
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootPool.compositeCondition
private final BiFunction
<ItemStack, LootContext, ItemStack> LootPool.compositeFunction
private final BiFunction
<ItemStack, LootContext, ItemStack> LootTable.compositeFunction
Modifier and TypeMethodDescriptionLootContext.Builder.create
(Optional<ResourceLocation> p_298622_) Modifier and TypeMethodDescriptionprivate void
LootPool.addRandomItem
(Consumer<ItemStack> p_79059_, LootContext p_79060_) void
LootPool.addRandomItems
(Consumer<ItemStack> p_79054_, LootContext p_79055_) int
IntRange.IntLimiter.apply
(LootContext p_165060_, int p_165061_) int
IntRange.clamp
(LootContext p_165015_, int p_165016_) private it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> LootTable.getRandomItems
(LootContext p_230923_) void
LootTable.getRandomItems
(LootContext p_79149_, Consumer<ItemStack> p_79150_) void
LootTable.getRandomItemsRaw
(LootContext p_79132_, Consumer<ItemStack> p_79133_) Deprecated.boolean
IntRange.IntChecker.test
(LootContext p_165057_, int p_165058_) boolean
IntRange.test
(LootContext p_165029_, int p_165030_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.entries
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootPoolEntryContainer.compositeCondition
(package private) final BiFunction
<ItemStack, LootContext, ItemStack> LootPoolSingletonContainer.compositeFunction
Modifier and TypeMethodDescriptionprotected final boolean
LootPoolEntryContainer.canRun
(LootContext p_79640_) void
DynamicLoot.createItemStack
(Consumer<ItemStack> p_79481_, LootContext p_79482_) void
EmptyLootItem.createItemStack
(Consumer<ItemStack> p_79531_, LootContext p_79532_) void
LootItem.createItemStack
(Consumer<ItemStack> p_79590_, LootContext p_79591_) void
LootPoolEntry.createItemStack
(Consumer<ItemStack> p_79633_, LootContext p_79634_) protected abstract void
LootPoolSingletonContainer.createItemStack
(Consumer<ItemStack> p_79691_, LootContext p_79692_) void
NestedLootTable.createItemStack
(Consumer<ItemStack> p_331038_, LootContext p_331648_) void
TagEntry.createItemStack
(Consumer<ItemStack> p_79854_, LootContext p_79855_) boolean
ComposableEntryContainer.expand
(LootContext p_79426_, Consumer<LootPoolEntry> p_79427_) final boolean
CompositeEntryBase.expand
(LootContext p_79439_, Consumer<LootPoolEntry> p_79440_) boolean
LootPoolSingletonContainer.expand
(LootContext p_79694_, Consumer<LootPoolEntry> p_79695_) boolean
TagEntry.expand
(LootContext p_79861_, Consumer<LootPoolEntry> p_79862_) private boolean
TagEntry.expandTag
(LootContext p_79846_, Consumer<LootPoolEntry> p_79847_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.functions
Modifier and TypeFieldDescriptionprivate final BiFunction
<ItemStack, LootContext, ItemStack> SequenceFunction.compositeFunction
private final Predicate
<LootContext> LootItemConditionalFunction.compositePredicates
static final BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.IDENTITY
Modifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> p_298851_) Modifier and TypeMethodDescriptionfinal ItemStack
LootItemConditionalFunction.apply
(ItemStack p_80689_, LootContext p_80690_) SequenceFunction.apply
(ItemStack p_299268_, LootContext p_298221_) static UnaryOperator
<Component> SetNameFunction.createResolver
(LootContext p_81140_, LootContext.EntityTarget p_81141_) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> p_80725_, Consumer<ItemStack> p_80726_, LootContext p_80727_) CopyComponentsFunction.Source.get
(LootContext p_331014_) ApplyBonusCount.run
(ItemStack p_79913_, LootContext p_79914_) ApplyExplosionDecay.run
(ItemStack p_80034_, LootContext p_80035_) protected ItemStack
CopyBlockState.run
(ItemStack p_80060_, LootContext p_80061_) CopyComponentsFunction.run
(ItemStack p_330563_, LootContext p_331220_) CopyCustomDataFunction.run
(ItemStack p_330210_, LootContext p_330315_) CopyNameFunction.run
(ItemStack p_80185_, LootContext p_80186_) EnchantedCountIncreaseFunction.run
(ItemStack p_345285_, LootContext p_345560_) EnchantRandomlyFunction.run
(ItemStack p_80429_, LootContext p_80430_) EnchantWithLevelsFunction.run
(ItemStack p_80483_, LootContext p_80484_) ExplorationMapFunction.run
(ItemStack p_80547_, LootContext p_80548_) FillPlayerHead.run
(ItemStack p_80608_, LootContext p_80609_) FilteredFunction.run
(ItemStack p_340845_, LootContext p_341349_) protected ItemStack
FunctionReference.run
(ItemStack p_279458_, LootContext p_279370_) LimitCount.run
(ItemStack p_80644_, LootContext p_80645_) protected abstract ItemStack
LootItemConditionalFunction.run
(ItemStack p_80679_, LootContext p_80680_) ModifyContainerContents.run
(ItemStack p_341267_, LootContext p_341214_) SetAttributesFunction.run
(ItemStack p_80840_, LootContext p_80841_) protected ItemStack
SetBannerPatternFunction.run
(ItemStack p_165280_, LootContext p_165281_) protected ItemStack
SetBookCoverFunction.run
(ItemStack p_334048_, LootContext p_334012_) SetComponentsFunction.run
(ItemStack p_330211_, LootContext p_331318_) SetContainerContents.run
(ItemStack p_80911_, LootContext p_80912_) SetContainerLootTable.run
(ItemStack p_80967_, LootContext p_80968_) SetCustomDataFunction.run
(ItemStack p_330737_, LootContext p_331310_) SetCustomModelDataFunction.run
(ItemStack p_341195_, LootContext p_341335_) SetEnchantmentsFunction.run
(ItemStack p_165346_, LootContext p_165347_) protected ItemStack
SetFireworkExplosionFunction.run
(ItemStack p_334066_, LootContext p_333987_) protected ItemStack
SetFireworksFunction.run
(ItemStack p_334053_, LootContext p_333744_) SetInstrumentFunction.run
(ItemStack p_231017_, LootContext p_231018_) SetItemCountFunction.run
(ItemStack p_81006_, LootContext p_81007_) SetItemDamageFunction.run
(ItemStack p_81048_, LootContext p_81049_) SetItemFunction.run
(ItemStack p_340909_, LootContext p_341298_) SetLoreFunction.run
(ItemStack p_81089_, LootContext p_81090_) SetNameFunction.run
(ItemStack p_81137_, LootContext p_81138_) SetOminousBottleAmplifierFunction.run
(ItemStack p_338554_, LootContext p_338336_) SetPotionFunction.run
(ItemStack p_193073_, LootContext p_193074_) SetStewEffectFunction.run
(ItemStack p_81223_, LootContext p_81224_) protected ItemStack
SetWritableBookPagesFunction.run
(ItemStack p_333832_, LootContext p_333929_) protected ItemStack
SetWrittenBookPagesFunction.run
(ItemStack p_333960_, LootContext p_333892_) SmeltItemFunction.run
(ItemStack p_81268_, LootContext p_81269_) protected ItemStack
ToggleTooltips.run
(ItemStack p_335844_, LootContext p_335764_) SetLoreFunction.updateLore
(ItemLore p_330567_, LootContext p_331214_) private ItemAttributeModifiers
SetAttributesFunction.updateModifiers
(LootContext p_339627_, ItemAttributeModifiers p_339590_) Modifier and TypeMethodDescriptionstatic BiFunction
<ItemStack, LootContext, ItemStack> LootItemFunctions.compose
(List<? extends BiFunction<ItemStack, LootContext, ItemStack>> p_298851_) LootItemFunction.decorate
(BiFunction<ItemStack, LootContext, ItemStack> p_80725_, Consumer<ItemStack> p_80726_, LootContext p_80727_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.predicates
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> CompositeLootItemCondition.composedPredicate
Modifier and TypeMethodDescriptionprotected boolean
EntityHasScoreCondition.hasScore
(LootContext p_165491_, Entity p_165492_, Scoreboard p_165493_, String p_165494_, IntRange p_165495_) boolean
BonusLevelTableCondition.test
(LootContext p_81521_) final boolean
CompositeLootItemCondition.test
(LootContext p_286298_) boolean
ConditionReference.test
(LootContext p_81558_) boolean
DamageSourceCondition.test
(LootContext p_81592_) boolean
EnchantmentActiveCheck.test
(LootContext p_346268_) boolean
EntityHasScoreCondition.test
(LootContext p_81631_) boolean
ExplosionCondition.test
(LootContext p_81659_) boolean
InvertedLootItemCondition.test
(LootContext p_81689_) boolean
LocationCheck.test
(LootContext p_81731_) boolean
LootItemBlockStatePropertyCondition.test
(LootContext p_81772_) boolean
LootItemEntityPropertyCondition.test
(LootContext p_81871_) boolean
LootItemKilledByPlayerCondition.test
(LootContext p_81899_) boolean
LootItemRandomChanceCondition.test
(LootContext p_81930_) boolean
LootItemRandomChanceWithEnchantedBonusCondition.test
(LootContext p_345165_) boolean
MatchTool.test
(LootContext p_82000_) boolean
TimeCheck.test
(LootContext p_82033_) boolean
ValueCheckCondition.test
(LootContext p_165527_) boolean
WeatherCheck.test
(LootContext p_82066_) ModifierConstructorDescriptionprotected
CompositeLootItemCondition
(List<LootItemCondition> p_298458_, Predicate<LootContext> p_286771_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.nbt
Modifier and TypeMethodDescriptionContextNbtProvider.get
(LootContext p_165573_) ContextNbtProvider.Getter.get
(LootContext p_165591_) NbtProvider.get
(LootContext p_165622_) StorageNbtProvider.get
(LootContext p_165636_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.number
Modifier and TypeMethodDescriptionfloat
BinomialDistributionGenerator.getFloat
(LootContext p_165666_) float
ConstantValue.getFloat
(LootContext p_165695_) float
EnchantmentLevelProvider.getFloat
(LootContext p_344791_) float
NumberProvider.getFloat
(LootContext p_165730_) float
ScoreboardValue.getFloat
(LootContext p_165758_) float
StorageValue.getFloat
(LootContext p_335884_) float
UniformGenerator.getFloat
(LootContext p_165787_) int
BinomialDistributionGenerator.getInt
(LootContext p_165663_) default int
NumberProvider.getInt
(LootContext p_165729_) int
StorageValue.getInt
(LootContext p_335703_) int
UniformGenerator.getInt
(LootContext p_165784_) private Optional
<NumericTag> StorageValue.getNumericTag
(LootContext p_336045_) -
Uses of LootContext in net.minecraft.world.level.storage.loot.providers.score
Modifier and TypeMethodDescriptionContextScoreboardNameProvider.getScoreHolder
(LootContext p_313828_) FixedScoreboardNameProvider.getScoreHolder
(LootContext p_313943_) ScoreboardNameProvider.getScoreHolder
(LootContext p_165867_) -
Uses of LootContext in net.neoforged.neoforge.common
Modifier 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
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> LootModifier.combinedConditions
Modifier 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.