Applied Energistics 2

Applied Energistics 2

137M Downloads

Consider replacing IGridHost with a capability based solution

yueh opened this issue ยท 1 comments

commented

IGridHost to obtain an IGridNode and IGrid from any tile entity should be replaced with a capability based approach when possible.

This might be a bit more complicated due to the way capabilites have to be registered to forge.
IGridHost is designed around every addon implementing their own solution, which is not possible with capabilities and we have to provide a default implementation with an optional factory.

One option might be to replace the factory method within the API to obtain the IGridNode with one returning a instance of the capability implementation which still wraps a IGridHost to still be able to call securityBreak().

commented

Why was this closed? It looks like AE2 is still not using capabilities for IGridHost, which makes it difficult if you want to put it on some class other than directly on the TileEntity.