Class LootTable<T>
java.lang.Object
org.spongepowered.api.util.weighted.LootTable<T>
- Type Parameters:
- T- The entry type
Represents a pool of tables which are rolled sequentially when retrieving
 entries.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds all tables from the givenLootTableto this LootTable's pool.voidaddTable(RandomObjectTable<T> table) Adds a table to the pool.voidClears all tables from the pool.booleanGets a List of objects as retrieved from all pools.inthashCode()booleanremoveTable(RandomObjectTable<T> table) Removes a table from the pool.tables()Gets all tables in the pool.toString()
- 
Constructor Details- 
LootTablepublic LootTable()Creates a newLootTable.
 
- 
- 
Method Details- 
addTableAdds a table to the pool.- Parameters:
- table- The new table
 
- 
addAllAdds all tables from the givenLootTableto this LootTable's pool.- Parameters:
- other- The other loot table
 
- 
removeTableRemoves a table from the pool.- Parameters:
- table- The table to remove
- Returns:
- If the pool contained the table
 
- 
tablesGets all tables in the pool.- Returns:
- The tables
 
- 
clearPoolpublic void clearPool()Clears all tables from the pool.
- 
getGets a List of objects as retrieved from all pools.- Parameters:
- rand- The random object to use
- Returns:
- The retrieved entries
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-