Skip to content
github-actions[bot] edited this page Aug 28, 2026 · 2 revisions

Comets

CometService launches destructive comet world events at a supplied impact location. The feature owns the flight path, chunk tickets, heat effects, crash scar, explosions, fire, magma debris, terminal geode, water handling, and optional loot.

Launching a comet

Use a random compass direction or supply the direction travelled into the impact and along the crash scar.

The direction's Y component is ignored. The vertical approach is derived from the generated crash path so the incoming flight and ground scar align.

Loot

CometLoot specifies a placeable block material and an inclusive quantity range. Each launch randomizes the amount independently for every entry and embeds the blocks into exposed solid terrain around the terminal geode.

Direction and loot can also be supplied together.

Only placeable, non-air block materials are accepted. Quantity ranges must satisfy 0 <= minimum <= maximum <= 4096. Loot is never placed on leaves, logs, planks, liquids, or unsupported blocks.

API calls made away from the primary server thread are transferred to it before chunks, entities, or blocks are accessed.

API reference

Public API for launching destructive comet events.

launch()

Launches a comet at the supplied impact location from a random compass direction.

Parameters

  • impact — terminal impact location

Example: Random approach

api.comets().launch(impactLocation);

launch()

Launches a comet from a random compass direction with loot around its terminal geode.

Parameters

  • impact — terminal impact location

  • loot — block ranges scattered around the terminal geode

Example: Comet with loot

api.comets().launch(
    impactLocation,
    new CometLoot(Material.GOLD_BLOCK, 2, 15),
    new CometLoot(Material.EMERALD_BLOCK, 1, 4)
);

launch()

Launches a comet at the supplied impact location. The horizontal component of direction is the direction of travel into the impact and along the crash scar; its Y component is ignored.

Parameters

  • impact — terminal impact location

  • direction — horizontal travel direction into the impact

Example: Directed approach

api.comets().launch(impactLocation, new Vector(1, 0, -1));

launch()

Launches a directed comet with loot around its terminal geode.

Parameters

  • impact — terminal impact location

  • direction — horizontal travel direction into the impact

  • loot — block ranges scattered around the terminal geode

CometLoot()

A block material and inclusive quantity range scattered around a comet's terminal geode.

Configuration

The comet section in config.yml controls the event defaults:

  • starting height and flight duration
  • trail length and warning radius
  • crash-scar length, radius, explosions, power, and fire
  • heat, lethal heat, and damage radii
  • geode size and magma debris count

Loot contents and quantities deliberately belong to each API call rather than global configuration, allowing different event sources to offer different rewards.

Clone this wiki locally