Bedrock Wiki
  • Discord
  • Contribute
  • bedrock.dev
  • MS Learn
Beginner's Guide
  • Guide
    • 1. Introduction
      guide
    • 2. Add-Ons Explained
    • 3. Software & Preparation
    • 4. Project Setup
    • 5. Create a Custom Item
    • 6. Create a Custom Entity
    • 7. Blockbench: Modeling, Texturing & Animating
    • 8. Adding a Loot Table, Spawn Rule & Crafting Recipe
  • Extra
    • a. Understanding JSON
    • b. Download Example Packs
    • c. Troubleshooting
      help
    • d. Advanced Manifest
    • e. Format Versions
    • f. Project Setup Android
Animation Controllers
  • Intro to Animation Controllers
    guide
  • Entity Commands
  • AFK Detector
  • Death Commands
  • Molang into Scoreboard
  • Respawn Commands
Blocks
  • General
    • Intro to Blocks
      guide
    • Block Components
    • Block Tags
    • Block States
    • Block Traits
    • Block Permutations
    • Block Events
      Scripts
    • Block Event Migration
      help
    • Blocks as Items
    • Troubleshooting Blocks
      help
  • Visuals
    • Block Culling
    • Block Models
      guide
    • Block Texture Animation
    • Block Texture Variation
    • Block Tinting
  • Tutorials
    • Applying Constant Effects
      Scripts
    • Avoiding State Limit
    • Fake Blocks
    • Ore Loot Tables
      Scripts
    • Precise Interaction
      Scripts
    • Precise Rotation
      Scripts
    • Rotatable Blocks
  • Vanilla Re-Creations
    • Custom Crops
      Scripts
    • Custom Glass
    • Custom Glazed Terracotta
    • Custom Trapdoors
      Scripts
  • Documentation
    • Block Format History
    • Block Shapes
    • Block Sounds
    • Vanilla Block Models
Commands
  • General
    • Intro to Command Blocks
    • Functions
    • Block States
    • Coordinate System
    • NBT Commands
    • Scoreboard Operations
    • Understanding Selectors
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On Player First Join
    • On Player Join
    • On Player Leave
    • On Player Death
    • On Player Respawn
    • On First World Load
  • Scoreboard Systems
    • Entity Counter
    • Scoreboard Timers
    • Comparing And Retrieving Scores
  • Techniques
    • Execute Logic Gates
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Look Detection
    • Movement Detections
    • Orbital Camera
  • Useful Creations
    • Custom Crafter
    • Multiplayer Position Rearrangement
      function
Concepts
  • contents.json
  • Emojis & Symbols
  • Molang
  • Namespaces
  • Overwriting Assets
  • Raw Text
  • Shaders
  • Sounds
  • Subpacks
  • Text and Localization
  • Texture Atlases
  • textures_list.json
Documentation
  • Shared Constructs
  • Advanced Molang
  • File Types
  • Fog IDs
  • Material Configuration Description
  • Menu Categories
  • Molang Queries
  • Pack Folder Structure
  • Sound Definitions
  • Vanilla Materials
Entities
  • General
    • Intro to Entities BP
      guide
    • Intro to Entities RP
      guide
    • Troubleshooting Entities
      help
    • Entity Events
    • Entity Properties
    • NPC Dialogues
    • Render Controllers
    • Spawn Rules
  • Tutorials
    • Convert Points Between Any Space (World, Entity, Bones)
    • Creating Boats
    • Detecting Other Entities
    • Disabling Team Damage
    • Dummy Entities
    • Entity Attacks
    • Entity Holds Item
    • Entity Movement
    • Entity Timers
    • Flying Entities
    • Introduction to AOE Clouds
    • Invulnerable Entities
    • Look at Entity
    • Sleeping Entities
    • Solid Entities
    • Spawning Tamed Entities
      Scripts
    • Village Mechanic
  • Documentation
    • Dummy Components
    • Non-Mob Runtime Identifiers
    • Projectiles
    • Runtime Identifiers
    • Vanilla Usage Components
    • Vanilla Usage Spawn Rules
Items
  • General
    • Intro to Items
      guide
    • Item Components
    • Item Tags
    • Item Events
      Scripts
    • Item Event Migration
      help
    • Troubleshooting Items
      help
  • Tutorials
    • Custom Armor
    • Custom Food
      Scripts
    • Custom Pottery Sherds
    • Custom Weapons
    • Equipment-Based Commands
    • High Resolution Items
    • Spawning Items
    • Throwable Items
  • Documentation
    • Enchantments
    • Attachables
    • Item Format History
    • Numerical Item IDs
    • Vanilla Item Identifiers
    • Vanilla Usage Components
