Interface ResearchStorageSaveAdapter
- All Known Implementing Classes:
NBTStorageSaveAdapter
public interface ResearchStorageSaveAdapter
Interface for the persistence adapter of
Both the save and load methods must work for all
This class will be registered on the Forge event bus by the
ResearchStorage
s. The only provided
implementation is the NBTStorageSaveAdapter
which writes into the
.research files. However, custom implementations can handle this in any way as
long as load(UUID)
never returns null. Both the save and load methods must work for all
ResearchStorage
s. This class will be registered on the Forge event bus by the
Pixelmon
class
after the PixelmonInitEvent
- Since:
- August 6, 2024 (Pixelmon 9.2.9)
-
Method Summary
Modifier and TypeMethodDescriptionLoads the specified type ofResearchStorage
saved under the specified UUID.void
save
(ResearchStorage storage) Saves the givenResearchStorage
into persistent data.
-
Method Details
-
save
Saves the givenResearchStorage
into persistent data. The UUID and storage type can be derived from the parameter.- Parameters:
storage
- TheResearchStorage
that must be saved.
-
load
Loads the specified type ofResearchStorage
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 customResearchStorage
implementations work differently
-