Immersive Lanterns

From the Fear Nightfall wiki · Immersive Lanterns
Immersive Lanterns

Immersive Lanterns is a small cosmetic mod that lets the player wear a vanilla lantern or soul lantern on the belt. A worn lantern hangs from the hip, swings as the player moves, and on clients that run the mod it lights the area around the player. The mod adds no items, blocks, mobs, structures, biomes or recipes. It changes only how existing lanterns are worn and displayed.

Overview

Immersive Lanterns works through the belt slot of the Accessories and Curios framework. A data tag marks the two vanilla lanterns as belt accessories, and the mod then supplies a renderer that draws the worn lantern on the player's model. Lanterns are equippable from the start, with no crafting or unlock step. The belt slot is shared with other accessories, which are covered on Accessory Items.

The mod requires a utility library and the Accessories API on both sides. On the client it also requires Sodium Dynamic Lights, which provides the light effect. In Fear Nightfall the mod runs on the server only, as described in the In Fear Nightfall section below.

Content

  • Items: none added. The mod gives the lantern and the soul lantern the belt slot. Both are otherwise unchanged and keep their normal placement, crafting and light behaviour.
  • Blocks: none added. The worn lantern is drawn with the block model of the vanilla lantern.
  • Mobs and entities: none added. The worn lantern is drawn only on the player entity.
  • Structures, biomes and loot: none. The mod places nothing and adds no loot or trades.
  • Enchantments, effects and advancements: none.

Mechanics

Wearing a lantern. A lantern in the belt slot is drawn at the player's hip. The position moves depending on whether the player wears leg or chest armour. Two client options move the lantern: it can be set to the left hip or to the back.

Swing. The worn lantern is a two-axis damped pendulum that swings sideways and forward. Movement of the player drives it, and it is clamped to 60 degrees in either direction. Crouching gives the lantern a kick of 22.5 degrees forward and 18 degrees sideways. The swing stops while any game screen is open, and the lantern is then drawn still. It also stops during Iris shadow passes.

Light. While a lantern is worn, the player emits dynamic light at level 15 through Sodium Dynamic Lights. The light does not depend on whether the lantern is lit. It is drawn only on clients that have the mod, and it has no effect on other players' gameplay.

Shaders. With Iris or Oculus installed, the worn lantern is reported to the shader as the player's off-hand item. Shader packs therefore treat the player as holding a light source. The main hand is not affected.

Client options. The client config file immersivelanterns-client.toml has four options:

Option Default Effect
leftHandedLanterns false Moves the lantern to the left hip
backLanterns false Moves the lantern to the back
enablePhysics true Enables the swing; when false the lantern is drawn still
bounciness 1.0 Scales the force on the swing (range 0.1 to 10)

Changes to vanilla

  • The lantern and soul lantern can be equipped in the belt slot. No other item gains this.
  • The player model draws a worn lantern at the hip. Held and hand rendering are not changed.
  • A worn lantern emits light on the player at level 15 on clients with the mod.
  • Shaders see a worn lantern as the off-hand item when Iris or Oculus is installed.
  • Nothing else changes. The mod does not alter recipes, loot, trades, combat, hunger, spawns, worldgen or redstone.

In Fear Nightfall

The pack's change log records Immersive Lanterns as server only. Sodium Dynamic Lights was removed from the client list because it references Sodium classes that the pack's Sodium 0.8.13 does not have. The server keeps Immersive Lanterns, where it only supplies the belt tag. Clients join without the mod, so players who do not have it see no swinging lantern, no light and no shader change. Lanterns can still be placed in the belt slot on the server.

The mod does not touch the pack's horror content. It has no interaction with the horror content of the pack, including its biomes, structures or mobs, and it does not change how the pack behaves at night.