Class SameTypeStorageType<T extends ResourceKey>
java.lang.Object
com.refinedmods.refinedstorage.common.storage.SameTypeStorageType<T>
- All Implemented Interfaces:
StorageType
-
Constructor Summary
ConstructorDescriptionSameTypeStorageType
(com.mojang.serialization.Codec<T> codec, Predicate<ResourceKey> valid, Function<ResourceKey, T> caster, long diskInterfaceTransferQuota, long diskInterfaceTransferQuotaWithStackUpgrade) -
Method Summary
Modifier and TypeMethodDescriptionlong
getDiskInterfaceTransferQuota
(boolean stackUpgrade) com.mojang.serialization.MapCodec
<SerializableStorage> getMapCodec
(Runnable listener) boolean
isAllowed
(ResourceKey resource)
-
Constructor Details
-
SameTypeStorageType
public SameTypeStorageType(com.mojang.serialization.Codec<T> codec, Predicate<ResourceKey> valid, Function<ResourceKey, T> caster, long diskInterfaceTransferQuota, long diskInterfaceTransferQuotaWithStackUpgrade)
-
-
Method Details
-
create
- Specified by:
create
in interfaceStorageType
-
getMapCodec
- Specified by:
getMapCodec
in interfaceStorageType
-
isAllowed
- Specified by:
isAllowed
in interfaceStorageType
-
getDiskInterfaceTransferQuota
public long getDiskInterfaceTransferQuota(boolean stackUpgrade) - Specified by:
getDiskInterfaceTransferQuota
in interfaceStorageType
-