Blocks - MrTroble/TCUtility GitHub Wiki

General

With the block definitions it is possible to add your own blocks with properties. Therefor you need to add the "blockdefinitions" folder.

You will need one or more json files for this. Several entries can be made in one json file or it can be structured in several files. This is up to you. The file(s) can be named as you wish.

Layout

{
    "blockName": {
        "hardness": "Float",
        "material": "String",
        "soundtype": "String",
        "opacity": "Int",
        "lightValue": "Int",
        "fullblock": "Boolean",
        "slipperness": "Float",
        "hitbox": ["Int..."],
        "states": ["String..."]
    }
}
  • "blockName" is part of the name of the block. Must be present and must be unique.
  • "hardness" is the hardness of the block. Can be present.
  • "material" is the material name of the block. Must be present. Here you find a list of available materials.
  • "soundtype" is the sound type name of the block. Must be present. Here you find a list of available sound types.
  • "opacity" is the opacity value of the block. Can be present.
  • "lightValue" is the light value of the block (says if the block should emits light). Can be present. Available numbers between 0 and 15.
  • "fullblock" says if the block should be a full block or not. Can be present. Default value true.
  • "slipperness" set the slipperness of the block. Can be present. Default value 0.0
  • "hitbox" set the hitbox of the block. Can be present. Affects these blocks. Default value is a full block. Must contain 6 numbers.
  • "states" is a list with all the block types which should registered for the given name. Must be present. Can include one or more entries.

Example

{
    "anvil": {
        "hardness": 1,
        "material": "iron",
        "soundtype": "metal",
        "opacity": 0,
        "hitbox": [0, 0, 0, 16, 16, 4],
        "states": ["cube_rot"]
    },
    "tested": {
        "hardness": 1,
        "material": "wood",
        "soundtype": "wood",
        "opacity": 0,
        "hitbox": [0, 0, 12, 16, 16, 16],
        "states": ["garage", "cube"]
    }
}

Further

In addition to the registration, you must now create

  • blockstates
  • block model,
  • item model (can be included in block model),
  • block textures,
  • item textures (not necessary if you included your item model into your block model) and
  • language keys.

Which are in the standard Minecraft resource pack format.