JSON UI
  • General
    • Intro to JSON UI
      guide
    • Best Practices
      guide
  • Tutorials
    • Adding HUD Elements
    • Aseprite Animations
    • Buttons and Toggles
    • Modifying Server Forms
    • Preserve Title Texts
    • String to Number
  • Documentation
    • JSON UI Documentation
Loot, Recipes & Trading
  • General
    • Trading Behavior
  • Documentation
    • Loot Tables
    • Trade Tables
    • Recipes
    • Item Functions
  • Tutorials
    • Randomized Structure Loot
Meta
  • Add-On Performance
  • Style Guide
  • Useful Links
  • Using Schemas
  • Version Control
  • Q&A
    • Blocks and Items Q&A 2024/08/30
    • Deferred Technical Preview Q&A 2024/02/23
    • GameTest Q&A 2021/08/06
    • Scripting and Editor Q&A 2023/09/22
    • World Generation Q&A 2024/11/15
NBT
  • General
    • .mcstructure
  • Tutorials
    • Experiments in Education Edition
    • Extending Structure Limits
  • NBT in Depth
    • About NBT (Named Binary Tag)
    • NBT Libraries
    • Reading NBT Example
Particles
  • General
    • Intro to Particles
      guide
  • Tutorials
    • Disabling Particles
  • Documentation
    • Vanilla Particles
Scripting
  • General
    • Intro to Scripting
    • What is Script API?
    • API Modules
  • Tutorials
    • Block Placement Prevention
    • GameTests
    • Script Core Features
    • Script Forms
    • Script Requests API
    • Simple Chat Commands
  • Documentation
    • Engine Environment
    • Script Resources
    • Script Watchdog
    • Troubleshooting JavaScript
    • TypeScript
Servers
  • Software
    • Bedrock Server Software
  • Protocols
    • Bedrock Protocol
    • NetherNet Protocol
    • RakNet Protocol
Visuals
  • General
    • Introduction to Entity Visuals
      guide
    • Bedrock Modeling
    • Custom Death Animations
    • Effects in Animations
    • Material Creations
    • Materials
    • Math-Based Animations
    • Skin Packs
  • Tutorials
    • Entity Texture Animation
    • Glowing Entity Texture
    • Hurt Animations
    • Leash Position
    • Player Geometry
    • Remove Entity Shadows
    • Retexturing Spawn Eggs
  • Ideas
    • Structure Presentation
World Generation
  • General
    • Intro to World Generation
      guide
    • Biomes
      guide
    • Feature Types
  • Tutorials
    • Block Conditions for Features
    • Generating Custom Ores
    • Generating Custom Structures
    • Generating Patches
    • Heightmap Noise
  • Documentation
    • Biome Tags

Style Guide

Style Guide
  • Folder Structure
  • Identifiers
  • File and Folder Names
  • Namespaces
  • Sub-Indexing
  • Groups and Events Should Complement Each Other
  • Short-Names Should Be Generic
  • Functions
    • Comments in Functions
  • Scoreboard Objectives & Tags
    • Score Holders
  • Group Animations Files when Possible
  • Split Textures by Path, Not Name
  • .lang File Comments
  • Acronyms when Discussing
  • Definition Format Orders
    • Blocks
    • Entities
    • Items
  • Custom Components
    • Variable Names

This document will present the Bedrock Wiki style guide for add-on creation. This guide aims to promote best practices while creating add-ons and create a consistent format for everyone to follow.

TIP

The style guide is a living, breathing document, which will evolve as add-on creation evolves. Please get in touch if you think something needs to be updated or changed!

Folder Structure ​

  • No spaces in your file paths. use_underscores.
  • No CAPITALS in your identifiers, file names, or folder names. 'BP' and 'RP' folder names may use capitals.
  • The total character length of any path must not exceed 80 characters (console limitation).
  • Content folders should use consistent pluralization: Stick with names that are either all plural or all singular, don't mix and match. Example:

✅️ Consistent:

BP/functions/wiki/ability/ice_blast.mcfunction
BP/functions/wiki/ability/fire_trail.mcfunction
BP/functions/wiki/event/players/on_death.mcfunction
BP/functions/wiki/event/worlds/on_initialise.mcfunction
1
2
3
4
  • All content folders ability and event are consistently singular.
  • The content folders in event are also consistent, as both players and worlds are plural.

❌️ Inconsistent:

BP/functions/wiki/abilities/ice_blast.mcfunction
BP/functions/wiki/abilities/fire_trail.mcfunction
BP/functions/wiki/event/players/on_death.mcfunction
BP/functions/wiki/event/world/on_initialise.mcfunction
1
2
3
4
  • Only abilities content folder is pluralized while event is singular.
  • Also, in the event folder, the players folder is plural while world is singular.

