public class LearnMoveController
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LearnMoveController.LearnMove |
| Constructor and Description |
|---|
LearnMoveController() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move) |
static void |
addLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move,
java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> condition) |
static boolean |
canLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move)
Called via the
ReplaceMovePacket packet to verify the player could learn this move. |
static void |
clearLearnMoves(net.minecraft.entity.player.ServerPlayerEntity player) |
static void |
clearLearnMoves(java.util.UUID player) |
static boolean |
hasCondition(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move) |
static java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> |
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.ServerPlayerEntity> |
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.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move)
Registers the move and opens the move replacement screen.
|
static void |
sendLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move,
boolean checkEvo)
Registers the move and opens the move replacement screen.
|
static void |
sendLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move,
java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> 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.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move)
ReplaceMovePacket 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.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move)
public static void addLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move)
public static void addLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move,
java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> condition)
public static void sendLearnMove(net.minecraft.entity.player.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack 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.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack 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.ServerPlayerEntity player,
java.util.UUID pokemon,
ImmutableAttack move,
java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> 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.ServerPlayerEntity player)
public static void clearLearnMoves(java.util.UUID player)
public static java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> itemCostCondition(net.minecraft.item.ItemStack cost)
cost - The item to be taken if the user accepts the move.addLearnMove(net.minecraft.entity.player.ServerPlayerEntity, java.util.UUID, com.pixelmonmod.pixelmon.battles.attacks.ImmutableAttack)public static java.util.function.Predicate<net.minecraft.entity.player.ServerPlayerEntity> 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.ServerPlayerEntity, java.util.UUID, com.pixelmonmod.pixelmon.battles.attacks.ImmutableAttack)public static void tick(net.minecraft.world.World world)