NPC

| Health points |
∞ (Minecraft Education) |
|---|---|
| Behavior |
Passive |
| Hitbox size |
Height: 2.1 Blocks |
| Spawn |
See Spawning |
{
"extratext": "View [[#Gallery|all renders]]",
"title": "NPC",
"images": [
"NPC1pre.png"
],
"rows": [
{
"field": "∞ (Minecraft Education)<br>0 (Bedrock Edition)",
"label": "(link to Health article, displayed as Health points)"
},
{
"field": "Passive",
"label": "Behavior"
},
{
"field": "Height: 2.1 Blocks<br>Width: 0.6 Blocks",
"label": "(link to Hitbox article, displayed as Hitbox size)"
},
{
"field": "See (link to #Spawning article, displayed as Spawning)",
"label": "(link to Mob spawning article, displayed as Spawn)"
}
],
"invimages": [
"NPC Spawn Egg"
]
}
Non player characters (abbreviated as NPCs) are interactive passive mobs that have models similar to villagers.[1]
Spawning
Unlike other entities, NPCs do not spawn naturally; they can be spawned using the NPC spawn egg (it can be obtained with the following command: /give @s spawn_egg 1 51), or by using the command /summon npc. When spawned, an NPC displays a name hovering over its head. The default name is "NPC" with a color code of §e, resulting in the name being yellow.
To spawn an NPC with its spawn egg, the player must have the Worldbuilder authorization, automatically granted to players in Creative mode, or by using the /worldbuilder command.
Behavior
NPCs have no basic AI. They can neither move nor be pushed by most entities, but they can be pushed by the breeze's wind charge, and by explosions, water, lava, by sticky pistons from below or sides with a slime block attached and they can slide on ice when pushed. They cannot take damage nor be affected by potions. Nevertheless, the NPCs can still turn their body and stare at the nearest player if close enough. NPCs can also never ride minecarts or boats, and the vehicles go through NPCs. The player cannot use a lead on them.
NPCs are invulnerable to attacks. An NPC is attacked by zoglins, withers, wardens, goats, and vindicators named Johnny, but the NPC remains undamaged. Pufferfish also inflate when an NPC is nearby. Foxes don't sleep near NPCs as well. Projectiles pass through them. However, an NPC dies when going below Y=-64, and despawns if it falls into the void.
Interface


