Package net.minecraft.loot.context
Class LootContext.Builder
java.lang.Object
net.minecraft.loot.context.LootContext.Builder
- Enclosing class:
- LootContext
public static class LootContext.Builder extends Object
-
Field Summary
Fields Modifier and Type Field Description private Map<Identifier,LootContext.Dropper>
drops
private float
luck
private Map<LootContextParameter<?>,Object>
parameters
private Random
random
private ServerWorld
world
-
Constructor Summary
Constructors Constructor Description Builder(ServerWorld world)
-
Method Summary
Modifier and Type Method Description LootContext
build(LootContextType type)
<T> T
get(LootContextParameter<T> parameter)
<T> T
getNullable(LootContextParameter<T> parameter)
ServerWorld
getWorld()
LootContext.Builder
luck(float luck)
<T> LootContext.Builder
optionalParameter(LootContextParameter<T> key, T value)
<T> LootContext.Builder
parameter(LootContextParameter<T> key, T value)
LootContext.Builder
putDrop(Identifier id, LootContext.Dropper value)
LootContext.Builder
random(long seed)
LootContext.Builder
random(long seed, Random random)
LootContext.Builder
random(Random random)
-
Field Details
-
world
-
parameters
-
drops
-
random
-
luck
private float luck
-
-
Constructor Details
-
Builder
-
-
Method Details
-
random
-
random
-
random
-
luck
-
parameter
-
optionalParameter
-
putDrop
-
getWorld
-
get
-
getNullable
-
build
-