Download Crypt: Mimic — Minecraft Mods — MetaMods

Crypt: Mimic

Active

Downloads

0

Last update

1 year ago

Versions

1.21
Client and server
Fabric

Crypt: Mimic - NPC System for Minecraft

Adds an advanced non-player character system to the game where NPCs appear as real players but are completely controlled by configuration data.

Creating NPCs

To place an NPC in the world, use the command: /crypt-mimic <identifier> <x> <y> <z> <nbt>

The character initially behaves like an armor stand. To activate the dialogue system, you need to lock it: /data modify entity <selector> Locked set value True

In the unlocked state, interacting with the NPC allows you to modify items, and after locking, dialogue actions become available. You can also adjust the rotation of model parts similar to armor stands.

NBT Parameters

NpcId - Unique NPC type identifier
ArmourItems - List of items for equipment
HandItems - List of items in hands
Small - Boolean value for small model
Locked - Boolean value for model locking
Pose - Pose and rotation settings
Pose.Head - Head rotation (list of numbers)
Pose.Body - Body rotation (list of numbers)
Pose.LeftArm - Left arm rotation (list of numbers)
Pose.RightArm - Right arm rotation (list of numbers)
Pose.LeftLeg - Left leg rotation (list of numbers)
Pose.RightLeg - Right leg rotation (list of numbers)

NPC Configuration

NPC configuration files are located at: data/<namespace>/crypt-mimic/npc/<id>.json

{
  "name": [
    {
      "type": "translatable",
      "translate": "npc.&lt;namespace&gt;.&lt;id&gt;.name"
    }
  ],
  "title": [
    {
      "type": "translatable",
      "translate": "npc.&lt;namespace&gt;.&lt;id&gt;.title"
    }
  ],
  "skin": {
    "texture": "&lt;namespace&gt;:textures/entity/npc/&lt;id&gt;.png",
    "hasSlimArms": true
  },
  "action": {
    "action": "crypt-mimic:showdialog",
    "value": "&lt;namespace&gt;:dialog&lt;id&gt;"
  }
}

Dialogue System

Dialogue files are located at: data/<namespace>/crypt-mimic/dialog/<id>.json

{
  "text": [
    {
      "type": "translatable",
      "translate": "dialog.&lt;namespace&gt;.&lt;id&gt;"
    }
  ],
  "actions": [
    {
      "action": "crypt_mimic:show_dialog",
      "value": "&lt;namespace&gt;:&lt;different_id&gt;"
    }
  ]
}

Custom Actions

For creating custom dialogue actions, use the translation key action.<namespace>.<id>.

Java Example

import gay.pyrrha.mimic.dialog.DialogAction;
DialogAction.getEVENT().register((player, entity, action) -> {
    // your logic here
});

Kotlin Example

import gay.pyrrha.mimic.dialog.DialogAction
DialogAction.EVENT.register { player, entity, action ->
    // your logic here
}
Project members
Pyrrha

Pyrrha

Developer

Created: 24 Jun 2024

ID: 11670