Class ClientStorageRepository
java.lang.Object
com.refinedmods.refinedstorage.common.storage.ClientStorageRepository
- All Implemented Interfaces:
StorageRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a storage by ID, if it exists.Retrieves info for a given storage ID.void
Marks to be saved.void
Removes a storage by ID.removeIfEmpty
(UUID id) If the storage exists, and is empty, it will remove the storage from the repository.void
set
(UUID id, SerializableStorage storage) Sets a storage by ID.void
-
Constructor Details
-
ClientStorageRepository
-
-
Method Details
-
get
Description copied from interface:StorageRepository
Retrieves a storage by ID, if it exists.- Specified by:
get
in interfaceStorageRepository
- Parameters:
id
- the id- Returns:
- the storage, if present
-
set
Description copied from interface:StorageRepository
Sets a storage by ID.- Specified by:
set
in interfaceStorageRepository
- Parameters:
id
- the idstorage
- the storage
-
removeIfEmpty
Description copied from interface:StorageRepository
If the storage exists, and is empty, it will remove the storage from the repository.- Specified by:
removeIfEmpty
in interfaceStorageRepository
- Parameters:
id
- the id- Returns:
- the removed storage, if it existed and was empty
-
remove
Description copied from interface:StorageRepository
Removes a storage by ID.- Specified by:
remove
in interfaceStorageRepository
- Parameters:
id
- the id
-
setInfo
-
getInfo
Description copied from interface:StorageRepository
Retrieves info for a given storage ID.- Specified by:
getInfo
in interfaceStorageRepository
- Parameters:
id
- the id- Returns:
- the info, or
StorageInfo.UNKNOWN
if the ID was not found
-
markAsChanged
public void markAsChanged()Description copied from interface:StorageRepository
Marks to be saved.- Specified by:
markAsChanged
in interfaceStorageRepository
-