Checking player status…
View all
Browse Dynamic Item Lighting articles
reference / Dynamic Item Lighting

Custom light rules and developer adapters

Choose rule scope, write strict JSON, resolve precedence and predicates, recover reloads, and understand automatic fallback.

Dynamic Item Lighting 1.3.1Java 1.21.1NeoForge

These guides describe the October 23, 2026 source snapshot. Two different downloads share the 1.3.1 label; neither was confirmed to match this snapshot.

Define an item’s portable light

Use a rule when you want to change which stacks emit, their brightness or color, or the conditions under which they emit. This is an operator and developer reference for the source-based 1.3.1 snapshot. Examples below describe files you can create; this wiki has not installed them or changed the mod.

A rule changes visual item lighting. It does not create the item, grant a stack, add a recipe or modify real world-light behavior. Server-shared policy replaces the local item table, so choose the appropriate side before editing.

Choose the file scope

ScopePathReload
Loose local fileconfig/dynamicitemlights/items/<namespace>/<name>.jsonF3 + T
Client resource-pack resourceassets/<namespace>/dynamicitemlights/items/<name>.jsonF3 + T
Server data-pack resourcedata/<namespace>/dynamicitemlights/items/<name>.json/reload or /dilpolicy reload

A rule ID comes from its namespace and relative name. Reusing a bundled ID replaces that rule; bundled rules use the namespace dynamicitemlights. A loose file directly in the items directory uses namespace local. These rule IDs differ from the item targeted inside the file.

While a shared server snapshot is active, clients use that compiled table rather than merging in personal rules. An item omitted from the snapshot has no item light. Personal rendering preferences still apply. See server configuration for reconnect behavior and command permissions.

Rule fields

FieldRequired or defaultAccepted value / effect
schema_versionRequiredInteger 1
target_typeRequireditem or tag
targetRequiredNamespaced item/tag ID, such as minecraft:torch
brightnessRequiredInteger 0–15; zero explicitly disables emission
colorWhite if omitted#RRGGBB
priority0Integer −1000 to 1000, within a target category
heldtrueFalse makes the winning rule emit zero when held
droppedtrueFalse makes the winning rule emit zero when dropped
wateralwaysalways, dry_only or water_only
predicatesEmpty listAt most 16 conditions; every condition must match

Resolution order

  1. Try exact-item rules before tag rules.
  2. Within each category, try higher priority first, then alphabetical rule ID.
  3. Use the first matching rule. A zero-brightness result or a false held/dropped flag still decides; it does not fall through to another rule.
  4. If no explicit rule matches, use the automatic block-default fallback.

This rule selection is separate from the per-entity competition among hands, Luminous and headlamp. See one entity, one winning source.

Disable the bundled Ender Chest light

Save this as config/dynamicitemlights/items/dynamicitemlights/ender_chest.json, then reload client resources with F3 + T when using local rules. It replaces the bundled rule ID while targeting the existing vanilla item.

{
  "schema_version": 1,
  "target_type": "item",
  "target": "minecraft:ender_chest",
  "brightness": 0
}

Under server-shared policy, make the corresponding server data-pack change instead and use the server reload path. Confirm active scope with /dilclient status.

Match an exact component value

Use a separate custom rule ID for this example, such as a loose file under your own namespace. It applies only to sticks whose synchronized custom-model-data component decodes to the exact value 7.

{
  "schema_version": 1,
  "target_type": "item",
  "target": "minecraft:stick",
  "brightness": 11,
  "color": "#7FFFE0",
  "predicates": [
    { "type": "component", "component": "minecraft:custom_model_data", "equals": 7 }
  ]
}

This does not grant a stick or set its component. All conditions in a rule must match. Missing or undecodable client-side conditions can warn and never match; malformed definitions can reject loading.

Fix invalid reloads

Unknown fields, malformed IDs or colors, out-of-range values and unsupported components/adapters are errors. The limits are 32 rules per target, 16 predicates per rule, and 16,384 total rules. Optional absent item targets produce warnings rather than adding content.

Reload is atomic: invalid input retains the previous valid set. After a failed initial load, bundled defaults are used. Correct the invalid file, reload the right side, and inspect status/errors. Do not assume a changed file became active just because the game remained open.

Automatic block fallback

For an unruled block item, the catalog evaluates default-state block emission once per rule/registry reload. Non-block items default to zero. Fallback color is the block map color mixed halfway toward white, or white if unknown.

World-sensitive emission overrides, or blocks whose evaluation throws, are marked as needing a rule or adapter and resolve to zero automatically. A bright-looking texture is insufficient. Explicit bundled rules give carried furnaces, candles and redstone lamps their intended values even when the ordinary default block state would not emit.

A held redstone lamp’s level 15 and a helmet-mounted redstone lamp’s default level 14 are different systems. Item rules do not turn that helmet lamp into level 15.

Developer adapters

ItemLightAdapters.register accepts a namespaced adapter ID, component dependencies and a predicate over an item stack. Keep the predicate quick, side-effect free and based only on synchronized data. An external mod must actually register the adapter before a rule can use it.

Example predicate entry inside a rule:

"predicates": [
  { "type": "adapter", "adapter": "mymod:charged" }
]

This fragment demonstrates an extension point. It is not a bundled charged-wand feature or evidence that a specific third-party item integrates.

Headlamp recipe inputs use minecraft:head_armor, c:glass_blocks and c:glass_panes. Beacon-color glass behavior determines recognized modded glass colors. These tag/API paths establish intended integration mechanisms; individual items, glass combinations and custom head-render alignment remain untested.

Sources & verification

Evidence: pdf-derived. Feature status: implemented-static. Article coverage: ready.

Dynamic-Item-Lighting-Complete-Mod-Breakdown.pdf

PDF pages 14-18, 25-30 · 12-16; Appendices A-B · DIL-PDF:S01; DIL-PDF:S03; DIL-PDF:S08; DIL-PDF:S09; DIL-PDF:S10; DIL-PDF:S11; DIL-PDF:S12; DIL-PDF:S13

October 23, 2026 source-based 1.3.1 snapshot. Historical checks are attributed; neither same-version JAR is proven equivalent. No new gameplay, build, multiplayer or compatibility verification.

The wiki has not independently playtested report-derived instructions. Your server or modpack settings may change them.

Editor setupEditing guide →