Interface PokeDexStorageSaveAdapter
- All Known Implementing Classes:
NBTStorageSaveAdapter
public interface PokeDexStorageSaveAdapter
Interface for the persistence adapter of
never returns null.
Both the save and load methods must work for all
This class will be registered on the Forge event bus by the
PokedexStorage
s. The only provided
implementation is the NBTStorageSaveAdapter
which writes into the
.pokedex files. However, custom implementations can handle this in any way as
long as
invalid reference
#load(UUID)
Both the save and load methods must work for all
PokedexStorage
s. This class will be registered on the Forge event bus by the
Pixelmon
class
after the PixelmonInitEvent
-
Method Summary
Modifier and TypeMethodDescriptionLoads the specified type ofPokedexStorage
saved under the specified UUID.void
save
(PokedexStorage storage, net.minecraft.core.RegistryAccess registryAccess) Saves the givenPokedexStorage
into persistent data.
-
Method Details
-
save
Saves the givenPokedexStorage
into persistent data. The UUID and storage type can be derived from the parameter.- Parameters:
storage
- ThePokedexStorage
that must be saved.
-
load
Loads the specified type ofPokedexStorage
saved under the specified UUID. The returned value must not be null. If a storage for the UUID and class does not already exist, it must be created and returned.- Parameters:
uuid
- The UUID of the storage to load. This is typically a player UUID, but it's possible that customPokedexStorage
implementations work differently
-