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

Minecraft:Behavior pack: Difference between revisions

From SAS Gaming Wiki
imported>MinecraftBedrockPlayer7
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{For|the similar system in ''Java Edition''|Data pack}}{{Exclusive|bedrock}}
{{About|JSON-based data-driven modding APIs|the similar system in ''Java Edition''|Data pack|the parent APIs for modding|Add-on}}{{Exclusive|bedrock}}
 
[[File:Behavior of Creeper in add-on.jpg|thumb|Editing the behavior of a [[creeper]] through {{w|JSON}}-based data-driven components.]]
The '''behavior pack''' system is a data-driven framework used to define behaviors, characteristics, and logic of various things in a ''Minecraft'' [[Minecraft:world]].
The '''behavior pack''' system is a [[Minecraft:w:Data-driven programming|data-driven]] framework used to define behaviors, characteristics, and logic of various things in a ''Minecraft'' [[Minecraft:world]].


== Overview ==
== Overview ==
Behavior pack serves as the foundational layer for many aspects of the game, dictating [[Minecraft:Mob AI|entity behaviors]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/entitybehaviorintroduction?view=minecraft-bedrock-stable|title=Entity Behavior Introduction|website=Microsoft Learn|date=September 19, 2023}}</ref> [[Minecraft:Loot table|loot tables]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontoloottables?view=minecraft-bedrock-stable|title=Introduction to Loot Tables|website=Microsoft Learn|date=March 6, 2025}}</ref> [[Minecraft:Mob spawning|spawn rules]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/cliententitydocumentation/datadrivenspawning?view=minecraft-bedrock-stable|title=Data-Driven Spawn Rules|website=Microsoft Learn|date=November 8, 2023}}</ref> [[Minecraft:item]] behaviors,<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/addcustomitems?view=minecraft-bedrock-stable|title=Custom Items|website=Microsoft Learn|date=September 18, 2024}}</ref> item [[Minecraft:Recipe|recipes]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/recipeintroduction?view=minecraft-bedrock-stable|title=Recipe Introduction|website=Microsoft Learn|date=April 19, 2024}}</ref> biome characteristics,<ref name="biome-component-list">{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/biomes/biomeoverview?view=minecraft-bedrock-stable|title=Biome JSON and Overview|website=Microsoft Learn|date=April 10, 2025}}</ref> [[Minecraft:world generation]], and much more. These definitions are written in [[Minecraft:JSON]] files, which are organized in multiple folders by their features. This system allows users to override and modify certain features in the base game, or add unique features with their own behavior pack. Behavior packs are often used in conjunction with [[Minecraft:Resource pack|resource packs]] as part of an [[Minecraft:add-on]], which enable them to use custom resources, such as [[Minecraft:Model|models]], [[Minecraft:Animation|animations]], [[Minecraft:Texture|textures]], [[Minecraft:Sound|sounds]], and more.
Behavior pack serves as the foundational layer for many aspects of the game, dictating [[Minecraft:Mob AI|entity behaviors]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/entitybehaviorintroduction?view=minecraft-bedrock-stable|title=Entity Behavior Introduction|website=Microsoft Learn|date=September 19, 2023}}</ref> [[Minecraft:Loot table|loot tables]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontoloottables?view=minecraft-bedrock-stable|title=Introduction to Loot Tables|website=Microsoft Learn|date=March 6, 2025}}</ref> [[Minecraft:Mob spawning|spawn rules]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/cliententitydocumentation/datadrivenspawning?view=minecraft-bedrock-stable|title=Data-Driven Spawn Rules|website=Microsoft Learn|date=November 8, 2023}}</ref> [[Minecraft:item]] behaviors,<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/addcustomitems?view=minecraft-bedrock-stable|title=Custom Items|website=Microsoft Learn|date=September 18, 2024}}</ref> item [[Minecraft:Recipe|recipes]],<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/recipeintroduction?view=minecraft-bedrock-stable|title=Recipe Introduction|website=Microsoft Learn|date=April 19, 2024}}</ref> biome characteristics,<ref name="biome-component-list">{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/documents/biomes/biomeoverview?view=minecraft-bedrock-stable|title=Biome JSON and Overview|website=Microsoft Learn|date=April 10, 2025}}</ref> [[Minecraft:world generation]], and much more. These definitions are written in [[Minecraft:JSON]] files, which are organized in multiple folders by their features. This system allows users to override and modify certain features in the base game, or add unique features with their own behavior pack. Behavior packs are often used in conjunction with [[Minecraft:Resource pack|resource packs]] as part of an [[Minecraft:add-on]], which enable them to use custom resources, such as [[Minecraft:Model|models]], [[Minecraft:Animation|animations]], [[Minecraft:Texture|textures]], [[Minecraft:Sound|sounds]], and more.


