public class LootTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootTable.Serializer |
Modifier and Type | Field and Description |
---|---|
static LootTable |
EMPTY_LOOT_TABLE |
private boolean |
isFrozen |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.util.List<LootPool> |
pools |
Modifier and Type | Method and Description |
---|---|
void |
addPool(LootPool pool) |
private void |
checkFrozen() |
void |
fillInventory(IInventory inventory,
java.util.Random rand,
LootContext context) |
void |
freeze() |
java.util.List<ItemStack> |
generateLootForPools(java.util.Random rand,
LootContext context) |
private java.util.List<java.lang.Integer> |
getEmptySlotsRandomized(IInventory inventory,
java.util.Random rand) |
LootPool |
getPool(java.lang.String name) |
boolean |
isFrozen() |
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
private final java.util.List<LootPool> pools
private boolean isFrozen
public LootTable(LootPool[] poolsIn)
public java.util.List<ItemStack> generateLootForPools(java.util.Random rand, LootContext context)
public void fillInventory(IInventory inventory, java.util.Random rand, LootContext context)
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 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)