refinedmods/refinedstorage2

Allow mixed storages

Closed this issue · 0 comments

Describe your enhancement

  • Remove ResourceList and Storage generic soup.
  • StorageChannel exists to segregate storage types from each other. However, if we remove the generics requirement on Storage we can have a single mixed StorageChannel. Segregation is not needed at that point (it was needed to satisfy the generic), so a natural consequence is that we can use StorageNetworkComponent and let that be the single StorageChannel for the network.
  • If there is a single storage channel, blocks like the disk drive don't need to maintain a storage per storage channel. They can expose one storage for all the storage channels, making it easy to reason about.
  • We do remove some compile time safety because we remove a generic. However, 1) it's a natural consequence if we want to allow mixed storage channels and 2) the compile time safety was mostly gone anyway already due to all the unchecked and rawtypes operations.
  • We add ResourceKey to provide some level of safety (no Object)
  • We can remove StorageChannelType (there is now a single StorageChannel so..) and move some logic to ResourceKey and introduce ResourceType.