Behavior pack provides a [[Minecraft:w:Entity component system|component-based system]] that makes up most entities in the game by describing their unique properties and behaviors &#x2014; like [[Minecraft:health]], [[Minecraft:Bounding box|collision box]], [[Minecraft:movement]], [[Minecraft:Mob AI|mob behaviors]], and [[Minecraft:physics]] &#x2014; through multiple components.<ref>{{citation|url=https://wiki.bedrock.dev/entities/entity-intro-bp#components|title=Intro to Entities BP|section=Components|website=Bedrock Wiki|date=June 8, 2025}}</ref> These components are hard coded in the game, but are commonly shared among entities, and can be used extensively to create or modify existing entities in a behavior pack. A similar feature in ''Java Edition'' would be entity [[Minecraft:Attribute|attributes]], but are very limited in terms of features compared to components. The component-based system is also used to define custom items, blocks, and [[Minecraft:Biome|biomes]].<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/itemreference/examples/itemcomponentlist?view=minecraft-bedrock-stable|title=Item Documentation - Item Components|website=Microsoft Learn|date=October 10, 2024}}</ref><ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/blockreference/examples/blockcomponents/blockcomponentslist?view=minecraft-bedrock-stable|title=Block Documentation - Block Components|website=Microsoft Learn|date=November 22, 2024}}</ref><ref name="biome-component-list" />
Behavior pack provides a [[Minecraft:w:Entity component system|component-based system]] that makes up most entities (and other game objects) in the game by describing their unique properties and behaviors &#x2014; like [[Minecraft:health]], [[Minecraft:Bounding box|collision box]], [[Minecraft:movement]], [[Minecraft:Mob AI|mob behaviors]], and [[Minecraft:physics]] &#x2014; through multiple components.<ref>{{citation|url=https://wiki.bedrock.dev/entities/entity-intro-bp#components|title=Intro to Entities BP|section=Components|website=Bedrock Wiki|date=June 8, 2025}}</ref> These components are hard coded in the game, but are commonly shared among entities, and can be used extensively to create or modify existing entities in a behavior pack. [[Minecraft:Molang]] can be used to quickly determine dynamic values from other objects or calculations. A similar feature in ''Java Edition'' would be entity [[Minecraft:Attribute|attributes]], but they only store numeric properties of entities compared to components, which may store other multi value properties.
 
