Class TeamSelectionRegistry.Builder

java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.teamselection.TeamSelectionRegistry.Builder
Enclosing class:
TeamSelectionRegistry

public static class TeamSelectionRegistry.Builder extends Object
Builder class for team selection UI
  • Field Details

  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • members

      public TeamSelectionRegistry.Builder members(net.minecraft.world.entity.Entity... entities)
      Adds the entities as members
      Parameters:
      entities - The entities added as members (none can be null)
      Returns:
      The builder
    • members

      public TeamSelectionRegistry.Builder members(PartyStorage... storage)
      Adds the storages as members
      Parameters:
      storage - The storages added as members (none can be null)
      Returns:
      The builder
    • cancelConsumer

      public TeamSelectionRegistry.Builder cancelConsumer(Consumer<TeamSelection> 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

      public TeamSelectionRegistry.Builder showOpponentTeam()
      Shows the opponent's team
      Returns:
      The builder
    • hideOpponentTeam

      public TeamSelectionRegistry.Builder hideOpponentTeam()
      Hides the opponent's team
      Returns:
      The builder
    • closeable

      public TeamSelectionRegistry.Builder closeable()
      Sets the GUI as closeable (via ESCAPE button)
      Returns:
      The builder
    • notCloseable

      public TeamSelectionRegistry.Builder notCloseable()
      Sets the GUI as not closeable (via ESCAPE button)
      Returns:
      The builder
    • closeable

      public TeamSelectionRegistry.Builder closeable(boolean 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

      public TeamSelectionRegistry.Builder rules(net.minecraft.core.Holder<BattleRuleSet> 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