Skip to content
Niwer edited this page Oct 21, 2025 · 1 revision

🙍‍♂️ NPCs

NPCs (Non-Player Characters) are interactive characters that can be placed in the game world. They can have dialogues, quests, and various behaviors to enhance the player's experience.

You can make bandits, friendly, merchants or even dummy NPCs for decoration.


📂 Folder Structure

.minecraft/
├── content-pack/
 └── misc/
  └── npcs/
   └── your_npc.json


🧾 Examples JSON

{
    "category": "TRADER",
    "description": "npc.trader.food",
    "canWander": false,
    "canBeAttacked": false,
    "isImmuneToExplosion": true,
    "isImmuneToFire": true,
    "canBePushed": false,
    "canCollides": true,
    "cannotDespawn": true,
    "canAttack": false,
    "trades": [
         {
            "itemToSell": { "name": "ananas_juice" },
            "cost": 15
        },
        {
            "requiredItemToSell": { "name": "empty_syringe" },
            "profit": 10
        }
    ],
}
{
    "category": "BANDIT",
    "sounds": [
        {
            "name": "npc.your_npc.male.heard",
            "path": "entity/npcs/your_npc/male/heard",
            "category": "NEUTRAL",
            "multiSound": 8
        }
    ],
    "handsItem": [ // Items that can randomly appear in the main hand slot
        {
            "name": "mp5a3",
            "amount": 1
        },
        { "name": "pipe" },
    ],
    "outfits": [
        {
            "_comment": "Bandit military outfit",
            "masks": [ // Items that can randomly appear in the mask slot
                { "name": "gas_mask" },
                { "name": "gpnvg_18" },
            ],
            "backpacks": [ // Items that can randomly appear in the backpack slot
                { "name": "mil_tec_us_assault_olive" },
            ]
        }
    ]
}

⚙️ Available Parameters

  • category : NPCCategory — Defines the category of the NPC (e.g., "TRADER", "QUEST", "FRIENDLY", "BANDIT" or "DUMMY").

  • description : String — A brief description of the NPC's role or behavior that will be displayed to players.

  • canWander : Boolean — If true, the NPC can wander around the world.

  • canBeAttacked : Boolean — If true, the NPC can be attacked by players or other entities.

  • isImmuneToExplosion : Boolean — If true, the NPC is immune to explosions.

  • isImmuneToFire : Boolean — If true, the NPC is immune to fire.

  • canBePushed : Boolean — If true, the NPC can be pushed by players or other entities.

  • canCollides : Boolean — If true, the NPC can collide with other entities.

  • cannotDespawn : Boolean — If true, the NPC can't despawn.

  • canAttack : Boolean — If true, the NPC can attack players or other entities.

  • canFollow : Boolean — If true, the NPC can follow players.

  • whatNeededToFollow : FollowerCondition — The conditions that must be met for the NPC to follow players. (E.g : 100$ or a specific item).

  • trades : NPCTrade — A list of trades that the NPC can offer to players.

  • outfits : NPCOutfit — A list of outfits that the NPC can wear.

  • handsItem : ItemStack — The item that the NPC is holding in their (Main) hands.

FollowerCondition parameters

  • durationInTicks : Integer — The duration for which the condition is valid (e.g., "6000" for 5 minutes).

  • item : ItemStack — The item required for the NPC to follow the player.

  • cost : Integer — The amount of in-game currency required for the NPC to follow the player.

    Note: Only one of the item or cost parameters should be used to define the condition.

NPCTrade parameters

  • profit : Integer — The amount of in-game currency gained from the trade.

  • cost : Integer — The amount of in-game currency required for the NPC to follow the player.

  • itemToSell : ItemStack — The item that the NPC gives to the player in the trade.

  • requiredItemToSell : ItemStack — The item that the player must give to the NPC in the trade.

    Note: You can only combine cost + itemToSell or profit + requiredItemToSell in a single trade.

NPCOutfit parameters

  • masks : ItemStack — A list of items that can randomly appear in the mask slot.

  • gloves : ItemStack — A list of items that can randomly appear in the gloves slot.

  • clocks : ItemStack — A list of items that can randomly appear in the clock slot.

  • backpacks : ItemStack — A list of items that can randomly appear in the backpack slot.

  • vests : ItemStack — A list of items that can randomly appear in the vest (Plate Carrier) slot.

  • belts : ItemStack — A list of items that can randomly appear in the belt slot.

  • helmets : ItemStack — A list of items that can randomly appear in the helmet slot.

  • chests : ItemStack — A list of items that can randomly appear in the chest slot.

  • pants : ItemStack — A list of items that can randomly appear in the pants slot.

  • boots : ItemStack — A list of items that can randomly appear in the boots slot.


Continue to the next section: create a zone

Clone this wiki locally