Skip to content

Defining Blocks using JSON

Ethan Jones edited this page May 8, 2016 · 2 revisions
[
  {
    "id": "modid:blockid",
    "texture": {
      "side": "modid:blocktextureid",
      "top": "modid:blocktextureid",
      "bottom": "modid:blocktextureid"
    },
	"transparent": true,
	"lightLevel": 15
  }
]

Blocks can be defined in JSON using a file containing an array of objects. Each object represents a single block and must contain an id.

texture

The texture will default to the id, however can be set with a string or an object. A string will set the texture for all the sides of the block, whereas an object can define individual sides. The following sides can be used

Key Sets the textures for Alias Same as
posX positive X side
negX negative X side
posY positive Y side top
negY negative Y side bottom
posZ positive Z side
negZ negative Z side
side all the sides posX, negX, posZ, negZ

transparent

Controls if the block is transparent or not. Default is false.

lightLevel

Controls the light level of the block. Default is 0 (the block emits no light) and the maximum value is 15.

Clone this wiki locally