Skip to content

Latest commit

 

History

History
113 lines (97 loc) · 1.91 KB

blocks.md

File metadata and controls

113 lines (97 loc) · 1.91 KB

Blocks

Minecraft Blocks:

{
    "id": 32,
    "name": "gravel",
    "displayName": "Gravel",
    "hardness": 0.6,
    "resistance": 0.6,
    "stackSize": 64,
    "diggable": true,
    "material": "mineable/shovel",
    "transparent": false,
    "emitLight": 0,
    "filterLight": 15,
    "defaultState": 109,
    "minStateId": 109,
    "maxStateId": 109,
    "boundingBox": "block",
    "image": "/images/1.19/gravel.png",
    "states": [],
    "drops": [
      42
    ],
    "harvestTools": null
}

Usage

(GET) /api/block

Returns an array of all blocks.

[
    {
        "id": 32,
        "name": "gravel",
        "displayName": "Gravel",
        "hardness": 0.6,
        "resistance": 0.6,
        "stackSize": 64,
        ...
    },
    {
        "id": 2,
        "name": "granite",
        "displayName": "Granite",
        "hardness": 1.5,
        "resistance": 6,
        "stackSize": 64,
        ...
    },
    ...
]

(GET) /api/block/search?q=<query>

Returns an array of block objects whose fields satisfy the query /search?q=<query>

(query may either be of type 'string' or 'number')

/api/block/search?q=block

[
    {
        "id": 1,
        "name": "stone",
        "displayName": "Stone",
        "hardness": 1.5,
        "resistance": 6,
        "stackSize": 64,
        "boundingBox": "block",
        ...
    },
    {
        "id": 2,
        "name": "granite",
        "displayName": "Granite",
        "hardness": 1.5,
        "resistance": 6,
        "stackSize": 64,
        "boundingBox": "block",
        ...
    },
    ...
]

(GET) /api/block/:blockId

Returns a single block whose blockId exists

(:blockId may only be of type 'number')

/api/block/200

{
    "id": 200,
    "name": "deepslate_redstone_ore",
    "displayName": "Deepslate Redstone Ore",
    "hardness": 4.5,
    "resistance": 3,
    "stackSize": 64,
    ...
}