Skip to content
Crystal Spider edited this page Jul 18, 2024 · 4 revisions

Fire Type

Fires are the core objects in the API, around which everything revolves.
They represent your custom fire and are identified by a unique ResourceLocation called Fire Type.
A Fire Type consists of two parts: the Mod Id, the one owning the fire, and the Fire Id, the name of the fire.

There are only two reserved Fire Types: the ones for Minecraft Vanilla fire, DEFAULT_FIRE_TYPE, and Soul Fire, SOUL_FIRE_TYPE.

Fire Properties

Each Fire has several properties that can be set during registration.
These properties define various characteristics of your fire, such as the damage it inflicts.

This is the complete list of Fire Properties:

  • light:
    Light level emitted by your fire related blocks (torch, lantern, campfire, and source).
    Effective only for blocks registered with Soul Fire'd API.

  • damage:
    Damage per second. Positive hurts, negative heals, 0 does nothing.

  • invertHealAndHarm:
    Whether to invert harm and heal for mobs that have potion effects inverted (e.g. undead).

  • canRainDouse:
    Whether rain can douse the fire.
    Effective only for fire source blocks registered with Soul Fire'd API.

  • onCampfireGetter:
    Damage source getter for when an entity takes damage from a campfire.

  • inFireGetter:
    Damage source getter for when an entity is in or on a block providing fire.

  • onFireGetter:
    Damage source getter for when an entity is burning.

Before 1.21

The property onCampfireGetter is not available before Minecraft 1.21.

Before 1.19.4

Before Minecraft 1.19.4, DamageSources were not entity-specific, so the damage source getters were simple properties:

  • inFire:
    Damage source for when an entity is in or on a block providing fire.

  • onFire:
    Damage source for when an entity is burning.

Fire Components

Each Fire has several associated components, which are configured during registration.
These components represent the relationships your fire has with related blocks and items, such as your custom Campfire or Torch.

More about Fire Components in the dedicated wiki page.