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, validate
protected 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()
PokemonStorage
getAll
in class PokemonStorage
public net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
writeToNBT
in class PokemonStorage
public PCStorage readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
readFromNBT
in class PokemonStorage
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 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 PokemonStorage
public void swap(int box1, int slot1, int box2, 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 boolean getShouldSave()
getShouldSave
in class PokemonStorage
public void setHasChanged(boolean hasChanged)
setHasChanged
in class PokemonStorage
public void sendContents(net.minecraft.entity.player.ServerPlayerEntity player)