Right-clicking an NPC displays the interface. It can be edited only as long as the player has the world builder permission. The interface allows the player to edit the dialog, name, appearance and advanced settings. When the player doesn't have the world builder permission, it shows only the dialog and buttons.
Customization
- Name
- The name of an NPC can be entered in the top text pane titled "Name". The text limit for the name is 32, and the color can be changed by using the color codes as by default the color is yellow (§e). Please note that there is a difference between the display name (the one you can change in the interface and is shown to everyone) and the actual name. The actual name is the one you want to use when using "@e[name=NPC]", and is often by default, just NPC. If you want it to have a different name, use /summon or rename the spawn egg to the preferred name.
- Dialog
- The dialog box located right below the "Name" and often used as a tool for guiding. The text limit for the dialog is 256, although in some cases it appears as 337.
- Appearance
- NPCs appearance are selectable, to change the skin simply just by left clicking on the preferred skin.
- There are currently 60 skins available for the NPCs and defaults to the yellow-robed NPC.
- Advanced Settings
- The advanced NPC settings consists of URLs and commands. They are used to create interactive buttons. The current maximum advanced settings that can be added is 6.
- URL
- The URL feature allows the player to add a hyperlink button. The URL can be entered at the first input box below the title up to 1024 letters.
- To change the button name or label can be proceeded by filling the input box titled "Button Name", the current text limit for the label is 16 letters.
- When added, the button appears only if the player has the world builder permission disabled. The button label defaults to "Learn More" and the color defaults to blue, it can be changed by using the color codes.
- Command
-
- The command feature allows the player to add one or more executable commands in the NPC. The command can be entered at the first input box below the title, unlike the command block wherein multiple commands can be executed in one window. The current maximum characters for the command is 1024. The command(s) get executed when the dialogue with the NPC is closed.
- The command can be presented either as a button or a direct command. As a button, the button name or label can be changed by filling the input box titled "Button Name", the text limit for the label is 16 letters. It can be executed only if the player has the world builder permission disabled.
- When not added as a button, the command is executed after the dialogue with the NPC, visible by right clicking the NPC, has closed. In contrariwise, the button is displayed and has a label color defaults to light gray, and can be changed by using the color codes. (the default name of the NPC is NPC)
@initiator is a specialized Target selector that targets the player that has interacted with the NPC, distinguishing them from other players that may interact later. This is useful for running commands on a per-player basis.
Sounds
| Sounds | |||||
|---|---|---|---|---|---|
| Sound | Source | Description | Resource location | Volume | Pitch |
| Friendly Creatures Friendly Mobs | When an NPC is spawned | mob | 1.0 | 0.8-1.2 | |
| Friendly Creatures Friendly Mobs | When a NPC dies | mob | 1.0 | 0.8-1.2 | |
| Blocks | When an NPC despawns in the void. | dig | 1.0 | 0.8-1.2 | |
Data values
ID
| Name | Identifier | Numeric ID | Translation key |
|---|---|---|---|
npc | 51 | entity |
Entity data
NPCs have entity data associated with them that contain various properties.
History
| Pocket Edition Alpha | |||||||
|---|---|---|---|---|---|---|---|
| v0.16.0 | build 1 | ||||||
| build 4 | The NPC spawn egg has been removed. | ||||||
| build 5 | NPCs now have a behavior file in: 'server/entities/npc.json'. | ||||||
| Pocket Edition | |||||||
| 1.0.0 | alpha 0.17.0.1 | NPCs have been re-added. | |||||
| Bedrock Edition | |||||||
| 1.8.0 | beta 1.8.0.8 | NPCs currently have no functionality. | |||||
NPCs can now be summoned only using the /summon command while having Minecraft Education mode enabled. | |||||||
| 1.10.0 | beta 1.10.0.4 | NPCs are no longer summonnable using /summon, but can still be spawned via mob editing, and still available in a world if one was spawned in a previous version.
| |||||
| NPCs now have a dialog GUI and changeable skins. | |||||||
| 1.12.0 | beta 1.12.0.2 | Dialog and changeable skins have been removed from NPCs. | |||||
| 1.16.0 | beta 1.15.0.51 | Dialog and changeable skins for NPCs have been added back into the game. | |||||
NPC spawn eggs can now be obtained using /give <player> spawn_egg 1 51. | |||||||
| beta 1.16.0.51 | NPCs can now be summoned using the /summon command again. | ||||||
| beta 1.16.0.60 | NPCs no longer have a health value. | ||||||
| 1.18.30 | beta 1.18.20.21 | ||||||
| 1.19.40 | Preview 1.19.40.21 | ||||||
| Minecraft Education | |||||||
| 1.0 | |||||||
| NPCs are editable and can be given commands to do certain actions. | |||||||
| 1.0.2 | NPC interface page is now more advanced. | ||||||
| Added button mode for the URL and commands. | |||||||
| 1.14.31 | |||||||
| 1.14.70 | 1.14.60 | ||||||
| 1.18.32 | ? | ||||||
Issues
Issues relating to "NPC" are maintained on the bug tracker. Issues should be reported and viewed there.
Trivia
- The NPC is the only mob in Bedrock Edition to not have its spawn egg changed yet.
- The NPC addition in Pocket Edition alpha was likely accidental due to Pocket Edition sharing the same codebase as Education Edition likely in an agent.
Gallery
Renders
-
NPC -
NPC -
NPC -
NPC -
NPC -
NPC -
NPC -
NPC -
NPC -
NPC -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Scientist -
Apiary -
Apiary -
Apiary -
Apiary -
Apiary -
Teacher -
Teacher -
Teacher -
Teacher -
Teacher -
Constructor -
Constructor -
Constructor -
Constructor -
Constructor -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Agriculture -
Business Mob -
Business Mob -
Business Mob -
Business Mob -
Business Mob -
Everyday Business -
Everyday Business -
Everyday Business -
Everyday Business -
Everyday Business -
Kiosk -
Kiosk -
Kiosk -
Kiosk -
Kiosk
Screenshots
-
The NPC placed in a world along with other Education Edition features. -
NPC. -
Example of a spawned NPC named§eNPC. -
Several NPCs looking at the player. -
NPC named Dinnerbone. -
NPC skins. -
A NPC alongside a camera and an agent in a tutorial world.
Development images
-
Early NPCs used player model and skins. -
NPCs in town
In other media
-
An NPC making an appearance in Eerie Mojang Office Party. -
NPCs in promotional artwork for the Chemistry Update. -
NPC in promotional artwork for the Library Update. -
NPCs in promotional artwork for the Chromebook Release. -
NPC in promotional artwork for Mobile, Multiplayer & More. -
NPCs in a promotional artwork for the game. -
Two NPCs in a official artwork. -
The NPC menu in a promotional image. -
The Beekeeper NPCs. -
The Construction Worker NPCs. -
The Teacher NPCs. -
The Agriculture NPCs. -
The Business Mob NPCs. -
The Everyday Business NPCs. -
The Kiosk NPCs.
References
External links
- Beginners Guide to Adding NPCS – Minecraft.net on November 09, 2021
| |||||||||||||||||||
| |||||||||||||||||||