public class BattleClause extends java.lang.Object implements java.lang.Comparable<BattleClause>, IEncodeable
| Constructor and Description |
|---|
BattleClause(java.lang.String id)
Initializes a battle clause definition.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BattleClause o) |
void |
decodeInto(net.minecraft.network.PacketBuffer buffer)
Decodes the object from a buffer.
|
void |
encodeInto(net.minecraft.network.PacketBuffer buffer)
Encodes the object into a buffer.
|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getDescription()
Gets a description of the battle clause.
|
java.lang.String |
getID()
Gets the unique ID of the battle clause.
|
java.lang.String |
getLocalizedName()
Gets the translated name of the battle clause.
|
static java.lang.String |
getLocalizedName(java.lang.String clauseID)
Gets the translated name of the battle clause.
|
int |
hashCode() |
BattleClause |
setDescription(java.lang.String description)
Sets a non-default description for the clause.
|
java.lang.String |
toString() |
boolean |
validateSingle(Pokemon pokemon)
Checks if the rule allows a Pokémon to be chosen for battle.
|
boolean |
validateTeam(java.util.List<Pokemon> team)
Checks if the rule allows a list of Pokémon to be chosen for battle.
|
public BattleClause(java.lang.String id)
id - The unique ID of the battle clause.public BattleClause setDescription(java.lang.String description)
description - The description of the clause.public java.lang.String getID()
public java.lang.String getDescription()
public java.lang.String getLocalizedName()
public static java.lang.String getLocalizedName(java.lang.String clauseID)
clauseID - The ID of the clause to translate.public boolean validateSingle(Pokemon pokemon)
pokemon - The Pokémon to check.public boolean validateTeam(java.util.List<Pokemon> team)
team - The Pokémon to check.public void encodeInto(net.minecraft.network.PacketBuffer buffer)
IEncodeableencodeInto in interface IEncodeablebuffer - The buffer to encode the object into.public void decodeInto(net.minecraft.network.PacketBuffer buffer)
IEncodeabledecodeInto in interface IEncodeablebuffer - The buffer to decode the object from.public int compareTo(BattleClause o)
compareTo in interface java.lang.Comparable<BattleClause>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object