Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<java.lang.String> |
aliases |
Constructor and Description |
---|
SpecFlag(java.lang.String... aliases) |
SpecFlag(java.lang.String key,
boolean value) |
Modifier and Type | Method and Description |
---|---|
void |
apply(EntityPixelmon pixelmon)
Applies the spec to an
EntityPixelmon . |
void |
apply(Pokemon pokemon)
Applies the spec to a
Pokemon . |
SpecValue<java.lang.Boolean> |
clone()
Clones the data of this spec into a new one, to break references.
|
java.util.List<java.lang.String> |
getKeys()
All the acceptable keys for this spec type.
|
java.lang.Class<? extends SpecValue<?>> |
getSpecClass()
The
SpecValue class that this will create. |
java.lang.Class<java.lang.Boolean> |
getValueClass()
Gets the class for the generic T defining this SpecValue.
|
SpecValue<java.lang.Boolean> |
make(boolean value) |
boolean |
matches(EntityPixelmon pixelmon)
Returns true if the given
EntityPixelmon has this spec. |
boolean |
matches(Pokemon pokemon)
Returns true if the given
Pokemon has this spec. |
SpecValue<java.lang.Boolean> |
parse(java.lang.String arg)
Attempts to parse a spec of this type from a String argument.
|
SpecValue<?> |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
Reads this type of spec value from NBT.
|
boolean |
sentToClient()
Whether or not the client is informed about this spec.
|
java.lang.String |
toParameterForm(SpecValue<?> value)
Restores it to the form used in commands.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt,
SpecValue<?> value)
Writes this type of spec value to NBT.
|
public SpecFlag(java.lang.String... aliases)
public SpecFlag(java.lang.String key, boolean value)
public java.util.List<java.lang.String> getKeys()
ISpecType
public SpecValue<java.lang.Boolean> make(boolean value)
public SpecValue<java.lang.Boolean> parse(java.lang.String arg)
ISpecType
public SpecValue<?> readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
ISpecType
readFromNBT
in interface ISpecType
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt, SpecValue<?> value)
ISpecType
writeToNBT
in interface ISpecType
public java.lang.Class<? extends SpecValue<?>> getSpecClass()
ISpecType
SpecValue
class that this will create. This is needed for JSON deserialization.getSpecClass
in interface ISpecType
public java.lang.String toParameterForm(SpecValue<?> value)
ISpecType
toParameterForm
in interface ISpecType
public java.lang.Class<java.lang.Boolean> getValueClass()
SpecValue
getValueClass
in class SpecValue<java.lang.Boolean>
public void apply(EntityPixelmon pixelmon)
SpecValue
EntityPixelmon
.public void apply(Pokemon pokemon)
SpecValue
Pokemon
.public boolean matches(EntityPixelmon pixelmon)
SpecValue
EntityPixelmon
has this spec.public boolean matches(Pokemon pokemon)
SpecValue
Pokemon
has this spec.public SpecValue<java.lang.Boolean> clone()
SpecValue
public boolean sentToClient()