Skip to content

Portal trigger

Pedro270707 edited this page Jul 16, 2026 · 4 revisions

A portal trigger is a listener which triggers a portal generator.

Technical information

Class dev.kyanitemods.kyaniteportals.content.triggers.PortalTriggerInstance, registerable via dev.kyanitemods.kyaniteportals.content.registry.PortalTriggers#REGISTRY through a type dev.kyanitemods.kyaniteportals.content.triggers.PortalTrigger.

JSON format

  • image: The root object.
    • image type: The trigger type ID (see below).
    • Additional fields of the trigger, described below.

Trigger types

kyanite_portals:use_item

Triggered when an item is used on a block.

Additional fields:

  • image predicate: An item predicate which determines whether the item triggers this trigger.
  • image damage_item_by: (optional, defaults to 0) Determines how much to damage the item when triggered. Must be a non-negative integer.

kyanite_portals:block_change

Triggered when a block in the world changes.

Additional fields:

  • image predicate: The block predicate that tests the block added to the world.

kyanite_portals:thrown_potion

Triggered when a potion is thrown in the area around it.

Additional fields:

  • image trigger_in_area: (defaults to true) Determines if it should be triggered in the area around the potion or only the block where it landed.
  • image potions: A list of potion IDs which trigger this trigger. If empty, every potion matches.
    • image: A potion ID.
  • image predicate: (optional) An item predicate which determines whether the potion item triggers this trigger.

kyanite_portals:level_event

Triggered when a level event happens.

Additional fields:

  • image type: The level event type ID.
  • image data: (optional) The level event data. If not specified, matches the type level event regardless of data.

Clone this wiki locally