Skip to content

Advancements

Ruben Taelman edited this page Jun 9, 2024 · 3 revisions

As of Minecraft 1.12, this mod introduces certain advancement criteria types. These can be used to define custom advancements that are triggered on custom events.

More criteria types can be found on the Cyclops Core wiki.

Network Initialized

  • JSON Key: integrateddynamics:network_initialized
  • JSON Value: min_cables
  • Trigger: When a player initializes a network by placing a cable. Example:
{
...
  "criteria": {
    "criteria_0": {
      "trigger": "integrateddynamics:network_initialized",
      "conditions": {
        "min_cables": 10
      }
    }
  }
}

Part Reader Aspect

  • JSON Key: integrateddynamics:part_reader_aspect
  • JSON Value: parttype and aspect (both are optional)
  • Trigger: When a part reader aspect is set. Example:
{
...
  "criteria": {
    "criteria_0": {
      "trigger": "integrateddynamics:part_reader_aspect",
      "conditions": {
        "part_type": "integrateddynamics:redstone_reader",
        "aspect": "integrateddynamics:read_integer_redstone_value"
      }
    }
  }
}

Part Variable-Driven

  • JSON Key: integrateddynamics:part_variable_driven
  • JSON Value: parttype and variable (both are optional)
  • Trigger: When a variable-driven part (such as a display panel) value is changed. Example:
{
...
  "criteria": {
    "criteria_0": {
      "trigger": "integrateddynamics:part_variable_driven",
      "conditions": {
        "part_type": "integrateddynamics:display_panel",
        "variable": {
          "type": "aspect",
          "aspect": "integrateddynamics:read_integer_redstone_value"
        }
      }
    }
  }
}

Variable predicates can declare the value type and value, as follows:

...
        "variable": {
          "type": "value_type",
          "value": {
            "type": "serialized",
            "value_type": "integrateddynamics:integer",
            "value": "{Primitive:15}"
          }
        }
...

Some value types can have more complex values, such as the following:

...
          "type": "value_type",
          "value": {
            "type": "itemstack",
            "item": {
              "item": "minecraft:stone_pickaxe"
            }
          }
...
...
          "type": "value_type",
          "value": {
            "type": "entity",
            "entity": "minecraft:creeper"
          }
...

All variable predicates can refer to different variable types, such as the following.

Aspect

A variable that was created from a writer part's aspect.

...
        "variable": {
          "type": "aspect",
          "aspect": "integrateddynamics:read_integer_redstone_value"
        }
...

Operator

A variable that contains an operator value.

...
        "variable": {
          "type": "operator",
          "operator": "integrateddynamics:arithmetic_addition",
          "input": {
            "0": {
              "type": "value_type",
              "value": {
                "type": "serialized",
                "value_type": "integrateddynamics:integer",
                "value": "{Primitive:1}"
              }
            },
            "1": {
              "type": "value_type",
              "value": {
                "type": "serialized",
                "value_type": "integrateddynamics:integer",
                "value": "{Primitive:2}"
              }
            }
          }
        }
...

Raw value

A variable that contains a raw value.

...
        "variable": {
          "type": "value_type"
        }
...

Part Writer Aspect

  • JSON Key: integrateddynamics:part_writer_aspect
  • JSON Value: parttype and aspect (both are optional)
  • Trigger: When a part writer aspect is set. Example:
{
...
  "criteria": {
    "criteria_0": {
      "trigger": "integrateddynamics:part_writer_aspect",
      "conditions": {
        "part_type": "integrateddynamics:redstone_writer",
        "aspect": "integrateddynamics:write_integer_redstone",
        "variable": {
          "type": "aspect",
          "aspect": "integrateddynamics:read_integer_redstone_value",
          "value": {
            "type": "serialized",
            "value_type": "integrateddynamics:integer",
            "value": "{Primitive:15}"
          }
        }
      }
    }
  }
}

Variable Created

  • JSON Key: integrateddynamics:variable_created
  • JSON Value: block and variable_facade (both are optional)
  • Trigger: When a new variable is created. Example:
{
...
  "criteria": {
    "criteria_0": {
      "trigger": "integrateddynamics:variable_created",
      "conditions": {
        "block": "integrateddynamics:logic_programmer",
        "variable_facade": {
          "type": "value_type",
          "value_type": "integrateddynamics:integer"
        }
      }
    }
  }
}