Crypt: Mimic
作者:rebot | 分类:模组
Minecraft 版本: 1.21
平台: fabric
Not what I set out to make, but still something cool :3
Usage guide
Spawning
/crypt-mimic <identifier> <x> <y> <z> <nbt>\
The npc will act as an armour stand until it is locked with:\
/data modify entity <seletor> Locked set value True\
While it is unlocked interacting will modify items, once locked dialog actions will show.\
You can also modify model part rotations just as you would an armour stand.
NPCs
data/<namespace>/crypt-mimic/npc/<id>.json
// note: this example uses json5 for the comments, use regular json for actual data
{
// `name` uses the vanilla Text codec, so you can build fancy things
"name": [ // required
{
"type": "translatable",
"translate": "npc.<namespace>.<id>.name"
}
],
// `title` also uses the vanilla Text codec
"title": [ // optional
{
"type": "translatable",
"translate": "npc.<namespace>.<id>.title"
}
],
"skin": { // optional
"texture": "<namespace>:textures/entity/npc/<id>.png", // required
"hasSlimArms": true // optional, defaults to false
},
"action": { // optional
"action": "crypt-mimic:show_dialog", // required
"value": "<namespace>:dialog_<id>" // may be required, dependent on `action`
}
}
Dialog
data/<namespace>/crypt-mimic/dialog/<id>.json
// note: this example uses json5 for the comments, use regular json for actual data
{
// `text` uses the vanilla Text codec
"text": [ // required
{
"type": "translatable",
"translate": "dialog.<namespace>.<id>"
}
],
"actions": [ // required, even if empty but should contain at least one
{
"action": "crypt_mimic:show_dialog", // required
"value": "<namespace>:<different_id>" // may be required, dependent on `action`
}
]
}
Custom dialog actions
Dialog actions use the action.<namespace>.<id> translation key.
import gay.pyrrha.mimic.dialog.DialogAction;
DialogAction.getEVENT().register((player, entity, action) -> {
// do things
});
Kotlin Example
```kotlin
import gay.pyrrha.mimic.dialog.DialogAction
DialogAction.EVENT.register { player, entity, action ->
// do things (but in kotlin :3)
}
```
请登录后举报
暂无评论,抢个沙发吧~