Class TeamSelectionRegistry.Builder
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.teamselection.TeamSelectionRegistry.Builder
- Enclosing class:
TeamSelectionRegistry
Builder class for team selection UI
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Consumer
<BattleController> protected Consumer
<TeamSelection> protected boolean
protected List
<PartyStorage> protected net.minecraft.core.Holder
<BattleRuleSet> protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbattleStartConsumer
(Consumer<BattleController> battleStartConsumer) Sets the handler for when the battle is started from the team selection UIcancelConsumer
(Consumer<TeamSelection> cancelConsumer) Sets the handler for when the team selection is canceled (I believe this only happens if they have 0 valid Pokemon)Sets the GUI as closeable (via ESCAPE button)closeable
(boolean closeable) Sets if the GUI can be closed or not (via ESCAPE button)Hides the opponent's teammembers
(PartyStorage... storage) Adds the storages as membersmembers
(net.minecraft.world.entity.Entity... entities) Adds the entities as membersSets the GUI as not closeable (via ESCAPE button)rules
(net.minecraft.core.Holder<BattleRuleSet> rules) Sets the rules for the battlerules
(net.minecraft.resources.ResourceKey<BattleRuleSet> rules) Sets the rules for the battleShows the opponent's teamvoid
start()
Sends the team select screen to all entities
-
Field Details
-
members
-
showOpponentTeam
protected boolean showOpponentTeam -
closeable
protected boolean closeable -
rules
-
cancelConsumer
-
battleStartConsumer
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
members
Adds the entities as members- Parameters:
entities
- The entities added as members (none can be null)- Returns:
- The builder
-
members
Adds the storages as members- Parameters:
storage
- The storages added as members (none can be null)- Returns:
- The builder
-
cancelConsumer
Sets the handler for when the team selection is canceled (I believe this only happens if they have 0 valid Pokemon)- Parameters:
cancelConsumer
- The cancel consumer- Returns:
- The builder
-
battleStartConsumer
public TeamSelectionRegistry.Builder battleStartConsumer(Consumer<BattleController> battleStartConsumer) Sets the handler for when the battle is started from the team selection UI- Parameters:
battleStartConsumer
- The start consumer- Returns:
- The builder
-
showOpponentTeam
Shows the opponent's team- Returns:
- The builder
-
hideOpponentTeam
Hides the opponent's team- Returns:
- The builder
-
closeable
Sets the GUI as closeable (via ESCAPE button)- Returns:
- The builder
-
notCloseable
Sets the GUI as not closeable (via ESCAPE button)- Returns:
- The builder
-
closeable
Sets if the GUI can be closed or not (via ESCAPE button)- Parameters:
closeable
- True if they can close it - false if not- Returns:
- The builder
-
rules
public TeamSelectionRegistry.Builder rules(net.minecraft.resources.ResourceKey<BattleRuleSet> rules) Sets the rules for the battle- Parameters:
rules
- The rules to use for the battle- Returns:
- The builder
-
rules
Sets the rules for the battle- Parameters:
rules
- The rules to use for the battle- Returns:
- The builder
-
start
public void start()Sends the team select screen to all entities
-