public class PCStorage extends PokemonStorage
| Modifier and Type | Field and Description |
|---|---|
protected PCBox[] |
boxes |
protected int |
lastBox |
protected java.util.List<PCBox> |
overflowBoxes |
java.lang.String |
playerName |
java.util.UUID |
playerUUID |
hasChanged, shouldSendUpdates, uuid| Constructor and Description |
|---|
PCStorage(java.util.UUID uuid) |
PCStorage(java.util.UUID uuid,
int boxes) |
| Modifier and Type | Method and Description |
|---|---|
void |
forEach(java.util.function.BiConsumer<Pokemon,StoragePosition> action) |
Pokemon |
get(int box,
int slot) |
Pokemon |
get(StoragePosition position) |
Pokemon[] |
getAll()
Gets a array of all pokemon within this storage.
|
PCBox |
getBox(int boxNumber) |
int |
getBoxCount() |
PCBox[] |
getBoxes() |
java.io.File |
getFile() |
StoragePosition |
getFirstEmptyPosition() |
int |
getLastBox() |
java.util.List<net.minecraft.entity.player.ServerPlayerEntity> |
getPlayersToUpdate() |
StoragePosition |
getPosition(Pokemon pokemon) |
boolean |
getShouldSave() |
PCStorage |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt) |
void |
sendContents(net.minecraft.entity.player.ServerPlayerEntity player) |
void |
set(int box,
int slot,
Pokemon pokemon) |
void |
set(StoragePosition position,
Pokemon pokemon) |
void |
setHasChanged(boolean hasChanged) |
void |
setLastBox(int lastBox) |
void |
setPlayer(java.util.UUID playerUUID,
java.lang.String playerName) |
void |
swap(int box1,
int slot1,
int box2,
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, getShouldSendUpdates, hasSpace, notifyListener, notifyListenerAll, notifyListeners, notifyListenersAll, retrieveAll, setNeedsSaving, toString, transfer, updateSingleCurryData, validateprotected PCBox[] boxes
protected java.util.List<PCBox> overflowBoxes
protected int lastBox
public java.util.UUID playerUUID
public java.lang.String playerName
public PCStorage(java.util.UUID uuid,
int boxes)
public PCStorage(java.util.UUID uuid)
public void setPlayer(java.util.UUID playerUUID,
java.lang.String playerName)
public int getLastBox()
public void setLastBox(int lastBox)
public PCBox[] getBoxes()
public PCBox getBox(int boxNumber)
public int getBoxCount()
public Pokemon[] getAll()
PokemonStoragegetAll in class PokemonStoragepublic net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
writeToNBT in class PokemonStoragepublic PCStorage readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
readFromNBT in class PokemonStoragepublic StoragePosition getFirstEmptyPosition()
getFirstEmptyPosition in class PokemonStoragepublic void forEach(java.util.function.BiConsumer<Pokemon,StoragePosition> action)
forEach in class PokemonStoragepublic void set(StoragePosition position, Pokemon pokemon)
set in class PokemonStoragepublic void set(int box,
int slot,
Pokemon pokemon)
@Nullable public Pokemon get(StoragePosition position)
get in class PokemonStorage@Nullable public Pokemon get(int box, int slot)
public void swap(StoragePosition position1, StoragePosition position2)
swap in class PokemonStoragepublic void swap(int box1,
int slot1,
int box2,
int slot2)
public StoragePosition getPosition(Pokemon pokemon)
getPosition in class PokemonStoragepublic java.util.List<net.minecraft.entity.player.ServerPlayerEntity> getPlayersToUpdate()
getPlayersToUpdate in class PokemonStoragepublic java.io.File getFile()
getFile in class PokemonStoragepublic boolean getShouldSave()
getShouldSave in class PokemonStoragepublic void setHasChanged(boolean hasChanged)
setHasChanged in class PokemonStoragepublic void sendContents(net.minecraft.entity.player.ServerPlayerEntity player)