Title Scrolls 图标

Title Scrolls

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/titlescrolls
资源信息

Minecraft 版本: 1.21 1.21.1

平台: fabric

标签: game-mechanics library social

资源介绍

Title Scrolls

This mod is a near rewrite of TitleScrolls by repulica. Some code from the original was modified to suit the rewrite, so it remains under the original license. All textures are from the original.

Discription

Title Scrolls adds trinkets that display a title under player names. Common title scrolls can be crafted with two paper and two string and renamed in an anvil to set the title. All Titles are component-based, so adding one is as simple as customizing a give command.

Gameplay Images

A Player renaming a scroll to give it a custom title
A Custom Title Scroll
A Player with A Custom Title
A Player With a Command Generated Title

Modders

As all titles are component-based, adding a title to a mod is as simple as adding a new component to the title 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")));
    }
}

Adding a new Effect is as simple as creating a class implementing titlescrolls.api.TitleEffect and registering it with the 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);
    }
}
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
TXT Vksel

价格:0 墨喵币
下载量:0

查看详情
Sona

价格:0 墨喵币
下载量:0

查看详情
The Abyss Escape

价格:0 墨喵币
下载量:0

查看详情
Image To Painting

价格:0 墨喵币
下载量:0

查看详情