Skip to main content

Overview

The RenderCosmetic interface is a marker interface that allows wearable items (armor) to override Essential’s default cosmetic hiding behavior. When armor is equipped, Essential normally hides cosmetics on the respective body part. However, items implementing this interface will allow cosmetics to continue rendering.

Interface Definition

package gg.essential.api.cosmetics

interface RenderCosmetic {}

Usage

Implement the RenderCosmetic interface on your armor item class to allow cosmetics to render even when the armor is equipped.

Example

import gg.essential.api.cosmetics.RenderCosmetic;
import net.minecraft.item.ItemArmor;

public class TransparentHelmet extends ItemArmor implements RenderCosmetic {
    public TransparentHelmet() {
        super(ArmorMaterial.DIAMOND, 0, 0);
    }
}

Kotlin Example

import gg.essential.api.cosmetics.RenderCosmetic
import net.minecraft.item.ItemArmor

class TransparentHelmet : ItemArmor(ArmorMaterial.DIAMOND, 0, 0), RenderCosmetic

Behavior

Default Behavior

When armor is equipped, Essential hides cosmetics on the corresponding body part to prevent visual conflicts.

With RenderCosmetic

When armor implementing RenderCosmetic is equipped, cosmetics continue to render as if no armor was equipped.

Use Cases

  • Transparent or Glass Armor: Armor that is see-through and won’t visually conflict with cosmetics
  • Decorative Items: Non-protective wearable items that complement cosmetics rather than replace them
  • Custom Cosmetic Items: Mod-added items that work alongside Essential’s cosmetic system

Notes

This is a marker interface with no methods to implement. Simply adding implements RenderCosmetic to your item class is sufficient.
This interface only affects cosmetic rendering behavior. It does not modify armor functionality or protection values.

Build docs developers (and LLMs) love