Identifiers ​

Do not use identifiers that begin with a number, and especially don't use an identifier that is only a number. This applies to entities, component_groups, events, and anything else that takes a namespace:name pair.

File and Folder Names ​

ConceptExample
Behavior Packdragons_BP
Resource Packdragons_RP
Geometrydragon.geo.json
Animationsdragon.animation.json
dragon.anim.json
Animation Controllersdragon.animation_controllers.json
dragon.ac.json
RP Entitydragon.entity.json
dragon.client_entity.json
dragon.ce.json
BP Entitydragon.behavior.json
dragon.se.json
(se: server entity)
Itemdragon_tooth.item.json
Legacy Item (BP)dragon_tooth.item.bp.json
Legacy Item (RP)dragon_tooth.item.rp.json
Render Controllersdragon.render_controllers.json
dragon.rc.json
Loot Tabledragon.json
Recipedragon_saddle.recipe.json
Spawn Rulesdragon.spawn.json
Trade Tabledragon.json
Particlesdragon_magic.particle.json
Texturedragon.png
ScriptdragonFlight.js

Namespaces ​

A suitable namespace should be unique to you or your team. Something like mob or cars or content or custom would be a bad namespace since another developer might come up with the same namespace as you.

minecraft and minecon are reserved. Don't use these.

For personal projects, use a convenient version of your player name, and for team projects, use a suitable version of your team name.

When multiple developers work on a project together, the namespace should always be shared. If credit is required, use sub-indexing: minetite.wiki:dragon

Where to use namespaces:

  • entities
  • particles
  • component groups
  • events

When not to use namespaces:

  • do not include your namespace in any folder path or file name.
  • Note: The following folders are exceptions: functions, structures, loot_tables, trade_tables, sounds, and textures.
    • Using a namespace in these folders is recommended to prevent conflicts with other packs.
    • Example: BP/functions/namespace/test.mcfunction

Sub-Indexing ​

Sub indexing is the use of . to separate chained concepts. Sub-indexing should go in descending order from big to small:

✔️ animation.controller.dragon.flying.taking_off

❌ animation.controller.dragon_take_off_flying

When using sub-indexing, use _ as space, not another ..

✔️ animation.controller.dragon.flying.taking_off

❌ animation.controller.dragon.flying.taking.off

You can use sub-indexing in your entities: wiki:dragon.drake

Groups and Events Should Complement Each Other ​

GroupEvent
wiki:wild✔️ wiki:become_wild
wiki:wild❌ wiki:wild
wiki:tame✔️ wiki:on_tame
wiki:tame❌ wiki:tame

Short-Names Should Be Generic ​

Short-names are file-specific identifiers, which are used to map between an identifier and a pretty name. They are handy because they allow us to re-use animation controllers and render controllers. For this reason, your short-names should be generic.

✔️ "sit": "animation.dragon.sit"

❌ "dragon_sitting": "animation.dragon.sit"

When we make short-names of this form, we can use a generic "sit" animation controller for all of them since we can use the sit short-name to play the sit animation.

Functions ​

  1. All your .mcfunction files must be go in a namespaced root-folder within the functions folder. On Bedrock Wiki, we use the wiki namespace. However, you may choose a namespace based on your name or project. For more info, refer to the namespaces page.
    • ✅️ BP/functions/wiki/random_number.mcfunction
    • ❌️ BP/functions/random_number.mcfunction
  2. They must be properly nested:
    • ✅️ BP/functions/wiki/teleport/zone/hell.mcfunction
    • ❌ BP/functions/wiki/teleport_hellzone.mcfunction
  3. The names must follow an action_object structure. Meaning verbs should come before subjects.
    • ✅️ add_all
    • ❌️ all_add
    • ✅️ shuffle_position
    • ❌️ position_shuffle

Comments in Functions ​

  • When working with functions that contain many commands, it's helpful to keep them organized by using multiple hashtags in comments to indicate different header levels.
  • Optionally, to further distinguish these levels, you can apply different styles:
    • level 1 headers - # UPPERCASE
    • level 2 headers - ## Title Case
    • level 3 headers - ### Sentence case
  • Try to avoid the use of more than three header levels or too many headers overall, as this can make the code look cluttered. For your reference, see the example file below:
Example Function File
BP/functions/wiki/ability/fire_trail.mcfunction
yaml
# ON PLAYER ITEM DROP

