Remove External Storage Handler (#2417) (#2508)

* Implemented an adapter for IItemHandler so it can be used by the Storage Bus.
* Added update hook for inject/extract to ItemHandlerAdapter.
* Implemented ItemHandler and FluidHandler capabilities for the condenser, as replacement for the Void Inventories.
* Removed external storage handler, added capability-based way of accessing a monitorable ME network via the storage bus. Removed special case inventories for the matter condenser.
* Implemented InventoryAdaptor for IItemHandler. This also now fixes molecular assemblers interaction with part interfaces.
This commit is contained in:
shartte
2016-10-26 22:58:23 +02:00
committed by yueh
parent 057754c851
commit b977ee89ee
34 changed files with 1203 additions and 1065 deletions
+3 -9
View File
@@ -56,6 +56,7 @@ import appeng.api.networking.spatial.ISpatialCache;
import appeng.api.networking.storage.IStorageGrid;
import appeng.api.networking.ticking.ITickManager;
import appeng.api.parts.IPartHelper;
import appeng.capabilities.Capabilities;
import appeng.core.features.AEFeature;
import appeng.core.features.registries.P2PTunnelRegistry;
import appeng.core.features.registries.entries.BasicCellHandler;
@@ -75,7 +76,6 @@ import appeng.me.cache.PathGridCache;
import appeng.me.cache.SecurityCache;
import appeng.me.cache.SpatialPylonCache;
import appeng.me.cache.TickManagerCache;
import appeng.me.storage.AEExternalHandler;
import appeng.parts.PartPlacement;
import appeng.recipes.AEItemResolver;
import appeng.recipes.CustomRecipeConfig;
@@ -131,6 +131,8 @@ public final class Registration
{
this.registerSpatial( false );
Capabilities.register();
final Api api = Api.INSTANCE;
final IRecipeHandlerRegistry recipeRegistry = api.registries().recipes();
this.registerCraftHandlers( recipeRegistry );
@@ -247,12 +249,6 @@ public final class Registration
recipeLoader.run();
// TODO readd layers
// partHelper.registerNewLayer( "appeng.parts.layers.LayerISidedInventory",
// "net.minecraft.inventory.ISidedInventory" );
// partHelper.registerNewLayer( "appeng.parts.layers.LayerIFluidHandler",
// "net.minecraftforge.fluids.IFluidHandler" );
// partHelper.registerNewLayer( "appeng.parts.layers.LayerITileStorageMonitorable",
// "appeng.api.implementations.tiles.ITileStorageMonitorable" );
// if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
// {
@@ -292,8 +288,6 @@ public final class Registration
gcr.registerGridCache( ISecurityGrid.class, SecurityCache.class );
gcr.registerGridCache( ICraftingGrid.class, CraftingGridCache.class );
registries.externalStorage().addExternalStorageInterface( new AEExternalHandler() );
registries.cell().addCellHandler( new BasicCellHandler() );
registries.cell().addCellHandler( new CreativeCellHandler() );