public class LootTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootTable.Builder |
static class |
LootTable.Serializer |
Modifier and Type | Field and Description |
---|---|
private java.util.function.BiFunction<ItemStack,LootContext,ItemStack> |
combinedFunctions |
static LootParameterSet |
DEFAULT_PARAMETER_SET |
static LootTable |
EMPTY_LOOT_TABLE |
private ILootFunction[] |
functions |
private boolean |
isFrozen |
private static org.apache.logging.log4j.Logger |
LOGGER |
private LootParameterSet |
parameterSet |
private java.util.List<LootPool> |
pools |
Modifier | Constructor and Description |
---|---|
private |
LootTable(LootParameterSet p_i51265_1_,
LootPool[] p_i51265_2_,
ILootFunction[] p_i51265_3_) |
Modifier and Type | Method and Description |
---|---|
void |
addPool(LootPool pool) |
static LootTable.Builder |
builder() |
static java.util.function.Consumer<ItemStack> |
capStackSizes(java.util.function.Consumer<ItemStack> p_216124_0_) |
private void |
checkFrozen() |
void |
fillInventory(IInventory p_216118_1_,
LootContext p_216118_2_) |
void |
freeze() |
void |
func_227506_a_(ValidationTracker p_227506_1_) |
java.util.List<ItemStack> |
generate(LootContext context) |
void |
generate(LootContext contextData,
java.util.function.Consumer<ItemStack> stacksOut)
Deprecated.
|
private java.util.List<java.lang.Integer> |
getEmptySlotsRandomized(IInventory inventory,
java.util.Random rand) |
LootParameterSet |
getParameterSet() |
LootPool |
getPool(java.lang.String name) |
boolean |
isFrozen() |
void |
recursiveGenerate(LootContext context,
java.util.function.Consumer<ItemStack> stacksOut) |
LootPool |
removePool(java.lang.String name) |
private void |
shuffleItems(java.util.List<ItemStack> stacks,
int p_186463_2_,
java.util.Random rand) |
private static final org.apache.logging.log4j.Logger LOGGER
public static final LootTable EMPTY_LOOT_TABLE
public static final LootParameterSet DEFAULT_PARAMETER_SET
private final LootParameterSet parameterSet
private final java.util.List<LootPool> pools
private final ILootFunction[] functions
private final java.util.function.BiFunction<ItemStack,LootContext,ItemStack> combinedFunctions
private boolean isFrozen
private LootTable(LootParameterSet p_i51265_1_, LootPool[] p_i51265_2_, ILootFunction[] p_i51265_3_)
public static java.util.function.Consumer<ItemStack> capStackSizes(java.util.function.Consumer<ItemStack> p_216124_0_)
public void recursiveGenerate(LootContext context, java.util.function.Consumer<ItemStack> stacksOut)
@Deprecated public void generate(LootContext contextData, java.util.function.Consumer<ItemStack> stacksOut)
public java.util.List<ItemStack> generate(LootContext context)
public LootParameterSet getParameterSet()
public void func_227506_a_(ValidationTracker p_227506_1_)
public void fillInventory(IInventory p_216118_1_, LootContext p_216118_2_)
private void shuffleItems(java.util.List<ItemStack> stacks, int p_186463_2_, java.util.Random rand)
private java.util.List<java.lang.Integer> getEmptySlotsRandomized(IInventory inventory, java.util.Random rand)
public static LootTable.Builder builder()
public void freeze()
public boolean isFrozen()
private void checkFrozen()
public LootPool getPool(java.lang.String name)
public LootPool removePool(java.lang.String name)
public void addPool(LootPool pool)