Search in sources :

Example 1 with DimensionalCoord

use of appeng.api.util.DimensionalCoord in project LogisticsPipes by RS485.

the class AETankHandler method getBaseTileEntity.

private TileEntity getBaseTileEntity(IGridNode node) {
    IGrid grid = node.getGrid();
    if (grid == null) {
        return null;
    }
    IGridNode pivot = grid.getPivot();
    if (pivot == null) {
        return null;
    }
    IGridBlock block = pivot.getGridBlock();
    if (block == null) {
        return null;
    }
    DimensionalCoord coord = block.getLocation();
    if (coord == null) {
        return null;
    }
    World world = coord.getWorld();
    if (world == null) {
        return null;
    }
    return world.getTileEntity(coord.x, coord.y, coord.z);
}
Also used : IGridNode(appeng.api.networking.IGridNode) IGridBlock(appeng.api.networking.IGridBlock) IGrid(appeng.api.networking.IGrid) DimensionalCoord(appeng.api.util.DimensionalCoord) World(net.minecraft.world.World)

Aggregations

IGrid (appeng.api.networking.IGrid)1 IGridBlock (appeng.api.networking.IGridBlock)1 IGridNode (appeng.api.networking.IGridNode)1 DimensionalCoord (appeng.api.util.DimensionalCoord)1 World (net.minecraft.world.World)1