public class MoveSkill
extends java.lang.Object
moveSkills
list
and using register(net.minecraft.entity.player.ServerPlayerEntity)
when a player logs in. unregister(net.minecraft.entity.player.ServerPlayerEntity)
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.Set<net.minecraftforge.common.util.Lazy<PokemonSpecification>> |
ableSpecs |
java.util.Set<net.minecraftforge.common.util.Lazy<ImmutableAttack>> |
anyMoves |
java.util.Map<MoveSkill.EnumTargetType,java.util.function.BiFunction<PixelmonEntity,java.lang.Object,java.lang.Integer>> |
behaviours
All of the behaviours this move skill allows for different types of target.
|
java.util.Set<net.minecraftforge.common.util.Lazy<ImmutableAttack>> |
combinationMoves |
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.Set<net.minecraftforge.common.util.Lazy<PokemonSpecification>> |
intrinsicSpecs |
static java.util.List<MoveSkill> |
moveSkills |
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) |
boolean |
hasTargetType(MoveSkill.EnumTargetType targetType) |
static boolean |
isMoveSkill(java.lang.String moveSkillID)
Checks whether the given String matches a move skill's ID.
|
boolean |
matchesAbleSpecs(Pokemon pokemon) |
boolean |
matchesAnyMoves(Pokemon pokemon) |
boolean |
matchesCombinationMoves(Pokemon pokemon) |
boolean |
matchesIntrinsicSpecs(Pokemon pokemon) |
void |
onUsed(PixelmonEntity pixelmon,
java.lang.Object data,
MoveSkill.EnumTargetType targetType) |
void |
register(net.minecraft.entity.player.ServerPlayerEntity player) |
MoveSkill |
setAbleSpecs(java.util.List<PokemonSpecification> specs) |
MoveSkill |
setAnyMoves(java.util.List<ImmutableAttack> anyMoves) |
MoveSkill |
setAnyMoves(java.lang.String... anyMoves) |
MoveSkill |
setBehaviourBlockTarget(java.util.function.BiFunction<PixelmonEntity,net.minecraft.util.Tuple<net.minecraft.util.math.BlockPos,net.minecraft.util.Direction>,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourMultiTarget(java.util.function.BiFunction<PixelmonEntity,java.lang.Object,java.lang.Integer> cooldown,
MoveSkill.EnumTargetType... targetTypes) |
MoveSkill |
setBehaviourNoTarget(java.util.function.Function<PixelmonEntity,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourPlayerTarget(java.util.function.BiFunction<PixelmonEntity,net.minecraft.entity.player.ServerPlayerEntity,java.lang.Integer> cooldown) |
MoveSkill |
setBehaviourPokemonTarget(java.util.function.BiFunction<PixelmonEntity,PixelmonEntity,java.lang.Integer> cooldown) |
MoveSkill |
setCombinationMoves(java.util.List<ImmutableAttack> combinationMoves) |
MoveSkill |
setCombinationMoves(java.lang.String... combinationMoves) |
MoveSkill |
setDefaultCooldownTicks(int cooldownTicks) |
MoveSkill |
setIcon(net.minecraft.util.ResourceLocation resourceLocation) |
MoveSkill |
setIntrinsicSpecs(java.util.List<PokemonSpecification> 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.ServerPlayerEntity player) |
public static final java.util.List<MoveSkill> moveSkills
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.Set<net.minecraftforge.common.util.Lazy<ImmutableAttack>> anyMoves
public java.util.Set<net.minecraftforge.common.util.Lazy<ImmutableAttack>> combinationMoves
public java.util.Set<net.minecraftforge.common.util.Lazy<PokemonSpecification>> ableSpecs
public java.util.Set<net.minecraftforge.common.util.Lazy<PokemonSpecification>> intrinsicSpecs
public boolean usePP
public java.util.Map<MoveSkill.EnumTargetType,java.util.function.BiFunction<PixelmonEntity,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(PixelmonEntity 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.List<ImmutableAttack> anyMoves)
public MoveSkill setCombinationMoves(java.lang.String... combinationMoves)
public MoveSkill setCombinationMoves(java.util.List<ImmutableAttack> combinationMoves)
public MoveSkill setAbleSpecs(java.util.List<PokemonSpecification> specs)
public MoveSkill setIntrinsicSpecs(java.util.List<PokemonSpecification> specs)
public MoveSkill setBehaviourNoTarget(java.util.function.Function<PixelmonEntity,java.lang.Integer> cooldown)
public MoveSkill setBehaviourPokemonTarget(java.util.function.BiFunction<PixelmonEntity,PixelmonEntity,java.lang.Integer> cooldown)
public MoveSkill setBehaviourBlockTarget(java.util.function.BiFunction<PixelmonEntity,net.minecraft.util.Tuple<net.minecraft.util.math.BlockPos,net.minecraft.util.Direction>,java.lang.Integer> cooldown)
public MoveSkill setBehaviourPlayerTarget(java.util.function.BiFunction<PixelmonEntity,net.minecraft.entity.player.ServerPlayerEntity,java.lang.Integer> cooldown)
public MoveSkill setBehaviourMultiTarget(java.util.function.BiFunction<PixelmonEntity,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 boolean matchesIntrinsicSpecs(Pokemon pokemon)
public boolean matchesAbleSpecs(Pokemon pokemon)
public boolean matchesCombinationMoves(Pokemon pokemon)
public boolean matchesAnyMoves(Pokemon pokemon)
public void register(net.minecraft.entity.player.ServerPlayerEntity player)
public void unregister(net.minecraft.entity.player.ServerPlayerEntity player)