Skip to content

Customizing

Snownee edited this page Oct 25, 2021 · 7 revisions

Resource Pack

Kaleido's resource pack has no differences with a standard resource pack.

Resource Pack Wiki

But here are few points:

  1. All Kaleido models should be put in models/kaleido folder. Parent models can still be put in anywhere.
  2. (blockstate).json is not needed.
  3. Block's language key is "kaleido.decor.(namespace).(kaleido_definition)", if you want to rename or localize it.

OBJ Models

To reference an OBJ model, you have to write an additional JSON file. For the format please check the model JSON part of this tutorial.

Example:

{
  "loader": "forge:obj",
  "model": "kaleido_test:models/kaleido/test.obj",
  "flip-v": true,
  "textures": {
    "particle": "minecraft:block/dirt"
  },
  "detectCullableFaces": false,
  "diffuseLighting": true,
  "ambientToFullbright": false
}

Data Pack

Data Pack Wiki

(kaleido_definition).json

(kaleido_definition).json is core file that define behaviors and properties. Every block or item should be defined in data/(namespace)/kaleido/(kaleido_definition).json. Namespace and file name need to be the same as corresponding model file in resource pack.

All attributes are optional, which means you can simply put an empty object ({}) as content.

template

  • default: "none"
  • value:
    • "block": Standard solid block, like stone or diamond block.
    • "item": Not placeable. Once specified, some attributes may not work.
    • "horizontal": Solid block has 4 horizontal facing, like carved pumpkin or glazed terracotta. Once specified, some attributes may not work.
    • "directional": Solid block has 6 directional facing, like piston or observer block. Once specified, some attributes may not work.
    • "pillar": Solid rotatable pillar, like log block. Once specified, some attributes may not work.
    • "leaves": No much difference from the default. But it will have special wave effect with Optifine.
    • "plant": No much difference from the default. But it will have special wave effect with Optifine.
    • "stairs": You will need 3 models. (name).json, (name)_inner.json and (name)_outer.json. Just like vanilla stairs.

group

  • value: String. String is a ResourceLocation.

Allows player to right click block with empty hand to cycle models in the same group.

sound

  • default: depends on template
  • value: String. All sound types can be found here

Sets block's sound type.

light

  • default: 0
  • value: [0, 15] integer

Sets block's light value.

tint

  • value: String or string array. String is a block or item name that has tint, or a CSS Legal Color Value

The default colors that tint the block. Index starts from 0 if there are more than one tint.

uvlock

  • default: false
  • value: true or false

Locks the rotation of the texture of a block, if set to true.

nbt

  • value: Object to represent the NBT

Sets item's initial NBT.

price

  • default: 1
  • value: [1, 128] integer

Token amount that required to exchange this item.

reward

  • default: false
  • value: true or false

If it is a reward, it will be automatically unlocked once a player unlocks all normal item in the same namespace.


These following attributes are available only when template is not specified or template is "leaves" or "plant":

renderType

  • default: depends on template. "solid" in most cases.
  • value: "solid", "cutout", "cutoutMipped", "translucent", or a list of them.

Sets rendering layer for texture.

shape

  • default: "empty"
  • value: String. "empty", "block", or export result from BlockBench's VoxelShape Generators plugin.

Sets block's shape.

noCollision

  • default: false
  • value: true or false

Removes collision shape.

glass

  • default: false
  • value: true or false

Makes block behave like glass block. No shade and no culling face if its neighbor is the same block.

offset

  • default: "none"
  • value: "none", "xyz" or "xz"

Sets block random offset type. "xz" means it will offset based on X and Z axis.

Examples

default.json

{}

glass.json

{
   "shape": "block",
   "renderType": "cutout",
   "glass": true,
   "sound": "glass"
}

custom-shape.json

{
   "shape":"VoxelShapes.join(Block.box(7.5, 0, 0, 8, 1, 1), Block.box(0, 0, 3, 12, 1, 16), IBooleanFunction.OR)"
}

transform.json

{
   "template":"directional",
   "event.onUseBlock":{
      "action":{
         "type":"transform",
         "block":"stone"
      }
   }
}