public class LootTableReporter extends Object
Modifier and Type | Field and Description |
---|---|
private Function<Identifier,LootCondition> |
conditionGetter |
private Set<Identifier> |
conditions |
private LootContextType |
contextType |
private Multimap<String,String> |
messages |
private String |
name |
private Supplier<String> |
nameFactory |
private Function<Identifier,LootTable> |
tableGetter |
private Set<Identifier> |
tables |
Constructor and Description |
---|
LootTableReporter(LootContextType contextType,
Function<Identifier,LootCondition> conditionGetter,
Function<Identifier,LootTable> tableFactory) |
LootTableReporter(Multimap<String,String> messages,
Supplier<String> nameFactory,
LootContextType contextType,
Function<Identifier,LootCondition> conditionGetter,
Set<Identifier> conditions,
Function<Identifier,LootTable> tableGetter,
Set<Identifier> tables) |
Modifier and Type | Method and Description |
---|---|
LootCondition |
getCondition(Identifier id) |
Multimap<String,String> |
getMessages() |
private String |
getName() |
LootTable |
getTable(Identifier id) |
boolean |
hasCondition(Identifier id) |
boolean |
hasTable(Identifier id) |
LootTableReporter |
makeChild(String name) |
void |
report(String message) |
void |
validateContext(LootContextAware contextAware) |
LootTableReporter |
withCondition(String name,
Identifier id) |
LootTableReporter |
withContextType(LootContextType contextType) |
LootTableReporter |
withTable(String name,
Identifier id) |
private final LootContextType contextType
private final Function<Identifier,LootCondition> conditionGetter
private final Set<Identifier> conditions
private final Function<Identifier,LootTable> tableGetter
private final Set<Identifier> tables
private String name
public LootTableReporter(LootContextType contextType, Function<Identifier,LootCondition> conditionGetter, Function<Identifier,LootTable> tableFactory)
public LootTableReporter(Multimap<String,String> messages, Supplier<String> nameFactory, LootContextType contextType, Function<Identifier,LootCondition> conditionGetter, Set<Identifier> conditions, Function<Identifier,LootTable> tableGetter, Set<Identifier> tables)
private String getName()
public void report(String message)
public LootTableReporter makeChild(String name)
public LootTableReporter withTable(String name, Identifier id)
public LootTableReporter withCondition(String name, Identifier id)
public boolean hasTable(Identifier id)
public boolean hasCondition(Identifier id)
public void validateContext(LootContextAware contextAware)
@Nullable public LootTable getTable(Identifier id)
@Nullable public LootCondition getCondition(Identifier id)
public LootTableReporter withContextType(LootContextType contextType)