HomeJavaModsHologram API
Hologram API
ModsJava

Hologram API

by tricube · on Modrinth

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 26.1.2 · Fabric⬇ Download for 26.1–26.1.1 · Fabric⬇ Download for 1.21.11 · Fabric⬇ Download for 1.21.10 · Fabric⬇ Download for 1.21.6–1.21.8 · Fabric⬇ Download for 1.21.5 · Fabric⬇ Download for 1.21.2–1.21.4 · Fabric⬇ Download for 1.21.1 · Fabric⬇ Download for 1.20.1 · Fabric⬇ Download for 1.21.11 · NeoForge⬇ Download for 1.21.1 · NeoForge⬇ Download for 1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Hologram API

A simple API for supporting in-world text rendering on the client side. This mod was created to simplify the creation process of my mods. Feel free to use this mod for your projects if it suits your needs.

List of my mods using this API:

Modrinth Curseforge
Holo Damage Indicator Holo Damage Indicator
Holo Health Indicator Holo Health Indicator
Holo Items Holo Items

demo

For developers

Setup

Download a version of the mod that is suitable for your version. Add this to dependencies

modApi files("<your file path>")

should be replaced to where your downloaded mod is.

Note: use double \\ instead of \ in your path to avoid formatting. Example:

modApi files("C:\\Users\\UserName\\Documents\\hologram_api-fabric-1.0.0 1.21.1.jar")

Example Usage

Component component = Component.literal("Hello World!").withStyle(ChatFormatting.GREEN); //create a minecraft component 
Hologram hologram = HologramAPI.create(comp, 0,80,0).lifetime(40).shadow(true).scale(2).renderDistance(20); //creating the hologram
hologram.onUpdate(h -> { //setting the animation (updates 20 times a second)
  h.y += 0.05f; //example animation to rise one block up every tick.
});

This creates a hologram with text "Hello World!" at coordinates 0, 80 ,0. It lasts for a total of 40 seconds and has a scale of 2. Additionally, it will only render when the player is within 20 blocks of radius.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more