Skip to content

Overlay Texture

Overlays a texture sprite on the screen of the player.

Type ID: kaya:overlay/texture

Tip

Custom overlay textures must be placed in the assets/<namespace>/textures/overlay/sprites directory of a resource pack to be recognized and used properly.

Format

Field Type Default Description
sprite Sprite or Identifier The sprite definition or ID of the overlay to render. If an ID is specified, it will implicitly use the kaya:textures/atlas/overlay.png atlas.
color Color optional The color to blend to the colors of the texture sprite.
render_phase Render Phase Determines when the overlay should be rendered.
should_render Boolean Provider true Determines whether the overlay should render.
hide_with_hud Boolean Provider true Determines whether the overlay should hide alongside the HUD. (e.g: when pressing F1)
visible_in_third_person Boolean Provider true Determines whether the overlay should be visible when in third person.

Example

{
    "type": "kaya:overlay/texture",
    "sprite": {
        "atlas": "minecraft:textures/atlas/blocks.png",
        "id": "minecraft:block/water_still"
    },
    "color": {
        "type": "kaya:biome/water",
        "position": {
            "type": "kaya:entity/position",
            "entity": "this"
        },
        "alpha": 0.50
    },
    "render_phase": "below_hud"
}

This example renders a translucent water overlay with its color being dependent on the water color of the biome the entity is currently in.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.