Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:NPC

From SAS Gaming Wiki
Revision as of 14:18, 3 April 2026 by imported>RedX (Undo revision 3515408 by ~2026-WitherResinChicken8258 (talk) doesn't seem to exist)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Hatnote Template:Exclusive Template:Infobox entity

Non player characters (abbreviated as NPCs) are interactive Minecraft:passive mobs that have models similar to Minecraft:villagers.<ref>Template:Cite</ref>

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 Minecraft:spawn egg, the player must have the Worldbuilder authorization, automatically granted to players in Creative mode, or by using the Template:Cmd command.

Behavior

NPCs have no basic AI. They can neither move nor be pushed by most entities, but they can be pushed by the Minecraft:breeze's Minecraft:wind charge, and by Minecraft:explosions, Minecraft:water, Minecraft:lava, by Minecraft:sticky pistons from below or sides with a Minecraft:slime block attached and they can slide on Minecraft:ice when pushed. They cannot take damage nor be affected by Minecraft:potions. Nevertheless, the NPCs can still turn their body and stare at the nearest Minecraft:player if close enough. NPCs can also never ride Minecraft:minecarts or Minecraft:boats, and the Minecraft:vehicles go through NPCs. The player cannot use a Minecraft:lead on them.

NPCs are invulnerable to attacks. An NPC is attacked by Minecraft:zoglins, Minecraft:withers, Minecraft:wardens, Minecraft:goats, and Minecraft:vindicators named Johnny, but the NPC remains undamaged. Minecraft:Pufferfish also inflate when an NPC is nearby. Minecraft: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

File:Npcpet.png
NPC interface without world builder permission.
File:NPCs Talk page in pe.png
NPC interface with world builder permission.

Right-clicking an NPC displays the interface. It can be edited only as long as the Minecraft: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 Minecraft:color codes as by default the color is yellow (§e). This does not set the custom name given by Minecraft:name tag, renamed Minecraft:spawn egg, or Template:Cmd command; as the name set by the menu is different and cannot be selected by Template:Cd target selector argument.
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. Template:IN, there are only 35 available to choose from.
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.
URLTemplate:Only
The URL feature allows the Minecraft: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 Minecraft:commands in the NPC. The command can be entered at the first input box below the title, unlike the Minecraft: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)
  • @initiatorTemplate:Only is a specialized Minecraft: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

Template:SoundTable

Data values

ID

Template:ID table

Entity data

NPCs have entity data associated with them that contain various properties.

See Minecraft:Bedrock Edition level format/Entity format.

History

Bedrock Edition

Template:HistoryTable

Minecraft Education

Template:HistoryTable

Issues

Template:Issue list

Trivia

  • The NPC is the only mob in Template:BE 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 Minecraft:agent.

Gallery

Renders

Screenshots

Development images

In other media

References

Template:Reflist

External links

Navigation

Template:Navbox entities Template:Navbox Education

Minecraft:de:NPC Minecraft:es:NPC Minecraft:fr:PNJ Minecraft:it:PNG Minecraft:ja:NPC Minecraft:ko:NPC Minecraft:pl:NPC Minecraft:pt:NPC Minecraft:ru:Неигровой персонаж Minecraft:th:NPC Minecraft:tr:NPC Minecraft:uk:Неігровий персонаж Minecraft:zh:NPC