net.minecraft.loot.context

public class LootContext

net.minecraft.world.level.storage.loot.LootContext
net.minecraft.class_47
net.minecraft.loot.context.LootContext

Field summary

Modifier and TypeField
private final LootWorldContext
params
field_44881
worldContext
private final Random
random
field_923
random
private final RegistryEntryLookup$RegistryLookup
lootDataResolver
field_44490
lookup
private final Set<LootContext$Entry<?>>
visitedElements
field_927
activeEntries

Constructor summary

ModifierConstructor
private (LootWorldContext worldContext, Random random, RegistryEntryLookup$RegistryLookup lookup)

Method summary

Modifier and TypeMethod
public boolean
hasParameter(ContextKey<?> key)
method_300(class_169<?> arg0)
hasParameter(ContextParameter<?> parameter)
public <T> T
getParameter(ContextKey<T> key)
method_35508(class_169<T> arg0)
getOrThrow(ContextParameter<T> parameter)
public <T> T
getOptionalParameter(ContextKey<T> key)
method_65013(class_169<T> arg0)
get(ContextParameter<T> parameter)
public void
addDynamicDrops(Identifier location, Consumer<ItemStack> output)
method_297(class_2960 arg0, Consumer<class_1799> arg1)
drop(Identifier id, Consumer<ItemStack> lootConsumer)
public boolean
hasVisitedElement(LootContext$VisitedEntry<?> element)
method_51184(class_47$class_8487<?> arg0)
isActive(LootContext$Entry<?> entry)
public boolean
pushVisitedElement(LootContext$VisitedEntry<?> element)
method_298(class_47$class_8487<?> arg0)
markActive(LootContext$Entry<?> entry)
public void
popVisitedElement(LootContext$VisitedEntry<?> element)
method_295(class_47$class_8487<?> arg0)
markInactive(LootContext$Entry<?> entry)
public RegistryEntryLookup$RegistryLookup
getResolver()
method_51183()
getLookup()
public Random
getRandom()
method_294()
getRandom()
public float
getLuck()
method_302()
getLuck()
public ServerWorld
getLevel()
method_299()
getWorld()
public static LootContext$Entry<LootTable>
createVisitedEntry(LootTable table)
method_51185(class_52 arg0)
table(LootTable table)
public static LootContext$Entry<LootCondition>
createVisitedEntry(LootItemCondition table)
method_51187(class_5341 arg0)
predicate(LootCondition predicate)
public static LootContext$Entry<LootFunction>
createVisitedEntry(LootItemFunction table)
method_51186(class_117 arg0)
itemModifier(LootFunction itemModifier)