## Give Effects
### Fire resistance
execute at @e[type=item,name="Fire Trail Ability"] run effect @p[r=3] fire_resistance 10 255
### Speed
execute at @e[type=item,name="Fire Trail Ability"] run effect @p[r=3] speed 10 1 true

## Add Particle Time (10s)
execute at @e[type=item,name="Fire Trail Ability"] run scoreboard players set @p[r=3] abilities.fire_trail 200

## Delete Item
kill @e[type=item,name="Fire Trail Ability"]


# ENTITY TIMER

## Emit Particle Trail
execute at @a[scores={wiki:ability.fire_trail=1..}] run particle minecraft:basic_flame_particle ~~~

## Countdown Timer
scoreboard players remove @a [scores={wiki:ability.fire_trail=1..}] wiki:ability.fire_trail 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Note the use of two lines of spacing before level 1 headers and one line of spacing before level 2 headers for improved readability.

This practice helps create a consistent format, making it easier for everyone to follow, and maintain uniformity across your functions.

Scoreboard Objectives & Tags ​

  • Must begin with a namespace and use snake_case.
    • This prevents conflicts with packs using identical tags or objectives.
  • Only use lowercase letters (a–z), underscores (_), and dots (.) as special characters.

Example Objectives:

  • wiki:blocks_travelled.overworld
  • wiki:q.is_sneaking
  • wiki:q.is_armed_any

Example Tags:

  • wiki:inventory.full
  • wiki:inventory.empty
  • wiki:is_flying

NOTE:

Tags describe a definite state—if a tag exists, its condition is true. This is why Molang queries represented as tags in a similar manner do not use the q. prefix.

Score Holders ​

  • Must be prefixed with either a dot (.) or hashtag (#) and use PascalCase.
    • This prevents conflicts with gamertags using identical names and provides a clear visual distinction since score holders are used closely with objectives.
    • A prefix is used instead of a namespace to keep it concise, as the namespaced objective already prevents conflicts with other packs.
  • No special characters other than dots (.).

Examples:

  • .Ores.Iron
  • .Ores.DeepslateIron
  • .200

TIP:

Score holders prefixed with a hashtag (#) will not be displayed on the scoreboard sidebar. However, they must be enclosed in double quotes (" ") to avoid a syntax error.

Group Animations Files when Possible ​

Example:

json
{
    "format_version": "1.8.0",
    "animations": {
        "animation.dragon.sit": {...},
        "animation.dragon.fly": {...},
        "animation.dragon.roar": {...},
  }
}
1
2
3
4
5
6
7
8

Split Textures by Path, Not Name ​

✔️ textures/dragon/red

❌ textures/dragon_red_skin

✔️ textures/npc/dragon_hunter/archer

❌ textures/npc/dragon_hunter_archer

.lang File Comments ​

Comments intended for the localizer should always be in-line, in the following format:

the.key=The string<\t>## Comment, intended for the one localizing.

<\t> represents a tab-character.

Own-line comments can be used for organizational purposes but should not store localization-critical information.

Acronyms when Discussing ​

AcronymConcept
BPBehavior Pack
RPResource Pack
FPFunction Pack
VRPVanilla Resource Pack
VBPVanilla Behavior Pack
ACAnimation Controller
RPACResource Pack Animation Controller
BPACBehavior Pack Animation Controller
BBBlockbench
BDSBedrock Dedicated Server
FPVFirst Person View
RDRender Dragon
SPSkin Pack
VSCodeVisual Studio Code

Definition Format Orders ​

Blocks, entities and items should follow the format order below.

Blocks ​

  • format_version
  • minecraft:block
    • description
      • identifier
      • menu_category
        • category
        • group
      • states
      • traits
    • components
    • permutations
      • condition
      • components

Entities ​

  • format_version
  • minecraft:entity
    • description
      • identifier
      • spawn_category
      • is_spawnable
      • is_summonable
      • properties
    • component_groups
    • components
    • events

Items ​

  • format_version
  • minecraft:item
    • description
      • identifier
      • menu_category
        • category
        • group
    • components

Custom Components ​

Variable Names ​

PascalCase should be used with Block or Item as a prefix and Component as a suffix. As an example, const BlockMeltableComponent = { ... } rather than const meltable = { ... }.

This helps to differentiate what we're using in registerCustomComponent and what we're using as values elsewhere.

Contributors

Edit Style Guide on GitHub

Bedrock Wiki by Bedrock OSS

"Minecraft" is a trademark of Mojang AB.

Bedrock OSS, Bedrock Wiki and bedrock.dev are not affiliated in any way with Microsoft or Mojang AB.

  • Privacy Policy
  • Join our Discord
  • Learn how to Contribute
  • Visit our Repository