Ember’s Text API Unofficial KubeJS Forge Backport
Backports Ember's Text API KubeJS support for Forge 1.20.1.
介绍
This is an addon to Ember’s Text API which ports KubeJS integration from the Neoforge 1.21.1 version to Forge 1.20.1. This is helpful for servers/modpacks in displaying text to players with custom animation and effects.
- Creating and styling messages
- Sending messages to players
- Custom item tooltips
In this example, a text is displayed the moment a player has respawned. I used EmbersText.markup(duration, text) to create an ImmersiveMessage object then send it to the player via EmberText.send(player, message).
PlayerEvents.respawned(event => {const {player} = eventlet message = EmbersText.markup(60, “You’ve met with a terrible fate, haven’t you?”).anchor(“bottom_center”).fadeOutTicks(10).scale(1).offset(0, -75).align(“center”)EmberText.send(player, message)})
See Ember’s Text API wiki for all possible methods.
I recommend using ProbeJS Legacy to get typings in 1.20.1 for VSCode.
常见问题
Ember’s Text API Unofficial KubeJS Forge Backport 支持哪些 Minecraft 版本?
Ember’s Text API Unofficial KubeJS Forge Backport 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Ember’s Text API Unofficial KubeJS Forge Backport 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
评论
登录后评论和评分