Skip to content

Additional content

Pedro270707 edited this page Jul 23, 2026 · 9 revisions

Kyanite Portals adds new data types which are used in certain definitions and a new particle type.

Integer range

Predicate for integer numbers.

Technical information

Class dev.kyanitemods.kyaniteportals.util.Range.Int.

JSON format

  • image: The root object.
    • One of:
      • Range: checks a range between a minimum value and a maximum value.
        • image min: The lower bound.
        • image max: The higher bound.
      • Exactly: checks an exact value.
        • image exactly: The value to be checked.

Block entity pair

A definition which includes a block state and a block entity.

Technical information

Class dev.kyanitemods.kyaniteportals.util.BlockEntityPair.

JSON format

  • imageimage: The root object. Can be a image block ID, a image block state, or a full image block entity pair, with the first two being converted to a block entity pair.
    • If a image block entity pair:
      • imageimage block: The block state. Can be a image block ID or a image block state.
      • image nbt: A string containing the SNBT representation of the block entity data.

kyanite_portals:portal particle type

Similar to the vanilla portal particle, but can have any color.

Additional fields:

  • image color: A list of three floating point values specifying an [R, G, B] color for the particle.
    • image: Value between 0.0 and 1.0 (inclusive).

kyanite_portals:matching_nbt block predicate type

Checks if the block entity NBT matches.

Additional fields:

  • image nbt: A string containing the SNBT representation of the block entity data.
  • image offset: (optional, defaults to [0, 0, 0]) A list of 3 integers specifying an [X, Y, Z] block position offset to check.
    • image: Value between -16 and 16 (inclusive).

Action location

The location where a portal action happens.

Technical information

Class dev.kyanitemods.kyaniteportals.content.actions.location.ActionLocationOptions with type dev.kyanitemods.kyaniteportals.content.actions.location.ActionLocation. ActionLocationOptions is extended by dev.kyanitemods.kyaniteportals.content.actions.location.FullActionLocationOptions and dev.kyanitemods.kyaniteportals.content.actions.location.LoadActionLocationOptions.

JSON format

  • image: The root object.
    • One of:
      • Full: Defines action location options.
        • image dimension: Dimension context.
          • image in: The type of dimension context. Can be one of entry_point, opposite_point, entity_dimension, or dimension_in_set.
          • If image in is set to entry_point: Positions in the same dimension where the entry portal is located.
          • If image in is set to opposite_point: Positions in the opposite dimension based on image first and image second, i.e., if the entry point is a dimension in image first, chooses a dimension in image second and vice-versa. Additional fields:
          • image first: The first set of dimensions.
            • image: A dimension ID.
          • image second: The second set of dimensions.
            • image: A dimension ID.
          • If image in is set to entity_dimension: Positions in the dimension where the entity is currently located.
          • If image in is set to dimension_in_set: Positions in a random dimension in the specified set. Additional fields:
          • image set: The set of dimensions.
            • image: A dimension ID.
        • image position: Position context.
          • image from: Can be one of portal, entity, or world_origin.
          • image rounding_mode: (optional, defaults to none) Determines how the resulting coordinate is rounded (can be one of none, up, down, round, floor, and ceiling).
          • image in_bounds: (defaults to false) Determines whether the resulting coordinate should be clamped. Only supported server-side.
          • image adapt_coordinate_space: (defaults to false) Determines if the dimension coordinate space should be considered (in the vanilla game, one block in the Nether corresponds to eight in the Overworld). Only supported server-side.
          • image offset: (optional, defaults to [0, 0, 0]) A list of 3 doubles specifying an [X, Y, Z] offset.
            • image: A coordinate.
      • Load: Loads an action location from the storage.
        • image load: The key from which to load the action location.

Agnostic predicate

Works the same as a block predicate, but can be tested client-side. Uses the level itself if it is an instance of WorldGenLevel, otherwise, uses a LevelWrapper to wrap any LevelReader. This mod uses this to allow portal testers to function client-side.

  • Note: not an ideal solution, so if you have a better idea, you can create a pull request.

Technical information

Class dev.kyanitemods.kyaniteportals.util.AgnosticPredicate.

Clone this wiki locally