< RETURN_TO_LOGS

Minecraft Structure Locator

Minecraft Structure Locator

Route: POST /api/minecraft/locate Locates in-game structures (villages, woodland mansions, ruins, temples, and more) directly from a world seed. Unlike many services, this implementation runs pure JavaScript — the seed locator (including its WASM-free structure finder) is embedded locally, so there are no external seed-locator dependencies.

Parameters

The locator accepts a JSON body with the following fields:
FieldTypeRequiredDefaultDescription
seedstringNo0The world seed. Pass empty to use 0.
versionstringNo"1.21"Target Minecraft version. Any MAJOR.MINOR works. The locator ships with bundled structure data up to v1.21.7.
structurenumberNo8Numeric structure ID in the current version's registry. Defaults to village.
maxResultsnumberNo64Maximum number of results to return.
minDistancenumberNo1Minimum distance from origin to consider.
maxDistancenumberNo1,800,000,000Maximum distance from origin to consider.
useGridForStructuresbooleanNotrueWhether to use the structure grid. Required for most structures on 1.18+; always true.
countTypestringNo"structure"Either "structure" or "feature" (a looser structure lookup).
limitnumberNo64Upper bound on the number of results returned.

Note: maxResults, minDistance, and maxDistance are used internally to search the grid but do not affect the final result set, which the locator trims to the first countType-based matches.

Response fields

The response returns structureId, the queried version, the list of coordinate results, and metadata:
FieldDescription
data.structureIdThe resolved structure ID.
data.versionThe version the structure data was resolved against.
data.typeThe category the structure belongs to.
data.uncertaintrue if the returned ID is a fallback for an unknown structure.
data.nameHuman readable structure name (e.g. "minecraft:village_plains").
data.countType"structure" or "feature".
data.resultsArray of { x, y, z } coordinate objects.
data.searchedResultsNumber of candidates considered.
data.resultCountNumber of results in the array above.

Examples

Locate plains villages for the default seed (0) on the default villager structure:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
  -H "Content-Type: application/json" \
  -d '{ "seed": 0, "version": "1.21", "structure": 8 }'
Find up to 8 ruins of the morass on seed 12345:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
  -H "Content-Type: application/json" \
  -d '{ "seed": "12345", "structure": 66, "maxResults": 8 }'
Extract only the coordinates with jq:
curl -s -X POST https://api.xnite.net/api/minecraft/locate \
  -H "Content-Type: application/json" \
  -d '{ "seed": "12345" }' | jq '.data.results'

Sample response

{
  "plugin": "minecraft",
  "success": true,
  "data": {
    "structureId": 8,
    "version": "1.21",
    "type": "unit",
    "uncertain": false,
    "name": "minecraft:village_plains",
    "countType": "structure",
    "results": [
      { "x": 128, "y": 0, "z": 256 },
      { "x": -340, "y": 0, "z": 712 }
    ],
    "searchedResults": 8192,
    "resultCount": 2
  }
}