Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# ChunkPosition - Runtime Docs

## ChunkPosition :: table or {int32, int32}

Coordinates of a chunk in a LuaSurface where each integer `x`/`y` represents a different chunk. This uses the same format as MapPosition, meaning it can be specified either with or without explicit keys. A MapPosition can be translated to a ChunkPosition by dividing the `x`/`y` values by 32.

#### Table fields

x | :: int32 |
y | :: int32 |

Concept used in

- LuaForce::is_chunk_charted()
- LuaForce::is_chunk_visible()
- LuaForce::is_chunk_requested_for_charting()
- LuaForce::unchart_chunk()
- LuaForce::get_chunk_chart()
- LuaSurface::create_territory()
- LuaSurface::is_chunk_generated()
- LuaSurface::set_chunk_generated_status()
- LuaSurface::get_territory_for_chunk()
- LuaSurface::set_territory_for_chunks()
- LuaSurface::clear_territory_for_chunks()
- LuaSurface::delete_chunk()
- LuaSurface::regenerate_entity()
- LuaSurface::regenerate_decorative()
- LuaSurface::get_random_chunk()
- LuaSurface::get_entities_with_force()
- on_chunk_charted
- on_chunk_deleted
- on_chunk_generated
- on_pre_chunk_deleted
- on_sector_scanned