Class StorageContainerItemHelperImpl
java.lang.Object
com.refinedmods.refinedstorage.common.storage.StorageContainerItemHelperImpl
- All Implemented Interfaces:
StorageContainerItemHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendToTooltip
(net.minecraft.world.item.ItemStack stack, StorageRepository storageRepository, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag context, LongFunction<String> amountFormatter, Long capacity) getInfo
(StorageRepository storageRepository, net.minecraft.world.item.ItemStack stack) void
loadStorageIfNecessary
(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, Function<StorageRepository, SerializableStorage> factory) void
markAsToTransfer
(net.minecraft.world.item.ItemStack from, net.minecraft.world.item.ItemStack to) resolveStorage
(StorageRepository storageRepository, net.minecraft.world.item.ItemStack stack) void
transferFromBlockEntity
(net.minecraft.world.item.ItemStack stack, StorageBlockEntity blockEntity) void
transferStorageIfNecessary
(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, Function<StorageRepository, SerializableStorage> factory) void
transferToBlockEntity
(net.minecraft.world.item.ItemStack stack, StorageBlockEntity blockEntity) net.minecraft.world.InteractionResultHolder
<net.minecraft.world.item.ItemStack> tryDisassembly
(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemStack primaryByproduct, net.minecraft.world.item.ItemStack secondaryByproduct)
-
Constructor Details
-
StorageContainerItemHelperImpl
public StorageContainerItemHelperImpl()
-
-
Method Details
-
resolveStorage
public Optional<SerializableStorage> resolveStorage(StorageRepository storageRepository, net.minecraft.world.item.ItemStack stack) - Specified by:
resolveStorage
in interfaceStorageContainerItemHelper
-
loadStorageIfNecessary
public void loadStorageIfNecessary(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, Function<StorageRepository, SerializableStorage> factory) - Specified by:
loadStorageIfNecessary
in interfaceStorageContainerItemHelper
-
transferStorageIfNecessary
public void transferStorageIfNecessary(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, Function<StorageRepository, SerializableStorage> factory) - Specified by:
transferStorageIfNecessary
in interfaceStorageContainerItemHelper
-
getInfo
public Optional<StorageInfo> getInfo(StorageRepository storageRepository, net.minecraft.world.item.ItemStack stack) - Specified by:
getInfo
in interfaceStorageContainerItemHelper
-
tryDisassembly
public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> tryDisassembly(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemStack primaryByproduct, @Nullable net.minecraft.world.item.ItemStack secondaryByproduct) - Specified by:
tryDisassembly
in interfaceStorageContainerItemHelper
-
appendToTooltip
public void appendToTooltip(net.minecraft.world.item.ItemStack stack, StorageRepository storageRepository, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag context, LongFunction<String> amountFormatter, @Nullable Long capacity) - Specified by:
appendToTooltip
in interfaceStorageContainerItemHelper
-
transferToBlockEntity
public void transferToBlockEntity(net.minecraft.world.item.ItemStack stack, StorageBlockEntity blockEntity) - Specified by:
transferToBlockEntity
in interfaceStorageContainerItemHelper
-
transferFromBlockEntity
public void transferFromBlockEntity(net.minecraft.world.item.ItemStack stack, StorageBlockEntity blockEntity) - Specified by:
transferFromBlockEntity
in interfaceStorageContainerItemHelper
-
markAsToTransfer
public void markAsToTransfer(net.minecraft.world.item.ItemStack from, net.minecraft.world.item.ItemStack to) - Specified by:
markAsToTransfer
in interfaceStorageContainerItemHelper
-