public static class LootContext.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<ResourceLocation,LootContext.IDynamicDropProvider> |
field_216026_c |
private java.util.Map<LootParameter<?>,java.lang.Object> |
lootParameters |
private float |
luck |
private java.util.Random |
rand |
private ServerWorld |
world |
Constructor and Description |
---|
Builder(LootContext context) |
Builder(ServerWorld worldIn) |
Modifier and Type | Method and Description |
---|---|
<T> T |
assertPresent(LootParameter<T> parameter) |
LootContext |
build(LootParameterSet parameterSet) |
<T> T |
get(LootParameter<T> parameter) |
ServerWorld |
getWorld() |
LootContext.Builder |
withDynamicDrop(ResourceLocation p_216017_1_,
LootContext.IDynamicDropProvider p_216017_2_) |
LootContext.Builder |
withLuck(float luckIn) |
<T> LootContext.Builder |
withNullableParameter(LootParameter<T> parameter,
T value) |
<T> LootContext.Builder |
withParameter(LootParameter<T> parameter,
T value) |
LootContext.Builder |
withRandom(java.util.Random randomIn) |
LootContext.Builder |
withSeed(long seed) |
LootContext.Builder |
withSeededRandom(long seed,
java.util.Random p_216020_3_) |
private final ServerWorld world
private final java.util.Map<LootParameter<?>,java.lang.Object> lootParameters
private final java.util.Map<ResourceLocation,LootContext.IDynamicDropProvider> field_216026_c
private java.util.Random rand
private float luck
public Builder(ServerWorld worldIn)
public Builder(LootContext context)
public LootContext.Builder withRandom(java.util.Random randomIn)
public LootContext.Builder withSeed(long seed)
public LootContext.Builder withSeededRandom(long seed, java.util.Random p_216020_3_)
public LootContext.Builder withLuck(float luckIn)
public <T> LootContext.Builder withParameter(LootParameter<T> parameter, T value)
public <T> LootContext.Builder withNullableParameter(LootParameter<T> parameter, @Nullable T value)
public LootContext.Builder withDynamicDrop(ResourceLocation p_216017_1_, LootContext.IDynamicDropProvider p_216017_2_)
public ServerWorld getWorld()
public <T> T assertPresent(LootParameter<T> parameter)
@Nullable public <T> T get(LootParameter<T> parameter)
public LootContext build(LootParameterSet parameterSet)