

Title Scrolls
This mod constitutes an almost complete overhaul of the original TitleScrolls project by repulica. Certain code fragments from the original have been adapted for the new version while maintaining the initial license. All graphical resources are taken from the original version of the project.
About the Mod
Title Scrolls introduces special trinkets that display personalized titles beneath player names. Standard title scrolls are crafted from two sheets of paper and two strings, after which they can be renamed on an anvil to set the desired inscription. All titles operate on a component-based system, allowing for easy addition of new variants through the configuration of appropriate commands.
Images
For Mod Developers
Since all titles are built on a component system, adding new variants to your mod comes down to simply assigning additional components to the scroll item.
public class Demo implements ModInitializer {
@Override
public void onInitialize() {
ItemStack stack = new ItemStack(Items.BASE_TITLE_SCROLL);
stack.set(ComponentTypes.TITLE_TEXT, TitleTextComponet.of(Text.literal("Early Bird")));
stack.set(ComponentTypes.SCROLL_LORE, ScrollLoreComponent.of(List.of(Text.literal("The Early Bird catches the worm"))));
stack.set(ComponentTypes.RIBBON_COLOR, RibbonColorComponent.of(0x00FF00));
stack.set(ComponentTypes.RENDER_EFFECT, RenderEffectComponent.of(Identifier.of("modid", "demo")));
}
}
Creating new visual effects is also not complicated — you just need to develop a class implementing the titlescrolls.api.TitleEffect
interface and register it via TitleEffects.INSTANCE#register(Identfier, TitleEffect)
.
public class Demo implements ModInitializer {
TitleEffect DEMO = new TitleEffect() {
@Override
public void render(ItemStack stack, SlotReference slot, MatrixStack matrixStack,
VertexConsumerProvider vertexConsumer, int light,
EntityModel<? extends LivingEntity> model, LivingEntity player,
float headYaw, float headPitch) {
//Render your effect here
}
};
@Override
public void onInitialize() {
TitleEffects.INSTANCE.register(new Identifier("modid", "demo"), DEMO);
}
}