T - - The underlying value type. e.g. Integer for hp IVs, String for nickname.public abstract class SpecValue<T>
extends java.lang.Object
PokemonSpec.
This is the object that is serialized/deserialized, and provides matching
and applying functionality. This is different to ISpecType which
outlines how to parse this.| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
key
The main key, used for JSON serialization.
|
T |
value
The value
|
| Constructor and Description |
|---|
SpecValue(java.lang.String key,
T value) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
apply(EntityPixelmon pixelmon)
Applies the spec to an
EntityPixelmon. |
void |
apply(net.minecraft.nbt.NBTTagCompound nbt)
Deprecated.
|
abstract void |
apply(Pokemon pokemon)
Applies the spec to a
Pokemon. |
abstract SpecValue<T> |
clone()
Clones the data of this spec into a new one, to break references.
|
abstract java.lang.Class<T> |
getValueClass()
Gets the class for the generic T defining this SpecValue.
|
abstract boolean |
matches(EntityPixelmon pixelmon)
Returns true if the given
EntityPixelmon has this spec. |
boolean |
matches(net.minecraft.nbt.NBTTagCompound nbt)
Deprecated.
|
abstract boolean |
matches(Pokemon pokemon)
Returns true if the given
Pokemon has this spec. |
public java.lang.String key
public T value
public SpecValue(java.lang.String key,
T value)
public abstract java.lang.Class<T> getValueClass()
public abstract void apply(EntityPixelmon pixelmon)
EntityPixelmon.@Deprecated public void apply(net.minecraft.nbt.NBTTagCompound nbt)
NBTTagCompound.public abstract boolean matches(EntityPixelmon pixelmon)
EntityPixelmon has this spec.@Deprecated public boolean matches(net.minecraft.nbt.NBTTagCompound nbt)
NBTTagCompound has this spec.public abstract boolean matches(Pokemon pokemon)
Pokemon has this spec.