Class StorageRepositoryImpl
java.lang.Object
net.minecraft.world.level.saveddata.SavedData
com.refinedmods.refinedstorage.common.support.AbstractPlatformSavedData
com.refinedmods.refinedstorage.common.storage.StorageRepositoryImpl
- All Implemented Interfaces:
StorageRepository
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.saveddata.SavedData
net.minecraft.world.level.saveddata.SavedData.Factory<T extends net.minecraft.world.level.saveddata.SavedData> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStorageRepositoryImpl(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a storage by ID, if it exists.Retrieves info for a given storage ID.voidMarks to be saved.voidRemoves a storage by ID.removeIfEmpty(UUID id) If the storage exists, and is empty, it will remove the storage from the repository.net.minecraft.nbt.CompoundTagsave(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidset(UUID id, SerializableStorage storage) Sets a storage by ID.Methods inherited from class com.refinedmods.refinedstorage.common.support.AbstractPlatformSavedData
saveMethods inherited from class net.minecraft.world.level.saveddata.SavedData
isDirty, setDirty, setDirty
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
StorageRepositoryImpl
public StorageRepositoryImpl(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) -
StorageRepositoryImpl
public StorageRepositoryImpl()
-
-
Method Details
-
get
Description copied from interface:StorageRepositoryRetrieves a storage by ID, if it exists.- Specified by:
getin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the storage, if present
-
set
Description copied from interface:StorageRepositorySets a storage by ID.- Specified by:
setin interfaceStorageRepository- Parameters:
id- the idstorage- the storage
-
removeIfEmpty
Description copied from interface:StorageRepositoryIf the storage exists, and is empty, it will remove the storage from the repository.- Specified by:
removeIfEmptyin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the removed storage, if it existed and was empty
-
remove
Description copied from interface:StorageRepositoryRemoves a storage by ID.- Specified by:
removein interfaceStorageRepository- Parameters:
id- the id
-
getInfo
Description copied from interface:StorageRepositoryRetrieves info for a given storage ID.- Specified by:
getInfoin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the info, or
StorageInfo.UNKNOWNif the ID was not found
-
markAsChanged
public void markAsChanged()Description copied from interface:StorageRepositoryMarks to be saved.- Specified by:
markAsChangedin interfaceStorageRepository
-
save
public net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Specified by:
savein classnet.minecraft.world.level.saveddata.SavedData
-