public class LearnMoveController
extends java.lang.Object
Constructor and Description |
---|
LearnMoveController() |
Modifier and Type | Method and Description |
---|---|
static void |
addLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move) |
static void |
addLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move,
java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> condition) |
static boolean |
canLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move)
Called via the
ReplaceMove packet to verify the player could learn this move. |
static void |
clearLearnMoves(net.minecraft.entity.player.EntityPlayerMP player) |
static void |
clearLearnMoves(java.util.UUID player) |
static boolean |
hasCondition(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move) |
static java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> |
itemCostCondition(java.util.Collection<net.minecraft.item.ItemStack> costs)
Common condition for npcs and tm's so its in here so we have less repeat code.
|
static java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> |
itemCostCondition(net.minecraft.item.ItemStack cost)
Common condition for npcs and tm's so its in here so we have less repeat code.
|
static void |
sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move)
Registers the move and opens the move replacement screen.
|
static void |
sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move,
boolean checkEvo)
Registers the move and opens the move replacement screen.
|
static void |
sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player,
java.util.UUID pokemon,
AttackBase move,
java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> condition)
Registers the move and opens the move replacement screen.
|
static void |
tick(net.minecraft.world.World world) |
public static boolean canLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move)
ReplaceMove
packet to verify the player could learn this move.player
- The player trying to learn the move.pokemon
- The uuid of the pokemon learning the move.move
- The move the player is trying to learn.public static boolean hasCondition(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move)
public static void addLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move)
public static void addLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move, java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> condition)
public static void sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move)
Moveset
is full. You should check if the Pokemon's Moveset
has less then 4 moves. If so, then simply add the move and send a message telling them it was added.player
- The player who owns the pokemon and will choose which move to replace.pokemon
- The pokemon who will learn the move.move
- The move the pokemon will learn.public static void sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move, boolean checkEvo)
Moveset
is full. You should check if the Pokemon's Moveset
has less then 4 moves. If so, then simply add the move and send a message telling them it was added.player
- The player who owns the pokemon and will choose which move to replace.pokemon
- The pokemon who will learn the move.move
- The move the pokemon will learn.public static void sendLearnMove(net.minecraft.entity.player.EntityPlayerMP player, java.util.UUID pokemon, AttackBase move, java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> condition)
Moveset
is full. You should check if the Pokemon's Moveset
has less then 4 moves. If so, then simply add the move and send a message telling them it was added.player
- The player who owns the pokemon and will choose which move to replace.pokemon
- The pokemon who will learn the move.move
- The move the pokemon will learn.condition
- A predicate that will be called after the user has selected to learn the move.
If you return false the move learning will be canceled. It is recommended you send a message before returning false.public static void clearLearnMoves(net.minecraft.entity.player.EntityPlayerMP player)
public static void clearLearnMoves(java.util.UUID player)
public static java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> itemCostCondition(net.minecraft.item.ItemStack cost)
cost
- The item to be taken if the user accepts the move.addLearnMove(net.minecraft.entity.player.EntityPlayerMP, java.util.UUID, com.pixelmonmod.pixelmon.battles.attacks.AttackBase)
public static java.util.function.Predicate<net.minecraft.entity.player.EntityPlayerMP> itemCostCondition(java.util.Collection<net.minecraft.item.ItemStack> costs)
costs
- The items to be taken if the user accepts the move.addLearnMove(net.minecraft.entity.player.EntityPlayerMP, java.util.UUID, com.pixelmonmod.pixelmon.battles.attacks.AttackBase)
public static void tick(net.minecraft.world.World world)