use of appeng.api.networking.IGridBlock 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);
}
Aggregations