public class MoveSkill
extends java.lang.Object
moveSkills
list
and using register(net.minecraft.entity.player.EntityPlayerMP)
when a player logs in. unregister(net.minecraft.entity.player.EntityPlayerMP)
when a
player logs in. Modifier and Type | Class and Description |
---|---|
static class |
MoveSkill.EnumTargetType
The types of targets that an external move can target.
|
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<PokemonSpec> |
ableSpecs
A list of PokemonSpecs that describe the Pokémon that can use this move skill.
|
java.util.ArrayList<java.lang.Integer> |
anyMoves
A list of moves such that the Pokémon only needs one of these to use the move skill.
|
java.util.Map<MoveSkill.EnumTargetType,java.util.function.BiFunction<EntityPixelmon,java.lang.Object,java.lang.Integer>> |
behaviours
All of the behaviours this move skill allows for different types of target.
|
java.util.ArrayList<java.lang.Integer> |
combinationMoves
A list of moves such that the Pokémon needs all of these to use the move skill.
|
int |
cooldownTicks
The base time for the skill to require to cooldown.
|
java.util.ArrayList<java.lang.String> |
descriptions
The description of the move skill.
|
java.lang.String |
id |
java.util.ArrayList<PokemonSpec> |
intrinsicSpecs
A list of PokemonSpecs that describe the Pokémon that can use this move skill regardless of moves.
|
static java.util.ArrayList<MoveSkill> |
moveSkills
A list of all the known
MoveSkill s. |
java.lang.String |
name
The name of the move skill.
|
int |
range
The range at which this move skill can be used.
|
net.minecraft.util.ResourceLocation |
sprite
The sprite that will be used in the GUIs.
|
boolean |
usePP
Whether or not PP will be required and consumed by the successful use of this move skill.
|
Constructor and Description |
---|
MoveSkill(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
applyCooldown(Pokemon pokemon,
int cooldownTicks) |
boolean |
checkForPP(Pokemon pokemon) |
MoveSkill |
describe(java.lang.String... descriptions)
Adds the given strings onto the description of the move skill.
|
static MoveSkill |
getMoveSkillByID(java.lang.String moveSkillID)
Gets the move skill that matches the given ID.
|
static java.util.List<MoveSkill> |
getMoveSkills(Pokemon pokemon)
Gets all the move skills that the given Pokémon is capable of using, ignoring cooldowns.
|
boolean |
hasMoveSkill(Pokemon pokemon)
Checks whether the given Pokémon is able to use this move skill, ignoring cooldowns.
|
boolean |
hasTargetType(MoveSkill.EnumTargetType targetType) |
static boolean |
isMoveSkill(java.lang.String moveSkillID)
Checks whether the given String matches a move skill's ID.
|
void |
onUsed(EntityPixelmon pixelmon,
java.lang.Object data,
MoveSkill.EnumTargetType targetType) |
void |
register(net.minecraft.entity.player.EntityPlayerMP player)
Unregisters this move skill from the given player.
|
MoveSkill |
setAbleSpecs(java.util.ArrayList<PokemonSpec> specs) |
MoveSkill |
setAnyMoves(java.util.ArrayList<AttackBase> anyMoves) |
MoveSkill |
setAnyMoves(java.util.List<java.lang.Integer> anyMoves) |
MoveSkill |
setAnyMoves(java.lang.String... anyMoves) |
MoveSkill |
setBehaviourBlockTarget(java.util.function.BiFunction<EntityPixelmon,net.minecraft.util.Tuple<net.minecraft.util.math.BlockPos,net.minecraft.util.EnumFacing>,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourMultiTarget(java.util.function.BiFunction<EntityPixelmon,java.lang.Object,java.lang.Integer> cooldown,
MoveSkill.EnumTargetType... targetTypes) |
MoveSkill |
setBehaviourNoTarget(java.util.function.Function<EntityPixelmon,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourPlayerTarget(java.util.function.BiFunction<EntityPixelmon,net.minecraft.entity.player.EntityPlayerMP,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourPokemonTarget(java.util.function.BiFunction<EntityPixelmon,EntityPixelmon,java.lang.Integer> cooldown) |
MoveSkill |
setCombinationMoves(java.util.ArrayList<AttackBase> combinationMoves) |
MoveSkill |
setCombinationMoves(java.util.List<java.lang.Integer> combinationMoves) |
MoveSkill |
setCombinationMoves(java.lang.String... combinationMoves) |
MoveSkill |
setDefaultCooldownTicks(int cooldownTicks) |
MoveSkill |
setIcon(net.minecraft.util.ResourceLocation resourceLocation) |
MoveSkill |
setIntrinsicSpecs(java.util.ArrayList<PokemonSpec> specs) |
MoveSkill |
setName(java.lang.String name) |
MoveSkill |
setRange(int range) |
MoveSkill |
setUsePP(boolean usePP) |
void |
takePP(Pokemon pokemon) |
void |
unregister(net.minecraft.entity.player.EntityPlayerMP player)
Registers this move skill on the given player.
|
public static final java.util.ArrayList<MoveSkill> moveSkills
MoveSkill
s. Note that adding a custom entry
to this list will not inform the client; using register(net.minecraft.entity.player.EntityPlayerMP)
on login is the responsibility of the sidemod.public java.lang.String id
public java.lang.String name
public java.util.ArrayList<java.lang.String> descriptions
public net.minecraft.util.ResourceLocation sprite
public int cooldownTicks
public int range
public java.util.ArrayList<java.lang.Integer> anyMoves
public java.util.ArrayList<java.lang.Integer> combinationMoves
public java.util.ArrayList<PokemonSpec> ableSpecs
public java.util.ArrayList<PokemonSpec> intrinsicSpecs
public boolean usePP
public java.util.Map<MoveSkill.EnumTargetType,java.util.function.BiFunction<EntityPixelmon,java.lang.Object,java.lang.Integer>> behaviours
public static boolean isMoveSkill(java.lang.String moveSkillID)
public static MoveSkill getMoveSkillByID(java.lang.String moveSkillID)
public static java.util.List<MoveSkill> getMoveSkills(Pokemon pokemon)
public MoveSkill describe(java.lang.String... descriptions)
public void onUsed(EntityPixelmon pixelmon, java.lang.Object data, MoveSkill.EnumTargetType targetType)
public void applyCooldown(Pokemon pokemon, int cooldownTicks)
public boolean hasMoveSkill(Pokemon pokemon)
public MoveSkill setName(java.lang.String name)
public MoveSkill setDefaultCooldownTicks(int cooldownTicks)
public MoveSkill setRange(int range)
public MoveSkill setIcon(net.minecraft.util.ResourceLocation resourceLocation)
public MoveSkill setAnyMoves(java.lang.String... anyMoves)
public MoveSkill setAnyMoves(java.util.ArrayList<AttackBase> anyMoves)
public MoveSkill setAnyMoves(java.util.List<java.lang.Integer> anyMoves)
public MoveSkill setCombinationMoves(java.lang.String... combinationMoves)
public MoveSkill setCombinationMoves(java.util.ArrayList<AttackBase> combinationMoves)
public MoveSkill setCombinationMoves(java.util.List<java.lang.Integer> combinationMoves)
public MoveSkill setAbleSpecs(java.util.ArrayList<PokemonSpec> specs)
public MoveSkill setIntrinsicSpecs(java.util.ArrayList<PokemonSpec> specs)
public MoveSkill setBehaviourNoTarget(java.util.function.Function<EntityPixelmon,java.lang.Integer> cooldown)
public MoveSkill setBehaviourPokemonTarget(java.util.function.BiFunction<EntityPixelmon,EntityPixelmon,java.lang.Integer> cooldown)
public MoveSkill setBehaviourBlockTarget(java.util.function.BiFunction<EntityPixelmon,net.minecraft.util.Tuple<net.minecraft.util.math.BlockPos,net.minecraft.util.EnumFacing>,java.lang.Integer> cooldown)
public MoveSkill setBehaviourPlayerTarget(java.util.function.BiFunction<EntityPixelmon,net.minecraft.entity.player.EntityPlayerMP,java.lang.Integer> cooldown)
public MoveSkill setBehaviourMultiTarget(java.util.function.BiFunction<EntityPixelmon,java.lang.Object,java.lang.Integer> cooldown, MoveSkill.EnumTargetType... targetTypes)
public MoveSkill setUsePP(boolean usePP)
public boolean hasTargetType(MoveSkill.EnumTargetType targetType)
public boolean checkForPP(Pokemon pokemon)
public void takePP(Pokemon pokemon)
public void register(net.minecraft.entity.player.EntityPlayerMP player)
public void unregister(net.minecraft.entity.player.EntityPlayerMP player)