public class PartyStorage extends PokemonStorage
Modifier and Type | Field and Description |
---|---|
static int |
MAX_PARTY |
protected Pokemon[] |
party |
protected Pokemon[] |
tempParty |
protected java.awt.Color |
tempPartyColor |
hasChanged, shouldSendUpdates, uuid
Constructor and Description |
---|
PartyStorage(java.util.UUID uuid) |
Modifier and Type | Method and Description |
---|---|
void |
copyToTemporaryMode(java.awt.Color color)
Puts the player's party into temporary mode using a deep copy of their existing party (so any changes made won't
impact their original party Pokémon)
|
int |
countAblePokemon() |
void |
enterTemporaryMode()
Enters the party into temporary mode using a default RED colour
|
void |
enterTemporaryMode(java.awt.Color color)
Enters the party into the temporary mode with 0 Pokes
You can add to their temp mode party using
PokemonStorage.add(Pokemon) |
void |
forEach(java.util.function.BiConsumer<Pokemon,StoragePosition> action) |
Pokemon |
get(int slot) |
Pokemon |
get(StoragePosition position) |
Pokemon |
get(java.util.UUID pokemonUUID) |
Pokemon[] |
getAll()
Gets a array of all pokemon within this storage.
|
PixelmonEntity |
getAndSendOutFirstAblePokemon(net.minecraft.entity.Entity parent) |
int |
getAverageLevel() |
java.io.File |
getFile() |
Pokemon |
getFirstAblePokemon() |
Pokemon |
getFirstBattleReadyPokemon()
Alternative to getFirstAblePokemon() that checks if the Pokémon can
battle instead of checking if the Pokémon's entity can battle.
|
StoragePosition |
getFirstEmptyPosition() |
int |
getHighestLevel() |
int |
getLowestLevel() |
Pokemon[] |
getOriginalParty()
Gets the non-temp mode party (only useful if in temp mode)
|
java.util.List<net.minecraft.entity.player.ServerPlayerEntity> |
getPlayersToUpdate() |
StoragePosition |
getPosition(Pokemon pokemon) |
int |
getSlot(Pokemon pokemon) |
int |
getSlot(java.util.UUID pokemonUUID) |
java.util.List<Pokemon> |
getTeam() |
java.awt.Color |
getTempPartyColor() |
void |
heal() |
boolean |
inTemporaryMode()
Checks if the player's party is in "temporary" mode (i.e.
|
Quadstate |
isOldGen(net.minecraft.util.RegistryKey<net.minecraft.world.World> dimension) |
PartyStorage |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt) |
void |
set(int slot,
Pokemon pokemon) |
void |
set(StoragePosition position,
Pokemon pokemon) |
void |
setInTemporaryMode(boolean tempMode,
java.awt.Color color,
Pokemon... pokemons) |
void |
setInTemporaryModeClient(boolean tempMode,
java.awt.Color color) |
void |
setOriginal(int slot,
Pokemon pokemon)
A bypass method for setting the original party when the player's party is in temporary mode
|
void |
setOriginal(StoragePosition position,
Pokemon pokemon)
A bypass method for setting the original party when the player's party is in temporary mode
|
void |
setTempPartyColor(java.awt.Color tempPartyColor) |
void |
swap(int slot1,
int slot2) |
void |
swap(StoragePosition position1,
StoragePosition position2) |
net.minecraft.nbt.CompoundNBT |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt) |
add, canTransfer, countAll, countEggs, countPokemon, doWithoutSendingUpdates, find, findAll, findAll, findOne, findOne, getCurryData, getShouldSave, getShouldSendUpdates, hasSpace, notifyListener, notifyListenerAll, notifyListeners, notifyListenersAll, retrieveAll, setHasChanged, setNeedsSaving, toString, transfer, updateSingleCurryData, validate
public static final int MAX_PARTY
protected Pokemon[] party
protected Pokemon[] tempParty
protected java.awt.Color tempPartyColor
public boolean inTemporaryMode()
public void copyToTemporaryMode(java.awt.Color color)
color
- The colour on the sidebarpublic void enterTemporaryMode()
public void enterTemporaryMode(java.awt.Color color)
PokemonStorage.add(Pokemon)
color
- The colour to display on the sidebarpublic void setInTemporaryModeClient(boolean tempMode, java.awt.Color color)
public void setInTemporaryMode(boolean tempMode, java.awt.Color color, Pokemon... pokemons)
public void setTempPartyColor(java.awt.Color tempPartyColor)
public java.awt.Color getTempPartyColor()
public Pokemon[] getAll()
PokemonStorage
getAll
in class PokemonStorage
public Pokemon[] getOriginalParty()
public net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
writeToNBT
in class PokemonStorage
public PartyStorage readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
readFromNBT
in class PokemonStorage
@Nullable public StoragePosition getFirstEmptyPosition()
getFirstEmptyPosition
in class PokemonStorage
public void forEach(java.util.function.BiConsumer<Pokemon,StoragePosition> action)
forEach
in class PokemonStorage
public void setOriginal(int slot, Pokemon pokemon)
slot
- The slot to setpokemon
- The Pokémon to set it topublic void setOriginal(StoragePosition position, Pokemon pokemon)
position
- The position to setpokemon
- The Pokémon to set it topublic void set(StoragePosition position, Pokemon pokemon)
set
in class PokemonStorage
public void set(int slot, Pokemon pokemon)
@Nullable public Pokemon get(StoragePosition position)
get
in class PokemonStorage
@Nullable public Pokemon get(int slot)
public Pokemon get(java.util.UUID pokemonUUID)
public int getSlot(Pokemon pokemon)
public int getSlot(java.util.UUID pokemonUUID)
public java.util.List<Pokemon> getTeam()
public void heal()
public void swap(StoragePosition position1, StoragePosition position2)
swap
in class PokemonStorage
public void swap(int slot1, int slot2)
public StoragePosition getPosition(Pokemon pokemon)
getPosition
in class PokemonStorage
public java.util.List<net.minecraft.entity.player.ServerPlayerEntity> getPlayersToUpdate()
getPlayersToUpdate
in class PokemonStorage
public java.io.File getFile()
getFile
in class PokemonStorage
public int countAblePokemon()
public int getHighestLevel()
public int getAverageLevel()
public int getLowestLevel()
public Pokemon getFirstAblePokemon()
public Pokemon getFirstBattleReadyPokemon()
public PixelmonEntity getAndSendOutFirstAblePokemon(net.minecraft.entity.Entity parent)
public Quadstate isOldGen(net.minecraft.util.RegistryKey<net.minecraft.world.World> dimension)