Class MoveSkill
java.lang.Object
com.pixelmonmod.pixelmon.api.moveskills.MoveSkill
Represents a usable move skill. All move skills are instances of this object.
Creating a new move skill can be done by adding it to the
Conversely, move skills can be unregistered by running
New move skills can be created without any client-side modding, but the icon selection is limited to those provided for Reforged's default move skills.
Creating a new move skill can be done by adding it to the
moveSkills
list
and using register(net.minecraft.server.level.ServerPlayer)
when a player logs in. Conversely, move skills can be unregistered by running
unregister(net.minecraft.server.level.ServerPlayer)
when a
player logs in. New move skills can be created without any client-side modding, but the icon selection is limited to those provided for Reforged's default move skills.
- Since:
- October 6, 2019
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The types of targets that an external move can target. -
Field Summary
Modifier and TypeFieldDescriptionAll of the behaviours this move skill allows for different types of target.int
The base time for the skill to require to cooldown.The description of the move skill.The name of the move skill.int
The range at which this move skill can be used.net.minecraft.resources.ResourceLocation
The sprite that will be used in the GUIs.boolean
Whether or not PP will be required and consumed by the successful use of this move skill. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyCooldown
(Pokemon pokemon, int cooldownTicks) boolean
checkForPP
(Pokemon pokemon) Adds the given strings onto the description of the move skill.static MoveSkill
getMoveSkillByID
(String moveSkillID) Gets the move skill that matches the given ID.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
(String moveSkillID) Checks whether the given String matches a move skill's ID.void
onUsed
(PixelmonEntity pixelmon, Object data, MoveSkill.EnumTargetType targetType) void
register
(net.minecraft.server.level.ServerPlayer player) setAbleSpecs
(List<PokemonSpecification> specs) setAnyMoves
(String... anyMoves) setAnyMoves
(List<ImmutableAttack> anyMoves) setBehaviourBlockTarget
(BiFunction<PixelmonEntity, net.minecraft.util.Tuple<net.minecraft.core.BlockPos, net.minecraft.core.Direction>, Integer> cooldown) setBehaviourMultiTarget
(BiFunction<PixelmonEntity, Object, Integer> cooldown, MoveSkill.EnumTargetType... targetTypes) setBehaviourNoTarget
(Function<PixelmonEntity, Integer> cooldown) setBehaviourPlayerTarget
(BiFunction<PixelmonEntity, net.minecraft.server.level.ServerPlayer, Integer> cooldown) setCombinationMoves
(String... combinationMoves) setCombinationMoves
(ArrayList<ImmutableAttack> combinationMoves) setDefaultCooldownTicks
(int cooldownTicks) setIcon
(net.minecraft.resources.ResourceLocation resourceLocation) setRange
(int range) setUsePP
(boolean usePP) void
void
unregister
(net.minecraft.server.level.ServerPlayer player)
-
Field Details
-
moveSkills
-
id
-
name
The name of the move skill. In Reforged cases this is just a lang key. -
descriptions
The description of the move skill. In Reforged cases this is just a series of lang keys. -
sprite
public net.minecraft.resources.ResourceLocation spriteThe sprite that will be used in the GUIs. -
cooldownTicks
public int cooldownTicksThe base time for the skill to require to cooldown. -
range
public int rangeThe range at which this move skill can be used. This only applies for non-NOTHING target types. -
anyMoves
-
combinationMoves
-
ableSpecs
-
intrinsicSpecs
-
usePP
public boolean usePPWhether or not PP will be required and consumed by the successful use of this move skill. -
behaviours
All of the behaviours this move skill allows for different types of target.
-
-
Constructor Details
-
MoveSkill
-
-
Method Details
-
isMoveSkill
Checks whether the given String matches a move skill's ID. -
getMoveSkillByID
Gets the move skill that matches the given ID. Can be null. -
getMoveSkills
Gets all the move skills that the given Pokémon is capable of using, ignoring cooldowns. -
describe
Adds the given strings onto the description of the move skill. -
onUsed
-
applyCooldown
-
hasMoveSkill
-
setName
-
setDefaultCooldownTicks
-
setRange
-
setIcon
-
setAnyMoves
-
setAnyMoves
-
setCombinationMoves
-
setCombinationMoves
-
setAbleSpecs
-
setIntrinsicSpecs
-
setBehaviourNoTarget
-
setBehaviourPokemonTarget
public MoveSkill setBehaviourPokemonTarget(BiFunction<PixelmonEntity, PixelmonEntity, Integer> cooldown) -
setBehaviourBlockTarget
public MoveSkill setBehaviourBlockTarget(BiFunction<PixelmonEntity, net.minecraft.util.Tuple<net.minecraft.core.BlockPos, net.minecraft.core.Direction>, Integer> cooldown) -
setBehaviourPlayerTarget
public MoveSkill setBehaviourPlayerTarget(BiFunction<PixelmonEntity, net.minecraft.server.level.ServerPlayer, Integer> cooldown) -
setBehaviourMultiTarget
public MoveSkill setBehaviourMultiTarget(BiFunction<PixelmonEntity, Object, Integer> cooldown, MoveSkill.EnumTargetType... targetTypes) -
setUsePP
-
hasTargetType
-
checkForPP
-
takePP
-
register
public void register(net.minecraft.server.level.ServerPlayer player) -
unregister
public void unregister(net.minecraft.server.level.ServerPlayer player)
-