Interface PokeDexStorageSaveAdapter

All Known Implementing Classes:
NBTStorageSaveAdapter

public interface PokeDexStorageSaveAdapter
Interface for the persistence adapter of PokedexStorages. 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)
never returns null.

Both the save and load methods must work for all PokedexStorages.

This class will be registered on the Forge event bus by the Pixelmon class after the PixelmonInitEvent
  • Method Summary

    Modifier and Type
    Method
    Description
    load(UUID uuid, net.minecraft.core.RegistryAccess registryAccess)
    Loads the specified type of PokedexStorage saved under the specified UUID.
    void
    save(PokedexStorage storage, net.minecraft.core.RegistryAccess registryAccess)
    Saves the given PokedexStorage into persistent data.
  • Method Details

    • save

      void save(PokedexStorage storage, net.minecraft.core.RegistryAccess registryAccess)
      Saves the given PokedexStorage into persistent data. The UUID and storage type can be derived from the parameter.
      Parameters:
      storage - The PokedexStorage that must be saved.
    • load

      @Nonnull PokedexStorage load(UUID uuid, net.minecraft.core.RegistryAccess registryAccess)
      Loads the specified type of PokedexStorage 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 custom PokedexStorage implementations work differently