Generic ICellInventoryHandler (#3624)

Allows addons who register a custom IStorageChannel to use the IStorageCell interface without registering a cell handler. Also adds some helpers (poweredInsert/poweredExtract).
This breaks API!
This commit is contained in:
fscan
2018-07-22 19:20:47 +02:00
committed by GitHub
parent 85dec35366
commit c1c7e94cf6
41 changed files with 630 additions and 842 deletions
+10
View File
@@ -23,6 +23,8 @@ import appeng.api.IAppEngApi;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridHelper;
import appeng.api.storage.IStorageHelper;
import appeng.api.util.IClientHelper;
import appeng.core.api.ApiClientHelper;
import appeng.core.api.ApiGrid;
import appeng.core.api.ApiPart;
import appeng.core.api.ApiStorage;
@@ -41,6 +43,7 @@ public final class Api implements IAppEngApi
private final IStorageHelper storageHelper;
private final IGridHelper networkHelper;
private final ApiDefinitions definitions;
private final IClientHelper client;
private Api()
{
@@ -49,6 +52,7 @@ public final class Api implements IAppEngApi
this.registryContainer = new RegistryContainer();
this.partHelper = new ApiPart();
this.definitions = new ApiDefinitions( (PartModels) this.registryContainer.partModels() );
this.client = new ApiClientHelper();
}
public PartModels getPartModels()
@@ -85,4 +89,10 @@ public final class Api implements IAppEngApi
{
return this.definitions;
}
@Override
public IClientHelper client()
{
return this.client;
}
}