Package net.minecraft.loot
Class LootContext
java.lang.Object
net.minecraft.loot.LootContext
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Function<ResourceLocation,
ILootCondition> private final Map<ResourceLocation,
LootContext.IDynamicDropProvider> private final ServerWorld
private final Function<ResourceLocation,
LootTable> private final float
private final Map<LootParameter<?>,
Object> private ResourceLocation
private final Random
private final Set<ILootCondition>
-
Constructor Summary
ModifierConstructorDescriptionprivate
LootContext
(Random p_i225885_1_, float p_i225885_2_, ServerWorld p_i225885_3_, Function<ResourceLocation, LootTable> p_i225885_4_, Function<ResourceLocation, ILootCondition> p_i225885_5_, Map<LootParameter<?>, Object> p_i225885_6_, Map<ResourceLocation, LootContext.IDynamicDropProvider> p_i225885_7_) private
LootContext
(Random rand, float luckIn, ServerWorld worldIn, Function<ResourceLocation, LootTable> lootTableManagerIn, Function<ResourceLocation, ILootCondition> p_i225885_5_, Map<LootParameter<?>, Object> parametersIn, Map<ResourceLocation, LootContext.IDynamicDropProvider> conditionsIn, ResourceLocation queriedLootTableId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDynamicDrops
(ResourceLocation p_216034_1_, Consumer<ItemStack> p_216034_2_) boolean
addVisitedCondition
(ILootCondition p_227501_1_) boolean
addVisitedTable
(LootTable p_186496_1_) getCondition
(ResourceLocation p_227504_1_) getLevel()
int
getLootTable
(ResourceLocation p_227502_1_) float
getLuck()
<T> T
getParamOrNull
(LootParameter<T> p_216031_1_) boolean
hasParam
(LootParameter<?> p_216033_1_) void
removeVisitedCondition
(ILootCondition p_227503_1_) void
removeVisitedTable
(LootTable p_186490_1_) void
setQueriedLootTableId
(ResourceLocation queriedLootTableId)
-
Field Details
-
random
-
luck
private final float luck -
level
-
lootTables
-
visitedTables
-
conditions
-
visitedConditions
-
params
-
dynamicDrops
-
queriedLootTableId
-
-
Constructor Details
-
LootContext
private LootContext(Random p_i225885_1_, float p_i225885_2_, ServerWorld p_i225885_3_, Function<ResourceLocation, LootTable> p_i225885_4_, Function<ResourceLocation, ILootCondition> p_i225885_5_, Map<LootParameter<?>, Object> p_i225885_6_, Map<ResourceLocation, LootContext.IDynamicDropProvider> p_i225885_7_) -
LootContext
private LootContext(Random rand, float luckIn, ServerWorld worldIn, Function<ResourceLocation, LootTable> lootTableManagerIn, Function<ResourceLocation, ILootCondition> p_i225885_5_, Map<LootParameter<?>, Object> parametersIn, Map<ResourceLocation, LootContext.IDynamicDropProvider> conditionsIn, ResourceLocation queriedLootTableId)
-
-
Method Details
-
hasParam
-
addDynamicDrops
-
getParamOrNull
-
addVisitedTable
-
removeVisitedTable
-
addVisitedCondition
-
removeVisitedCondition
-
getLootTable
-
getCondition
-
getRandom
-
getLuck
public float getLuck() -
getLevel
-
getLootingModifier
public int getLootingModifier() -
setQueriedLootTableId
-
getQueriedLootTableId
-