public static class TeamSelectionRegistry.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected BattleRules |
battleRules |
protected java.util.function.Consumer<BattleController> |
battleStartConsumer |
protected java.util.function.Consumer<TeamSelection> |
cancelConsumer |
protected boolean |
closeable |
protected java.util.List<PartyStorage> |
members |
protected boolean |
showOpponentTeam |
protected boolean |
showRules |
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
TeamSelectionRegistry.Builder |
battleRules(BattleRules battleRules)
Sets the battle rules to be used in the battle
|
TeamSelectionRegistry.Builder |
battleStartConsumer(java.util.function.Consumer<BattleController> battleStartConsumer)
Sets the handler for when the battle is started from the team selection UI
|
TeamSelectionRegistry.Builder |
cancelConsumer(java.util.function.Consumer<TeamSelection> cancelConsumer)
Sets the handler for when the team selection is canceled (I believe this only happens if they have 0 valid Pokemon)
|
TeamSelectionRegistry.Builder |
closeable()
Sets the GUI as closeable (via ESCAPE button)
|
TeamSelectionRegistry.Builder |
closeable(boolean closeable)
Sets if the GUI can be closed or not (via ESCAPE button)
|
TeamSelectionRegistry.Builder |
hideOpponentTeam()
Hides the opponent's team
|
TeamSelectionRegistry.Builder |
members(net.minecraft.entity.Entity... entities)
Adds the entities as members
|
TeamSelectionRegistry.Builder |
members(PartyStorage... storage)
Adds the storages as members
|
TeamSelectionRegistry.Builder |
notCloseable()
Sets the GUI as not closeable (via ESCAPE button)
|
TeamSelectionRegistry.Builder |
showOpponentTeam()
Shows the opponent's team
|
TeamSelectionRegistry.Builder |
showRules()
Proxy for
showRules(boolean) setting it to true |
TeamSelectionRegistry.Builder |
showRules(boolean showRules)
Sets the show rules setting
|
void |
start()
Sends the team select screen to all entities
|
protected BattleRules battleRules
protected java.util.List<PartyStorage> members
protected boolean showRules
protected boolean showOpponentTeam
protected boolean closeable
protected java.util.function.Consumer<TeamSelection> cancelConsumer
protected java.util.function.Consumer<BattleController> battleStartConsumer
public TeamSelectionRegistry.Builder battleRules(BattleRules battleRules)
battleRules
- The battle rules to usepublic TeamSelectionRegistry.Builder members(net.minecraft.entity.Entity... entities)
entities
- The entities added as members (none can be null)public TeamSelectionRegistry.Builder members(PartyStorage... storage)
storage
- The storages added as members (none can be null)public TeamSelectionRegistry.Builder showRules()
showRules(boolean)
setting it to truepublic TeamSelectionRegistry.Builder showRules(boolean showRules)
showRules
- If the battle rules should be shownpublic TeamSelectionRegistry.Builder cancelConsumer(java.util.function.Consumer<TeamSelection> cancelConsumer)
cancelConsumer
- The cancel consumerpublic TeamSelectionRegistry.Builder battleStartConsumer(java.util.function.Consumer<BattleController> battleStartConsumer)
battleStartConsumer
- The start consumerpublic TeamSelectionRegistry.Builder showOpponentTeam()
public TeamSelectionRegistry.Builder hideOpponentTeam()
public TeamSelectionRegistry.Builder closeable()
public TeamSelectionRegistry.Builder notCloseable()
public TeamSelectionRegistry.Builder closeable(boolean closeable)
closeable
- True if they can close it - false if notpublic void start()