The component-based system is also used to define custom items, blocks, and [[Minecraft:Biome|biomes]].<ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/itemreference/examples/itemcomponentlist?view=minecraft-bedrock-stable|title=Item Documentation - Item Components|website=Microsoft Learn|date=October 10, 2024}}</ref><ref>{{citation|url=https://learn.microsoft.com/en-us/minecraft/creator/reference/content/blockreference/examples/blockcomponents/blockcomponentslist?view=minecraft-bedrock-stable|title=Block Documentation - Block Components|website=Microsoft Learn|date=November 22, 2024}}</ref><ref name="biome-component-list" /> There are four sets of components that define behaviors for different game objects: [[Minecraft:entity components]], [[Minecraft:item components]], [[Minecraft:block components]], and [[Minecraft:biome components]].


== Usage ==
== Usage ==
Line 169: Line 171:


== History ==
== History ==
{{See also|Add-on#History}}
{{For|add-on major milestones and scripting related additions and changes|Add-on#History}}
{{Expand section}}
{{HistoryTable
|{{HistoryLine||August 12, 2016|link=https://twitter.com/SeargeDP/status/764033531223896064|The concept of add-ons was hinted at in a post by [[Minecraft:Searge]] on August 12, 2016, stating "There will be news about the API at Minecon."<ref>{{tweet|searge|764033531223896064|There will be news about the API at Minecon. I'll talk about the things I'm working on and what our plans are. But no more details for now.|August 12, 2016}}</ref> The next day it was confirmed by [[Minecraft:Grum]] to be a modding API for {{BE}} (formerly called {{PE}}, or ''MCPE''),<ref>{{tweet|_grum|764417838278926336|the MCPE on, would be nice to say that too.|August 13, 2016}}</ref> and at [[Minecraft:MINECON 2016]], the plan and roadmap for the development of add-ons were outlined.}}
|{{HistoryLine|pocket alpha}}
|{{HistoryLine||v0.16.0|Added user-created behavior packs. These allow the player to change files coded in JSON to change how the game works.}}
|{{HistoryLine|pocket}}
|{{HistoryLine||1.0.4|dev=alpha 1.0.4.0|Introduced a new add-on format; older add-ons would automatically update|The models for the [[Minecraft:shulker]] and [[Minecraft:ender dragon]] became editable using add-ons.}}
|{{HistoryLine|||dev=alpha 1.0.4.1|Added the Storage screen in Settings to manage worlds, resource packs, and behavior packs.|Custom texts in add-ons no longer required restarting the game to work.}}
|{{HistoryLine||1.0.6|Fixed several add-on issues, including [[Minecraft:snow golem]] pumpkin head scaling and dependent add-ons being properly applied when replacing a [[Minecraft:Realms]] world.}}
|{{HistoryLine||1.1.1|Updated resource and behavior packs on https://minecraft.net/addons, and updated documentation|Fixed several mobs and entities loading properly with behavior packs.}}
|{{HistoryLine||1.1.3|Updated resource and behavior packs; all behavior components and AI goal parameters were added to the documentation.}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||1.7.0|Fixed several behavior-pack issues, including projectile shooting offsets, movement behavior when all movement components were removed, and floating navigation behavior on flying mobs.}}
|{{HistoryLine||1.8.0|dev=beta 1.8.0.8|Added {{cmd|function}} and {{cmd|reload}} for behavior packs|Added {{cd|minecraft:}} prefix for {{cmd|summon}} to separate vanilla and add-on entities|Allowed creators to add their own custom mobs, particles, and more without replacing vanilla content.{{verify|dev version}}}}
|{{HistoryLine||1.10.0|dev=beta 1.10.0.3|Added JSON-based mob events and behavior scheduler.|Fixed several resource-pack and scripting issues affecting custom names, custom UI loading, particles, spawn events, filters, and entity validation.}}
|{{HistoryLine||1.12.0|dev=beta 1.12.0.2|Added several new commands related to add-ons and mapmaking.|Added {{cd|minecraft:}} prefix for {{cmd|give}} to separate vanilla items and add-on items.|Added custom particles and animations without being linked to entities.|Added several preset data-driven particles and animations.|Added custom blocks through Scripting and additional JSON scripting (and only placed by commands).|Added custom items with add-ons.{{verify|if this is the right development version, because the changelog from beta 1.12.0.2 wiki page does not include this change}}|Added custom biome generation via behavior packs.|Added a screen to view content log errors.|Enabled content logging on [[Minecraft:Bedrock Dedicated Server]]s.|Updated demo pack.}}
|{{HistoryLine||1.13.0|dev=beta 1.13.0.9|Added data-driven items for [[Minecraft:turtle]] lightning interactions, [[Minecraft:pufferfish]] puffed states, and [[Minecraft:brewing stand]] potion recipes.}}
|{{HistoryLine||1.14.1|dev=beta 1.14.0.51|Added the {{cmd|gamerule showtags}} command to hide item tags in the UI.}}
|{{HistoryLine||1.16.0|dev=beta 1.15.0.51|Made most attack, slime, and swim goals data-driven.|Made tree generation, wither skull attacks, item sprites, and [[Minecraft:drowned]] data-driven.}}
|{{HistoryLine|||dev=beta 1.16.0.57|Fixed an issue with custom brewing recipes.}}
}}


== See also ==
== See also ==

Latest revision as of 11:03, 24 April 2026

Template:Exclusive

File:Behavior of Creeper in add-on.jpg
Editing the behavior of a creeper through Template:W-based data-driven components.

The behavior pack system is a data-driven framework used to define behaviors, characteristics, and logic of various things in a Minecraft Minecraft:world.

Overview

Behavior pack serves as the foundational layer for many aspects of the game, dictating entity behaviors,<ref>Template:Citation</ref> loot tables,<ref>Template:Citation</ref> spawn rules,<ref>Template:Citation</ref> Minecraft:item behaviors,<ref>Template:Citation</ref> item recipes,<ref>Template:Citation</ref> biome characteristics,<ref name="biome-component-list">Template:Citation</ref> Minecraft:world generation, and much more. These definitions are written in Minecraft:JSON files, which are organized in multiple folders by their features. This system allows users to override and modify certain features in the base game, or add unique features with their own behavior pack. Behavior packs are often used in conjunction with resource packs as part of an Minecraft:add-on, which enable them to use custom resources, such as models, animations, textures, sounds, and more.

Behavior pack provides a component-based system that makes up most entities (and other game objects) in the game by describing their unique properties and behaviors — like Minecraft:health, collision box, Minecraft:movement, mob behaviors, and Minecraft:physics — through multiple components.<ref>Template:Citation</ref> These components are hard coded in the game, but are commonly shared among entities, and can be used extensively to create or modify existing entities in a behavior pack. Minecraft:Molang can be used to quickly determine dynamic values from other objects or calculations. A similar feature in Java Edition would be entity attributes, but they only store numeric properties of entities compared to components, which may store other multi value properties.

The component-based system is also used to define custom items, blocks, and biomes.<ref>Template:Citation</ref><ref>Template:Citation</ref><ref name="biome-component-list" /> There are four sets of components that define behaviors for different game objects: Minecraft:entity components, Minecraft:item components, Minecraft:block components, and Minecraft:biome components.

Usage

File:Ore UI - Create New World Screen Menu "Behavior Packs" Tab Settings (Bedrock).png
The behavior packs tab in the Create New World screen.

Similar to Minecraft:resource packs, behavior packs can be created and imported Template:In. Users can download external behavior packs with the Template:Cd file extension, if the game's platform allows file import feature. When these files are opened, they are automatically imported into the Template:Code folder in Template:Code without accessing the file system. Behavior packs can also be placed manually in the Template:Code folder. Each behavior pack must either be a sub-folder or a Template:Code file.

One or more behavior packs can be applied to a world from the Minecraft:Create New World and Minecraft:Edit World screens. These behavior packs will be imported into the world files, and are kept when exporting the world. Players joining a Minecraft:multiplayer world with behavior packs get an option to download only the required assets from the behavior pack, or all assets. The game loads behavior packs based on the order of the packs on the list. The bottom-most pack loads first, then each pack placed above are loaded sequentially.

Custom behavior packs permanently disable Minecraft:achievement unlocking for the world. Custom behavior packs cannot be applied to worlds on Minecraft:Realms, but worlds uploaded to Realms or Minecraft:Bedrock Dedicated Server keep the behavior packs applied to the world.

In Bedrock Dedicated Server, behavior packs also can be stored outside of worlds. Packs need to be enabled in the Template:Cd file in a world file.

Behavior packs cannot be edited while the game is active, except for the packs in the Template:Code folder. They will update themselves when joining a world or changing active behavior packs.

Settings

Behavior packs and resource packs can contain custom settings that affect features in the pack.<ref>Template:Cite</ref> Settings need to be specified in Template:Cd, with the options to create an on/off toggle, or a slider with specific values. The settings menu for custom and Marketplace behavior packs can be opened with a button next to the pack button in the edit world screen, and all settings affect the whole world. Custom labels for each setting can be applied, which support text formatting.

How each setting affects the behavior pack can be modified with Minecraft:scripting.

The settings menu can also be used to change the memory tier, which affects the sub-packs being used.<ref>Template:Cite</ref> The memory tier can be set to any specified value from the device's memory tier and lower. Sub-packs are behavior packs within the root of the behavior pack, with the same directory structure. They can be added to the pack in Template:Cd.

Marketplace behavior packs

Minecraft:Add-ons and worlds from the Minecraft:Marketplace often contain or consist entirely of a behavior pack. These packs are stored internally and can't be accessed from Template:Code. Players can only access Marketplace behavior packs or play on worlds with behavior packs applied when they own the pack, by purchasing it in the Marketplace or by owning the Minecraft:Marketplace Pass. Which packs a player owns is stored in the online player profile, so behavior packs can only be accessed when signed in. Marketplace packs can be applied the same way as custom resource packs, and also to Realms, but not to worlds in external servers.

When a player joins a multiplayer world or Realm with Marketplace packs, the player is offered to download these packs to apply them, even when the player does not own the pack.

Marketplace behavior packs update automatically depending on the "Auto Update Unlocked Packs" settings, or can be updated manually from the purchase screen.

Contents

Template:Expand section

Directory structure

Template:Fnlist

Internal behavior packs

Most entities, biomes, loot tables, and various things from the base game are defined by the vanilla behavior pack, which is built inside the game itself and can be found at Template:Cd. Mojang Studios releases the Bedrock Add-On Sample Files with every new Minecraft:update of Bedrock Edition, which provide the latest vanilla behavior and resource packs from the game.

Multiple internal behavior packs exist for different situations. Each experiment has its own behavior pack, in addition to Minecraft:Minecraft Education features and Minecraft:Minecraft Preview. Each behavior pack contains the same structure and assets as custom behavior packs, defined for the whole game. Some packs also have an icon or description, which is not visible in-game.

Bedrock Editon supports Template:W for add-ons and old worlds. This is done for the Template:Cd and Template:Cd behavior packs since 1.14 and 1.20.50 respectively, with the regular behavior pack supporting the latest version before. Each update with changes to features defined in behavior packs has its own behavior pack, with all the features that changed. Some Marketplace add-ons can lock a world in an older version by disabling internal behavior packs from higher versions.

File name Pack icon, name, and description Description
chemistry width=32x32 Resources for the "Minecraft Education features" cheat setting. Includes several features from the Minecraft:Chemistry Update in Minecraft:Minecraft Education. Multiple versions of this pack are available to support backwards-compatibility.
editor width=32x32 Resources for Minecraft:Bedrock Editor, applied when the Editor is enabled upon launch. Contains five unique Minecraft:entities exclusive to the Editor, some textures for the GUI, and the main script file which can be customized.
experimental_creator_cameras Experimental Creator Cameras Contains a camera preset for the "Experimental Creator Cameras" experiment.
experimental_vanilla_shapes Vanilla Voxel Shapes

Experimental behavior pack for vanilla voxel shapes

Contains vanilla voxel shapes for the experiment, at this point nothing.
experimental_villager_trade Villager Trade Rebalancing Contains trade tables for the Minecraft:Villager Trade Rebalancing experiment, as well as different loot tables for mineshafts, ancient cities, desert pyramids, jungle pyramids, and pillager outposts.
experimental_y_2026_drop_1 Drop 1 of 2026
Experimental behavior pack for Drop 1 of 2026 content
Adds features for the Minecraft:Tiny Takeover, including a Minecraft:name tag recipe and some changes to baby mobs.
experimental_y_2026_drop_2 Drop 2 of 2026
Experimental behavior pack for Drop 2 of 2026 content
Adds features for Chaos Cubed, including the sulfur caves, sulfur cube, Minecraft:cinnabar, and Minecraft:sulfur.
server_editor_library width=32x32 Server Editor Library

Library for building server driven Editor UI

Contains scripts for the Editor when used on Minecraft:Bedrock Dedicated Server.
server_library width=32x32 @minecraft/server TS Library

A BP containing all the @minecraft/server typescript code.

Contains typescript code for the Editor. Only available in Minecraft Preview.
server_ui_library width=32x32 @minecraft/server-ui TS Library

A BP containing all the @minecraft/server-ui typescript code.

Contains scripts for the UI in the Editor. Only available in Minecraft Preview.
vanilla width=32x32 All resources for the default Minecraft game. Multiple versions of this pack are available to support backwards-compatibility.

Videos

Tutorials from the official Minecraft Creator ChannelTemplate:YtTemplate:YtTemplate:YtTemplate:YtTemplate:YtTemplate:Yt

History

Template:For Template:HistoryTable

See also

References

Template:Reflist

External links

Official documentation

Official tutorials

Tools and libraries

Unofficial resources

Templates

Navigation

Template:Navbox Bedrock EditionTemplate:Navbox Minecraft

Minecraft:de:Verhaltenspaket Minecraft:pt:Pacote de comportamento Minecraft:ru:Пакет поведения