Modifier and Type | Field and Description |
---|---|
protected Ability |
ability |
Attack[] |
attacks |
Pokemon |
pokemon |
protected java.lang.String |
tempAbility |
Constructor and Description |
---|
Moveset() |
Moveset(Attack[] attacks,
Ability ability)
Initializes a moveset with attacks and an ability.
|
Moveset(Attack attack,
Ability ability)
Initializes the moveset with an attack and an ability.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Attack a) |
void |
addCurrentMovesToReminder()
Adds the current moves to the list of moves available via move reminder.
|
boolean |
addImmutable(java.util.Collection<ImmutableAttack> attacks) |
boolean |
addImmutable(ImmutableAttack... attacks) |
java.util.List<ImmutableAttack> |
asImmutable() |
void |
clear() |
boolean |
contains(java.lang.Object o) |
Moveset |
copy()
Makes a copy of the moveset.
|
void |
fromBytes(net.minecraft.network.PacketBuffer buf) |
Attack |
get(int index) |
Ability |
getAbility() |
java.util.List<ImmutableAttack> |
getReminderMoves() |
java.lang.String |
getTempAbility() |
boolean |
hasAbility() |
boolean |
hasAttack(Attack a)
Checks if the Pokémon has the specified attack.
|
boolean |
hasAttack(ImmutableAttack... moves)
Checks if the Pokémon has one of the specified moves.
|
boolean |
hasAttack(java.util.Optional<ImmutableAttack>... moves)
Checks if the Pokémon has one of the specified moves.
|
boolean |
hasAttackCategory(AttackCategory attackCategory)
Checks if the Pokémon has an offensive attack of a certain type.
|
boolean |
hasFullPP()
Checks if all of the moves in the moveset have full PP.
|
boolean |
hasOffensiveAttackType(Element... types)
Checks if the Pokémon has an offensive attack of certain types.
|
void |
healAllPP()
Restores the PP of all moves.
|
boolean |
isEmpty() |
TriBoolean |
isHiddenAbility() |
boolean |
isHiddenAbility(Pokemon pokemon) |
static Moveset |
loadMoveset(PokemonLink pokemon)
Loads a Pokémon's moveset with random moves from its pokemonLevel-up movepool.
|
void |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
Reads the moveset from NBT.
|
Attack |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAttack(ImmutableAttack removedAttack) |
void |
removeAttack(java.util.Optional<ImmutableAttack>... removedAttack) |
boolean |
removeIf(java.util.function.Predicate<? super Attack> predicate) |
void |
removeIllegalMoves()
Removes moves that the species/form should not be able to learn
|
void |
removeMovesFromReminder(java.util.Collection<ImmutableAttack> moves)
Removes the given moves from the list of moves available via move reminder.
|
void |
removeMovesFromReminder(ImmutableAttack... moves)
Removes the given moves from the list of moves available via move reminder.
|
boolean |
replaceMove(java.util.Optional<ImmutableAttack> oldMove,
Attack newMove)
Replaces a move in the moveset with another move.
|
void |
replaceWith(java.util.List<java.lang.String> attackIds)
Replaces the Pokémon moveset with a new one.
|
Attack |
set(int index,
Attack a) |
void |
setAbility(Ability ability) |
void |
setTempAbility(java.lang.String tempAbility) |
int |
size() |
void |
swap(int index,
int index2)
Swaps the positions of two attacks.
|
void |
toBytes(net.minecraft.network.PacketBuffer buf) |
java.lang.String |
toString() |
void |
tryNotifyPokemon() |
Moveset |
withPokemon(Pokemon pokemon) |
void |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
Writes the moveset to NBT.
|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, containsAll, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public Pokemon pokemon
public Attack[] attacks
protected Ability ability
protected java.lang.String tempAbility
public Moveset()
public Moveset(Attack[] attacks, Ability ability)
attacks
- The attacks in the moveset.ability
- The ability in the moveset.public void setTempAbility(java.lang.String tempAbility)
public java.lang.String getTempAbility()
public Attack get(int index)
public boolean add(Attack a)
public void tryNotifyPokemon()
public void swap(int index, int index2)
index
- One attack to swap.index2
- The attack to swap the first attack with.public Attack remove(int index)
public boolean removeIf(java.util.function.Predicate<? super Attack> predicate)
removeIf
in interface java.util.Collection<Attack>
public boolean remove(java.lang.Object o)
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public void clear()
public void writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to write to.public void readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to read from.public void fromBytes(net.minecraft.network.PacketBuffer buf)
public void toBytes(net.minecraft.network.PacketBuffer buf)
public void addCurrentMovesToReminder()
public void removeMovesFromReminder(ImmutableAttack... moves)
moves
- The moves to remove.public void removeMovesFromReminder(java.util.Collection<ImmutableAttack> moves)
moves
- The moves to remove.public boolean hasAttack(Attack a)
a
- The attack to check for.public boolean hasAttack(ImmutableAttack... moves)
moves
- The attack(s) to look for.@SafeVarargs public final boolean hasAttack(java.util.Optional<ImmutableAttack>... moves)
moves
- The attack(s) to look for.public boolean hasAttackCategory(AttackCategory attackCategory)
attackCategory
- The type to look for.public boolean hasOffensiveAttackType(Element... types)
types
- The types to look for.public boolean removeAttack(ImmutableAttack removedAttack)
@SafeVarargs public final void removeAttack(java.util.Optional<ImmutableAttack>... removedAttack)
public void replaceWith(java.util.List<java.lang.String> attackIds)
attackIds
- The attack IDs of the moves to replace the moveset with.public boolean hasFullPP()
public Moveset copy()
public boolean replaceMove(java.util.Optional<ImmutableAttack> oldMove, Attack newMove)
oldMove
- The name of the move to replace.newMove
- The move to replace the old move with.public void healAllPP()
public java.util.List<ImmutableAttack> getReminderMoves()
public static Moveset loadMoveset(PokemonLink pokemon)
pokemon
- The Pokémon to load.public Ability getAbility()
public void setAbility(Ability ability)
public boolean isHiddenAbility(Pokemon pokemon)
public TriBoolean isHiddenAbility()
public boolean addImmutable(java.util.Collection<ImmutableAttack> attacks)
public boolean addImmutable(ImmutableAttack... attacks)
public java.util.List<ImmutableAttack> asImmutable()
public boolean hasAbility()
public void removeIllegalMoves()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<Attack>