Skip to content

Signals (BLOCKSIGNAL)

Description

This is a simple signal, it has a more strict and simpler structure.
It is more performance-friendly and requires fewer lines.
It has only one controllable group and the model can only be changed via its texture.
If this suits your needs, this is the preferable option.
This is the successor of the previous signals from ContentPacksV1

This will lead you to the old contentpack v1 system:
Contentpack V1 documentation

Structure

signal.json
{
  "id": "pedestrian-light", // (1)!
  "name": "Pedestrian light (green/red)", // (2)!
  "model": "folder2/pedestrianlight.obj", // (3)!
  "states": [ // (9)!
    "green", // (10)!
    "red" // (11)!
  ],
  "itemState": "red", // (12)!
  "useBase": true, // (13)!
  "base": "basetexture", // (14)!
  "rotationSteps": 10, // (4)!
  "translation": [ // (5)!
    0.5,
    0,
    0.5
  ],
  "itemTranslation": [ // (6)!
    0.5,
    0,
    0.5
  ],
  "scaling": [ // (7)!
    1,
    1,
    1
  ],
  "itemScaling": [ // (8)!
    1,
    1,
    1
  ]
}
  1. The identifier of the block and item.

    Required field!

    Needs to be unique!
    If more than one block within the same contentpack has the same id, only one will be loaded.

    Should not be changed!
    Changing the id will break existing blocks.

  2. The name of the block and item.

    Required field!

    Can be changed later on.
    Does not have to be unique, although that helps.

  3. The model of your block.

    Required field!

    Path does not require /assets/landofsignals/.

    Currently only *.obj is supported!

    The name and content of the file can be changed later on.

    This may cause the UniversalModCore cache to break.
    You can try to delete the /cache/landofsignals/ folder in your minecraft instance.

  4. The steps in which the block can be rotated.

    Optional field.

    Default value: 10
    Allowed values: 10 - 90

    Can be changed later on.

  5. The translation of the block.

    Optional field.

    Default value: 0,0,0

    Values higher than 2 might cause issues with the block rendering.

    Is affected by scaling as translation happens afterward.

    Can be changed later on.

    May screw up the positioning of existing blocks.

  6. The translation of the item.

    Optional field.

    Default value: 0,0,0

    Is affected by itemScaling as itemTranslation happens afterward.

    Can be changed later on.

  7. The scaling of the block

    Optional field.

    Default value: 1,1,1

    Can be changed later on.

    Affects translation as scaling happens beforehand.

    May screw up the positioning of existing blocks.

  8. The scaling of the item

    Optional field.

    Default value: 1,1,1

    Can be changed later on.

    Affects itemTranslation as itemScaling happens beforehand.

  9. The different states your signal has.

    Required field!

    Can be left away for backwards compatibility.
    If your block only requires one state:
    Asset Sign

    Default value: [ "" ]

    Important information!
    States
    Remove below.

    "" or null is a valid state.
    Uses texture(s) that are within the same folder as the model (*.obj).

    Can be changed later on.

    Adding new states is no issue.

    Changing the order of states may screw up existing signal logic circuits.

    Removing states may break existing blocks.

  10. The first state.

    The state corresponds to a folder with the same name containing the textures for it.

    Important information!
    States

  11. The last state.

    The state corresponds to a folder with the same name containing the textures for it.

    Important information!
    States

  12. The default state for items.

    Optional field.

    Default value: first value of states

    The state does not have to be part of the states list.
    You could add a custom state for the item.

    Important information!
    States

    Can be changed later on.

  13. Is there a base texture for this block?

    Optional experimental field.
    Not recommended.

    Default value: false
    Allowed values: true, false

    Can be changed later on.

  14. Default textures that are always rendered independent of the current state.

    Optional experimental field.
    Not recommended.

    Can be changed later on.

    Changing the name may cause the UniversalModCore cache to break.
    You can try to delete the /cache/landofsignals/ folder in your minecraft instance.

States

This is about the different states your signal can posses and how the order affects other aspects of the game.

Implementation

Your signal can have one or more states. Previous contentpacks (V1) had some static blocks added as signals with a single state. If you'd like to add something static as well, take a look at the Signs and Assets.

Let's say your signal has 3 states: off, green, red. (1)

  1. Example signal: off, green, red

1
2
3
4
5
6
7
8
my-signal/
    green/
        my-signal.png // (1)!
    red/
        my-signal.png // (2)!
    my-signal.obj
    my-signal.mtl
    my-signal.png // (3)!
  1. This texture would look like this: green

  2. This texture would look like this: red

  3. This texture would look like this: off

    This texture will be listed ingame as "Default."

    This texture must always be available!

    This is not necessarily the default texture! See below.

1
2
3
4
5
6
7
8
9
{
    "name": "My signal",
    "id": "my-signal",
    "model": "my-signal/my-signal.obj",
    "states": [
        "", // (3)!
        "green", // (1)!
        "red" // (2)!
    ],
  1. This texture would look like this: green

  2. This texture would look like this: red

  3. This texture would look like this: off

    This texture will be listed ingame as "Default".

    This texture must always be available!

    This is not necessarily the default texture! See below.

Sorting, priorities and overwriting of states

The default texture is always added. Either by the creator or by the mod.
The mod will add the default texture, if not already added, to the first place of the list.
It can be added as "" (null works as well, will be transformed internally to "")

The order of the states will affect different things.
The first state listed in your states will be used as "itemState" if not set otherwise in the JSON.

Also, the first state will always be the state of placed signals, if they are not overwritten by a signalbox.
When using multiple signalboxes, the signal will store every set state.
The displayed state will always be the latest in the states list.

A few examples:

States: Off (Default), Green, Red
When placed: Off
Off & Green active -> Green
Green & Red active -> Red
Off & Green & Red active -> Red

States: Green, Red, Off (Default)
When placed: Green
Off & Green active -> Off
Green & Red active -> Red
Off & Green & Red active -> Off

Priority

Lowest - Off
Second - Green
Highest - Red

The order of states can be changed individually with a click on the signal block.

Flares

  • Flares (optional, nice to have)


    If your model contains lamps or other parts that are supposed to glow, this is the right place.
    Flares are oriented to your models and light up when the right state is set.
    They can be added to signals, complex signals, deco/assets, signs and levers.

    Flare documentation