▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Датапаки/Simple NPC
Simple NPC

Simple NPC

This data pack simplifies the process of configuring vanilla-style NPCs; you simply need to define the storage and execute the spawn function to set up your own NPC.

Оцените первым
183
3

English 简体中文

Introduction

This data pack makes configuring NPCs in vanilla Minecraft much easier. Simply write the required data into the storage and execute the summon function to create your own NPC.

Features

The following features are supported:

  • Custom floating text displayed above the NPC.
  • Custom NPC skin.
  • Execute a command or function when the NPC is right-clicked.

Storage Structure

Default Structure (Custom Settings Disabled)

!Default Structure (Custom Settings Disabled)

Custom Structure (Custom Settings Enabled)

!Custom Structure (Custom Settings Enabled)

Example Storage

Default Configuration

data modify storage windwaves_sea:npc root.npc_setting merge value {\
    test:{\
        name:"test",\
        zone:"test",\
        config:{\
            custom_settings:false,\
            look_player:true\
        },\
        text:{\
            pos:{x:1,y:1,z:1},\
            text:[{text:"1"}]\
        },\
        npc:{\
            pos:{x:1,y:1,z:1},\
            model:"wide",\
            texture:"lobby:npc/start_game",\
            rotation:[180,0]\
        },\
        right_click:{\
            command:"",\(function:""\)
        }\
    }\
}

Custom Configuration

data modify storage windwaves_sea:npc root.npc_setting merge value {\
    test_custom:{\
        name:"test_custom",\
        zone:"test",\
        config:{\
            custom_settings:true,\
            look_player:true,\
            default_orientation:"north" \
        },\
        text:{\
            pos:{x:1,y:1,z:1},\
            data:{}\
        },\
        npc:{\
            pos:{x:1,y:1,z:1},\
            data:{}\
        },\
        right_click:{\
            function:""\(command:""\)
        }\
    }\
}

Command Reference

Summon an NPC

function npc:summon {name:"name"}

Summons an NPC. The configuration must be written to storage before running this function. Duplicate NPCs cannot be spawned. name refers to the NPC name defined in the configuration above (the same applies below).

Remove an NPC

function npc:remove/npc {name:"name"}

Remove the Configuration (Also Removes the NPC)

function npc:remove/setting {name:"name"}

Download

QQ Group: 117464315

GitHub: https://github.com/WindWavesSea/Simple-NPC/

Acknowledgements

Special thanks to NOX OBSCURA for providing the interaction entity size solution, allowing interaction entities to properly match NPC hitboxes.

Special thanks to 轩宇1725 for providing the storage detection approach, enabling string-based detection.

Партнёрский материал

Как запустить датапак Simple NPC на сервере?

Датапак Simple NPC удобнее всего раскрывается на общем сервере: установили один раз - и вся компания играет с новыми механиками. Создать сервер Майнкрафт с датапаком Simple NPC можно за пару минут вместе с BungeeHost.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.2.x26.1.x1.21.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Детали

Лицензия:
Опубликован:3 месяца назад
Обновлён:2 месяца назад
Главная