Applied-Energistics-2-tiler.../me/GridCacheWrapper.java

62 lines
1.2 KiB
Java
Raw Normal View History

package appeng.me;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridStorage;
public class GridCacheWrapper implements IGridCache
{
2014-01-20 17:41:37 +01:00
final IGridCache myCache;
final String name;
2014-01-20 17:41:37 +01:00
public GridCacheWrapper(final IGridCache gc) {
myCache = gc;
2014-01-20 17:41:37 +01:00
name = myCache.getClass().getName();
}
@Override
2014-01-20 17:41:37 +01:00
public void onUpdateTick(final IGrid grid)
{
myCache.onUpdateTick( grid );
}
@Override
2014-01-20 17:41:37 +01:00
public void removeNode(final IGrid grid, final IGridNode gridNode, final IGridHost machine)
{
myCache.removeNode( grid, gridNode, machine );
}
@Override
2014-01-20 17:41:37 +01:00
public void addNode(final IGrid grid, final IGridNode gridNode, final IGridHost machine)
{
myCache.addNode( grid, gridNode, machine );
}
public String getName()
{
2014-01-20 17:41:37 +01:00
return name;
}
@Override
2014-01-20 17:41:37 +01:00
public void onSplit(final IGridStorage storageB)
{
myCache.onSplit( storageB );
}
@Override
2014-01-20 17:41:37 +01:00
public void onJoin(final IGridStorage storageB)
{
myCache.onJoin( storageB );
}
@Override
2014-01-20 17:41:37 +01:00
public void populateGridStorage(final IGridStorage storage)
{
myCache.populateGridStorage( storage );
}
}