Class BattleClauseRegistry
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClauseRegistry
Keeps track of all clauses that are registered in the game.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
static final BattleClause
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BattleClause
Gets a registered clause by its ID.static List<BattleClause>
Returns a sorted list of all registered clauses.static boolean
Checks if a clause is registered.static <T extends BattleClause>
Tregister
(T newClause) Registers a new clause in the registry.
-
Field Details
-
BAG_CLAUSE
-
BATON_PASS_CLAUSE
-
MAX_ONE_BATON_PASS
-
CHATTER
-
DRIZZLE
-
DRIZZLE_SWIM
-
DROUGHT
-
ENDLESS_BATTLE
-
EVASION_ABILITY
-
EVASION
-
FORFEIT_CLAUSE
-
INVERSE_BATTLE
-
NO_DUPLICATE_ITEMS
-
LEGEND_BAN
-
MEGA_STONE
-
MOODY
-
OHKO
-
SAND_STREAM
-
SHADOW_TAG
-
SKY_BATTLE
-
SLEEP_CLAUSE
-
SMASH_PASS
-
SNOW_WARNING
-
SOUL_DEW
-
MULTIPLE_SPECIES
-
SPEED_PASS
-
SWAGGER
-
WEATHER_SPEED
-
-
Constructor Details
-
BattleClauseRegistry
public BattleClauseRegistry()
-
-
Method Details
-
getClause
Gets a registered clause by its ID.- Parameters:
id
- The ID of the clause.- Returns:
- The clause with the given ID, or an no-op clause if there is no clause with the given ID.
-
hasClause
Checks if a clause is registered.- Parameters:
id
- The ID of the clause.- Returns:
- Whether a clause with the given ID is registered.
-
register
Registers a new clause in the registry. Returns self to allow for easy caching- Parameters:
newClause
- The new clause to register.- Returns:
- The parameter given - unmodified
- Throws:
IllegalArgumentException
- If the clause has no key or a key conflicting with another clause.
-
getClauseList
Returns a sorted list of all registered clauses.- Returns:
- A sorted list of all registered clauses.
-