BlockDef
A custom block. Each block may have at most 256 states (the product of its property sizes, behaviour properties included).
Fields
blockDef.visual: BlockVisual#How the client draws it. Required.
Extra properties by name, beyond those its behaviours add.
blockDef.hardness: number?#Mining difficulty on vanilla's scale, 0 or more; default 2.
blockDef.unbreakable: boolean?#Nobody can break it; overrides hardness.
blockDef.tool: (string | { tag: string, required: boolean? })?#The item tag of tools that mine it faster: its name, or { tag, required }. The tag must be declared with content.itemTag. With required = true, anything else mines it slowly and it drops nothing.
blockDef.light: number?#Light it gives off; default 0. 0..15
blockDef.model: { model: string, offset: { x: number?, y: number?, z: number? }?, yaw: number? }?#A model drawn over the donor for each state. model is a model key that may use {prop} placeholders; offset shifts it (each axis default 0) and yaw turns it, default 0. Each distinct model counts toward the 512-model quota.
true for a held item with defaults, or its settings; omitted or false, no item.
blockDef.drops: "self"?#"self" drops the block's item when it is broken (not by an explosion); needs item.