Hologram API 图标

Hologram API

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 2.0.2+1.21.6-fabric
本资源为搬运资源,原资源地址: https://modrinth.com/mod/hologram-api
资源信息

Minecraft 版本: 1.21.6 1.21.7 1.21.8

平台: fabric

标签: library utility

资源介绍

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 ```java 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.
📥 下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
OverpoweredMending

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

查看详情
Oritech Things

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

查看详情
Wavify

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

查看详情
SneakFix

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

查看详情