Class PixelmonClientData
java.lang.Object
com.pixelmonmod.pixelmon.client.gui.battles.PixelmonClientData
Object for displaying Pokemon in the GUI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanWhether this Pokémon is blocked from capture by BonusStats.The index of the boss mode of the Pokémon.Dynamax/Mega state of the Pokémon.floatThe fraction of experience that the Pokémon has gained in its pokemonLevel.The Pokémon's form.shortThe index of the Pokémon's gender.booleanWhether the Pokémon has the Gigantamax Factor.com.google.common.util.concurrent.AtomicDoubleThe current hp of the Pokémon.The Pokémon's held item.booleanWhether this Pokémon is in disguise.booleanWhether the Pokémon is currently switching in for a Pokémon.booleanWhether the Pokémon is currently switching out for another Pokémon.intThe Pokémon's pokemonLevel.booleanintThe maximum hp of the Pokémon.intNumber of shields in raids.booleanThe Pokémon's moveset.net.minecraft.network.chat.MutableComponentThe Pokémon's nickname.Whether the Pokémon is Shiny.The UUID of the Pokémon.intThe position of the Pokémon.The Pokémon's previous form.intThe Pokémon's species.intThe index of the Pokémon non-volatile status.intThe x coordinate of the Pokémon on the GUI. -
Constructor Summary
ConstructorsConstructorDescriptionInitializes an empty Pokémon.PixelmonClientData(Pokemon poke) Initializes a Pokémon.PixelmonClientData(PixelmonWrapper pixelmon) Initializes a Pokémon. -
Method Summary
Modifier and TypeMethodDescriptionstatic PixelmonClientData[]convertToGUI(List<PixelmonWrapper> pokemon) Converts a PixelmonWrapper list into a GUI-friendly version.voiddecodeFrom(net.minecraft.network.FriendlyByteBuf buffer) Decodes the Pokémon's info from a data buffer.voidencodeInto(net.minecraft.network.FriendlyByteBuf buffer) Encodes the Pokémon's info into a data buffer.booleanintGets the Pokédex number of the Pokémon.net.minecraft.network.chat.MutableComponentReturns the Pokémon's nickname.static ColorgetHealthColor(double health, int maxHealth) float[]getTypes()inthashCode()booleanvoidSets the Pokémon's data.void
-
Field Details
-
pokemonUUID
The UUID of the Pokémon. -
species
The Pokémon's species. -
form
The Pokémon's form. -
prevForm
The Pokémon's previous form. -
gender
public short genderThe index of the Pokémon's gender. -
health
public com.google.common.util.concurrent.AtomicDouble healthThe current hp of the Pokémon. -
maxHealth
public int maxHealthThe maximum hp of the Pokémon. -
dynamax
Dynamax/Mega state of the Pokémon. -
mega
public boolean mega -
types
-
nickname
public net.minecraft.network.chat.MutableComponent nicknameThe Pokémon's nickname. -
status
public int statusThe index of the Pokémon non-volatile status. -
level
public int levelThe Pokémon's pokemonLevel. -
bossTier
The index of the boss mode of the Pokémon. -
palette
Whether the Pokémon is Shiny. -
gmaxFactor
public boolean gmaxFactorWhether the Pokémon has the Gigantamax Factor. -
position
public int positionThe position of the Pokémon. -
moveset
The Pokémon's moveset. -
heldItem
The Pokémon's held item. -
expFraction
public float expFractionThe fraction of experience that the Pokémon has gained in its pokemonLevel. -
xPos
public int xPosThe x coordinate of the Pokémon on the GUI. -
isSwitchingOut
public boolean isSwitchingOutWhether the Pokémon is currently switching out for another Pokémon. -
isSwitchingIn
public boolean isSwitchingInWhether the Pokémon is currently switching in for a Pokémon. -
blockCapture
public boolean blockCaptureWhether this Pokémon is blocked from capture by BonusStats. -
inIllusion
public boolean inIllusionWhether this Pokémon is in disguise. -
maxShields
public int maxShieldsNumber of shields in raids. -
shields
public int shields -
lostShield
public boolean lostShield
-
-
Constructor Details
-
PixelmonClientData
public PixelmonClientData()Initializes an empty Pokémon. -
PixelmonClientData
Initializes a Pokémon.- Parameters:
poke- The data of the Pokémon to initialize.
-
PixelmonClientData
Initializes a Pokémon.- Parameters:
pixelmon- The Pokémon to initialize.
-
-
Method Details
-
set
Sets the Pokémon's data.- Parameters:
poke- The data to set the Pokémon to.
-
convertToGUI
Converts a PixelmonWrapper list into a GUI-friendly version.- Parameters:
pokemon- The list of Pokémon to convert.- Returns:
- A GUI-friendly list of the Pokémon.
-
decodeFrom
public void decodeFrom(net.minecraft.network.FriendlyByteBuf buffer) Decodes the Pokémon's info from a data buffer.- Parameters:
buffer- The data buffer to read from.
-
encodeInto
public void encodeInto(net.minecraft.network.FriendlyByteBuf buffer) Encodes the Pokémon's info into a data buffer.- Parameters:
buffer- The data buffer to write to.
-
getDisplayName
public net.minecraft.network.chat.MutableComponent getDisplayName()Returns the Pokémon's nickname.- Returns:
- The Pokémon's nickname.
-
getDexNumber
public int getDexNumber()Gets the Pokédex number of the Pokémon.- Returns:
- The Pokédex number of the Pokémon.
-
getBaseStats
-
getGender
-
getStatusTexturePos
public float[] getStatusTexturePos() -
getHealthColor
-
getTypes
-
hasType
-
setTypes
-
toPokemonBase
-
equals
-
hashCode
public int hashCode()
-