public class TypeRequirement extends java.lang.Object implements Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
Constructor and Description |
---|
TypeRequirement() |
TypeRequirement(int pos,
Element element) |
TypeRequirement(com.mojang.datafixers.util.Pair<java.lang.Integer,Element> data) |
Modifier and Type | Method and Description |
---|---|
void |
applyData(Pokemon pixelmon) |
void |
applyMinecraft(PixelmonEntity entity) |
java.util.List<Requirement<Pokemon,PixelmonEntity,?>> |
create(java.lang.String spec)
Creates a list of requirements from the spec being parsed
|
Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>> |
createInstance(com.mojang.datafixers.util.Pair<java.lang.Integer,Element> value)
Creates a new instance of the requirement with the given value
|
boolean |
fits(java.lang.String spec)
Checks if the given fits for this requirement
|
java.util.List<java.lang.String> |
getAliases() |
com.mojang.datafixers.util.Pair<java.lang.Integer,Element> |
getValue()
Gets the internal value of the requirement
|
boolean |
isDataMatch(Pokemon pixelmon) |
boolean |
isMinecraftMatch(PixelmonEntity entity) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPriority, shouldContinue
public TypeRequirement()
public TypeRequirement(int pos, Element element)
public TypeRequirement(com.mojang.datafixers.util.Pair<java.lang.Integer,Element> data)
public java.util.List<java.lang.String> getAliases()
getAliases
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
public boolean fits(java.lang.String spec)
Requirement
fits
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
spec
- The parsed specpublic java.util.List<Requirement<Pokemon,PixelmonEntity,?>> create(java.lang.String spec)
Requirement
create
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
spec
- The spec being parsedpublic Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>> createInstance(com.mojang.datafixers.util.Pair<java.lang.Integer,Element> value)
Requirement
createInstance
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
value
- The valuepublic boolean isMinecraftMatch(PixelmonEntity entity)
isMinecraftMatch
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
public boolean isDataMatch(Pokemon pixelmon)
isDataMatch
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
public void applyData(Pokemon pixelmon)
applyData
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
public void applyMinecraft(PixelmonEntity entity)
applyMinecraft
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>
public com.mojang.datafixers.util.Pair<java.lang.Integer,Element> getValue()
Requirement
getValue
in interface Requirement<Pokemon,PixelmonEntity,com.mojang.datafixers.util.Pair<java.lang.Integer,Element>>