public class PCBox extends PokemonStorage
Modifier and Type | Field and Description |
---|---|
int |
boxNumber |
boolean |
hasChangedClientSide |
protected java.lang.String |
name |
PCStorage |
pc |
protected Pokemon[] |
pokemon |
static int |
POKEMON_PER_BOX |
protected java.lang.String |
wallpaper |
hasChanged, shouldSendUpdates, uuid
Constructor and Description |
---|
PCBox()
Only use this for JSON deserialization.
|
PCBox(PCStorage pc,
int boxNumber) |
Modifier and Type | Method and Description |
---|---|
void |
forEach(java.util.function.BiConsumer<Pokemon,StoragePosition> action) |
Pokemon |
get(int slot) |
Pokemon |
get(StoragePosition position) |
Pokemon[] |
getAll()
Gets a array of all pokemon within this storage.
|
java.io.File |
getFile() |
StoragePosition |
getFirstEmptyPosition() |
java.lang.String |
getName() |
java.util.List<net.minecraft.entity.player.ServerPlayerEntity> |
getPlayersToUpdate() |
StoragePosition |
getPosition(Pokemon pokemon) |
boolean |
getShouldSendUpdates() |
int |
getSlot(Pokemon pokemon) |
java.lang.String |
getWallpaper() |
PCBox |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt) |
void |
sendChangesToServer() |
void |
sendContents(net.minecraft.entity.player.ServerPlayerEntity player) |
void |
set(int slot,
Pokemon pokemon) |
void |
set(StoragePosition position,
Pokemon pokemon) |
void |
setName(java.lang.String name) |
void |
setWallpaper(java.lang.String wallpaper) |
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, hasSpace, notifyListener, notifyListenerAll, notifyListeners, notifyListenersAll, retrieveAll, setHasChanged, setNeedsSaving, toString, transfer, updateSingleCurryData, validate
public static final int POKEMON_PER_BOX
public transient PCStorage pc
public transient int boxNumber
protected Pokemon[] pokemon
protected java.lang.String name
protected java.lang.String wallpaper
public transient boolean hasChangedClientSide
public PCBox()
public PCBox(PCStorage pc, int boxNumber)
public Pokemon[] getAll()
PokemonStorage
getAll
in class PokemonStorage
public net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
writeToNBT
in class PokemonStorage
public PCBox readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
readFromNBT
in class PokemonStorage
public StoragePosition getPosition(Pokemon pokemon)
getPosition
in class PokemonStorage
public java.util.List<net.minecraft.entity.player.ServerPlayerEntity> getPlayersToUpdate()
getPlayersToUpdate
in class PokemonStorage
public int getSlot(Pokemon pokemon)
public java.io.File getFile()
getFile
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 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 void swap(StoragePosition position1, StoragePosition position2)
swap
in class PokemonStorage
public void swap(int slot1, int slot2)
public void sendContents(net.minecraft.entity.player.ServerPlayerEntity player)
public boolean getShouldSendUpdates()
getShouldSendUpdates
in class PokemonStorage
public java.lang.String getName()
public java.lang.String getWallpaper()
public void sendChangesToServer()
public void setName(java.lang.String name)
public void setWallpaper(java.lang.String wallpaper)