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 Effects
      Scripts
    • Avoiding State Limit
    • Block Orientation
    • Fake Blocks
      Scripts
    • Intercardinal Orientation
      Scripts
    • Ore Loot Tables
      Scripts
    • Tool-Based Destruction
  • Vanilla Re-Creations
    • Custom Crops
      Scripts
    • Custom Glass
    • Custom Glazed Terracotta
    • Custom Heads
      Scripts
    • Custom Trapdoors
      Scripts
  • Documentation
    • Block Format History
    • Block Shapes
    • Block Sounds
    • Redstone Components
    • Vanilla Block Models
    • Vanilla Block Tags
    • Vanilla Voxel Shapes
Commands
  • General
    • Intro to Command Blocks
    • Understanding Selectors
    • Functions
      guide
    • Block States
    • Coordinate System
    • Giving NBT Items
    • Scoreboard Operations
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On First World Load
      function
    • On Player First Join
    • On Player Join
    • On Player Leave
    • On Player Death
    • On Player Respawn
  • Scoreboard Systems
    • Entity Counter
    • Scoreboard Timers
    • Comparing And Retrieving Scores
  • Detection Systems
    • Look Detection
    • Item Drop Detection
    • Movement Detections
    • Rain Detection
  • Techniques
    • Execute Logic Gates
      concept
    • Execute at Block Variant
    • Execution Forking
      concept
    • Binary in Commands
      concept
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Dynamic Displays
    • Orbital Camera
  • Useful Creations
    • Sphere Command
    • Compass Display
    • Custom Crafting
    • Multiplayer Position Rearrangement
      function
Concepts
  • contents.json
  • Molang
  • Namespaces
  • Overwriting Assets
  • Shaders
  • Sounds
  • Subpacks
  • Texture Atlases
  • textures_list.json
Documentation
  • Advanced Molang
  • File Types
  • Fog IDs
  • Material Configuration Description
  • Molang Queries
  • Pack Folder Structure
  • Shared Constructs
  • Sound Definitions
  • Vanilla Materials
Entities
  • General
    • Intro to Entities BP
      guide
    • Intro to Entities RP
      guide
    • Troubleshooting Entities
      help
    • Entity Events
    • Entity Properties
    • NPC Dialogue
    • Render Controllers
    • Spawn Rules
  • Tutorials
    • Area Effect Clouds
    • Coordinate Space Conversion
    • Creating Boats
    • Detecting Other Entities
    • Disabling Team Damage
    • Dummy Entities
    • Entity Attacks
    • Entity Movement
    • Entity Timers
    • Holding Items
    • Invulnerable Entities
    • Look at Entity
    • Riding Flying Entities
    • 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
    • Item Catalog
    • Troubleshooting Items
      help
  • Tutorials
    • Custom Armor
    • Custom Food
      Scripts
    • Custom Pottery Sherds
    • Custom Weapons
    • Equipment-Based Commands
    • Spawning Items
    • Throwable Items
  • Documentation
    • Enchantments
    • Attachables
    • Item Format History
    • Numerical Item IDs
    • Vanilla Item Groups
    • Vanilla Item Tags
    • 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
    • Enabling Experiments by Editing NBT
    • 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
    • Custom Commands
    • GameTests
    • Script Core Features
    • Script Privileges
    • Script Requests API
    • Server Forms
  • Documentation
    • Engine Environment
    • Script Resources
    • Script Watchdog
    • Troubleshooting JavaScript
    • TypeScript
Servers
  • Software
    • Bedrock Server Software
  • Protocols
    • Bedrock Protocol
    • NetherNet Protocol
    • RakNet Protocol
Text & Localization
  • General
    • Intro to Text & Localization
    • Raw Text
    • Splashes
  • Emojis & Symbols
    • Fonts
    • Intro to Emojis
    • Custom Emojis
    • Input Keys
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
    • Jigsaw Structures
  • Tutorials
    • Block Conditions for Features
    • Generating Custom Ores
    • Generating Custom Structures
    • Generating Patches
    • Heightmap Noise
  • Documentation
    • Biome Tags

Custom Armor

Custom Armor
  • Armor Textures
  • Custom Helmet
    • Item JSON
    • Attachable JSON
    • Item Name
  • Custom Chestplate
    • Item JSON
    • Attachable JSON
    • Item Name
  • Custom Leggings
    • Item JSON
    • Attachable JSON
    • Item Name
  • Custom Boots
    • Item JSON
    • Attachable JSON
    • Item Name
  • Result
  • Bonus - Making Set Effects
Download Example
Download as ZIP Download as MCADDON

FORMAT VERSION 1.26.10

This page assumes a basic understanding of custom items and attachables. Check out the items guide before starting!

Making custom armors is surprisingly easy to do, although you need to do a bit of fiddling around as there are a few files that need to be added and there can be a little bit of texturing involved.

Armor Textures ​

Each set of custom armor will need four textures for item icons, as well as three separate textures that will be applied to the armor model when worn.

The first armor model texture (named custom_1.png here) is applied to the helmet, chestplate and boots whereas the second texture (named custom_2.png here) is applied to the leggings.

RP/textures/wiki/items/custom_helmet.png
RP/textures/wiki/items/custom_chestplate.png
RP/textures/wiki/items/custom_leggings.png
RP/textures/wiki/items/custom_boots.png
RP/textures/wiki/models/armor/custom_baby.png
RP/textures/wiki/models/armor/custom_1.png
RP/textures/wiki/models/armor/custom_2.png

You'll also need to add each item icon to the items texture atlas using the item_texture.json file:

RP/textures/item_texture.json
json
{
    "texture_data": {
        "wiki:custom_helmet": {
            "textures": "textures/wiki/items/custom_helmet"
        },
        "wiki:custom_chestplate": {
            "textures": "textures/wiki/items/custom_chestplate"
        },
        "wiki:custom_leggings": {
            "textures": "textures/wiki/items/custom_leggings"
        },
        "wiki:custom_boots": {
            "textures": "textures/wiki/items/custom_boots"
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Custom Helmet ​

Item JSON ​

BP/items/custom_helmet.json
json
{
    "format_version": "1.26.10",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_helmet",
            // Places the item into the "Helmets" group in the creative menu
            "menu_category": {
                "category": "equipment",
                "group": "minecraft:itemGroup.name.helmet"
            }
        },
        "components": {
            // Defines the texture from "item_texture.json" that will be displayed as the item's 2D icon
            "minecraft:icon": "wiki:custom_helmet",
            // Prevents the item from stacking with itself like vanilla armor
            "minecraft:max_stack_size": 1,
            // Allows the armor to receive enchantments specific to its type
            "minecraft:enchantable": {
                "slot": "armor_head",
                "value": 10
            },
            // Allows the item to be worn in the head slot, displaying the attachable defined in the RP
            "minecraft:wearable": {
                "slot": "slot.armor.head",
                "protection": 3
            },
            // Allows the item to take damage when worn
            "minecraft:durability": {
                "damage_chance": {
                    "min": 60,
                    "max": 100
                },
                "max_durability": 363
            },
            // Allows the item to be repaired after it has taken damage
            "minecraft:repairable": {
                "repair_items": [
                    {
                        "items": ["minecraft:stick"], // The items that can be used to repair this item
                        "repair_amount": "q.max_durability * 0.25" // Increases the durability by 25%
                    }
                ]
            },
            "minecraft:tags": {
                "tags": [
                    "minecraft:is_armor",
                    "minecraft:trimmable_armors" // Allows the armor to be trimmed in a Smithing Table
                ]
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Attachable JSON ​

At this point your item would appear in-game and would be wearable but it would not have any appearance on the player's model.

This appearance can be achieved by using a feature known as attachables, which visually attach themselves to another entity based on its equipment. To start with, you'll need to create an attachables folder in your resource pack (you may already have one).

The attachable samples in this guide are largely based on the vanilla armor attachables, which have support for armor trims, enchantment glint and dedicated models for baby mobs.

RP/attachables/custom_helmet.json
json
{
    "format_version": "1.8.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "wiki:custom_helmet",
            "materials": {
                "default": "armor",
                "enchanted": "armor_enchanted"
            },
            "textures": {
                "default": "textures/wiki/models/armor/custom_1",
                "enchanted": "textures/misc/enchanted_actor_glint",
                "baby": "textures/wiki/models/armor/custom_baby"
            },
            "geometry": {
                "default": "geometry.humanoid.armor.helmet",
                "baby": "geometry.humanoid.baby.armor.helmet"
            },
            "scripts": {
                // Prevents parts of the player's skin from sticking through the armor
                "parent_setup": "v.helmet_layer_visible = false;",
                "pre_animation": [
                    // Variable used by the render controller to determine whether the "baby" geometry and texture should be used
                    "v.use_baby_geo = q.is_baby && c.owning_entity->v.use_dedicated_baby_armor;"
                ]
            },
            "render_controllers": ["controller.render.armor.v2"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Item Name ​

Finally, let's define the name of our item by adding a translation in the resource pack in the form item.<identifier>=<name>.

RP/texts/en_US.lang
lang
item.wiki:custom_helmet=Custom Helmet
1

If you now go into the game and check what you have produced you should be able to wear your helmet and pat yourself on the back for a job well done.

Custom Chestplate ​

Item JSON ​

BP/items/custom_chestplate.json
json
{
    "format_version": "1.26.10",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_chestplate",
            // Places the item into the "Chestplates" group in the creative menu
            "menu_category": {
                "category": "equipment",
                "group": "minecraft:itemGroup.name.chestplate"
            }
        },
        "components": {
            // Defines the texture from "item_texture.json" that will be displayed as the item's 2D icon
            "minecraft:icon": "wiki:custom_chestplate",
            // Prevents the item from stacking with itself like vanilla armor
            "minecraft:max_stack_size": 1,
            // Allows the armor to receive enchantments specific to its type
            "minecraft:enchantable": {
                "slot": "armor_torso",
                "value": 10
            },
            // Allows the item to be worn in the chest slot, displaying the attachable defined in the RP
            "minecraft:wearable": {
                "slot": "slot.armor.chest",
                "protection": 8
            },
            // Allows the item to take damage when worn
            "minecraft:durability": {
                "damage_chance": {
                    "min": 60,
                    "max": 100
                },
                "max_durability": 528
            },
            // Allows the item to be repaired after it has taken damage
            "minecraft:repairable": {
                "repair_items": [
                    {
                        "items": ["minecraft:stick"], // The items that can be used to repair this item
                        "repair_amount": "q.max_durability * 0.25" // Increases the durability by 25%
                    }
                ]
            },
            "minecraft:tags": {
                "tags": [
                    "minecraft:is_armor",
                    "minecraft:trimmable_armors" // Allows the armor to be trimmed in a Smithing Table
                ]
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Attachable JSON ​

RP/attachables/custom_chestplate.json
json
{
    "format_version": "1.8.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "wiki:custom_chestplate",
            "materials": {
                "default": "armor",
                "enchanted": "armor_enchanted"
            },
            "textures": {
                "default": "textures/wiki/models/armor/custom_1",
                "enchanted": "textures/misc/enchanted_actor_glint",
                "baby": "textures/wiki/models/armor/custom_baby"
            },
            "geometry": {
                "default": "geometry.humanoid.armor.chestplate",
                "baby": "geometry.humanoid.baby.armor.chestplate"
            },
            "scripts": {
                // Prevents parts of the player's skin from sticking through the armor
                "parent_setup": "v.chest_layer_visible = false;",
                "pre_animation": [
                    // Variable used by the render controller to determine whether the "baby" geometry and texture should be used
                    "v.use_baby_geo = q.is_baby && c.owning_entity->v.use_dedicated_baby_armor;"
                ]
            },
            "render_controllers": ["controller.render.armor.v2"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Item Name ​

RP/texts/en_US.lang
lang
item.wiki:custom_chestplate=Custom Chestplate
1

Custom Leggings ​

Item JSON ​

BP/items/custom_leggings.json
json
{
    "format_version": "1.26.10",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_leggings",
            // Places the item into the "Leggings" group in the creative menu
            "menu_category": {
                "category": "equipment",
                "group": "minecraft:itemGroup.name.leggings"
            }
        },
        "components": {
            // Defines the texture from "item_texture.json" that will be displayed as the item's 2D icon
            "minecraft:icon": "wiki:custom_leggings",
            // Prevents the item from stacking with itself like vanilla armor
            "minecraft:max_stack_size": 1,
            // Allows the armor to receive enchantments specific to its type
            "minecraft:enchantable": {
                "slot": "armor_legs",
                "value": 10
            },
            // Allows the item to be worn in the legs slot, displaying the attachable defined in the RP
            "minecraft:wearable": {
                "slot": "slot.armor.legs",
                "protection": 6
            },
            // Allows the item to take damage when worn
            "minecraft:durability": {
                "damage_chance": {
                    "min": 60,
                    "max": 100
                },
                "max_durability": 495
            },
            // Allows the item to be repaired after it has taken damage
            "minecraft:repairable": {
                "repair_items": [
                    {
                        "items": ["minecraft:stick"], // The items that can be used to repair this item
                        "repair_amount": "q.max_durability * 0.25" // Increases the durability by 25%
                    }
                ]
            },
            "minecraft:tags": {
                "tags": [
                    "minecraft:is_armor",
                    "minecraft:trimmable_armors" // Allows the armor to be trimmed in a Smithing Table
                ]
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Attachable JSON ​

RP/attachables/custom_leggings.json
json
{
    "format_version": "1.8.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "wiki:custom_leggings",
            "materials": {
                "default": "armor",
                "enchanted": "armor_enchanted"
            },
            "textures": {
                "default": "textures/wiki/models/armor/custom_2",
                "enchanted": "textures/misc/enchanted_actor_glint",
                "baby": "textures/wiki/models/armor/custom_baby"
            },
            "geometry": {
                "default": "geometry.humanoid.armor.leggings",
                "baby": "geometry.humanoid.baby.armor.leggings"
            },
            "scripts": {
                // Prevents parts of the player's skin from sticking through the armor
                "parent_setup": "v.leg_layer_visible = false;",
                "pre_animation": [
                    // Variable used by the render controller to determine whether the "baby" geometry and texture should be used
                    "v.use_baby_geo = q.is_baby && c.owning_entity->v.use_dedicated_baby_armor;"
                ]
            },
            "render_controllers": ["controller.render.armor.v2"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Item Name ​

RP/texts/en_US.lang
lang
item.wiki:custom_leggings=Custom Leggings
1

Custom Boots ​

Item JSON ​

BP/items/custom_boots.json
json
{
    "format_version": "1.26.10",
    "minecraft:item": {
        "description": {
            "identifier": "wiki:custom_boots",
            // Places the item into the "Boots" group in the creative menu
            "menu_category": {
                "category": "equipment",
                "group": "minecraft:itemGroup.name.boots"
            }
        },
        "components": {
            // Defines the texture from "item_texture.json" that will be displayed as the item's 2D icon
            "minecraft:icon": "wiki:custom_boots",
            // Prevents the item from stacking with itself like vanilla armor
            "minecraft:max_stack_size": 1,
            // Allows the armor to receive enchantments specific to its type
            "minecraft:enchantable": {
                "slot": "armor_feet",
                "value": 10
            },
            // Allows the item to be worn in the feet slot, displaying the attachable defined in the RP
            "minecraft:wearable": {
                "slot": "slot.armor.feet",
                "protection": 3
            },
            // Allows the item to take damage when worn
            "minecraft:durability": {
                "damage_chance": {
                    "min": 60,
                    "max": 100
                },
                "max_durability": 429
            },
            // Allows the item to be repaired after it has taken damage
            "minecraft:repairable": {
                "repair_items": [
                    {
                        "items": ["minecraft:stick"], // The items that can be used to repair this item
                        "repair_amount": "q.max_durability * 0.25" // Increases the durability by 25%
                    }
                ]
            },
            "minecraft:tags": {
                "tags": [
                    "minecraft:is_armor",
                    "minecraft:trimmable_armors" // Allows the armor to be trimmed in a Smithing Table
                ]
            }
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Attachable JSON ​

RP/attachables/custom_boots.json
json
{
    "format_version": "1.8.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "wiki:custom_boots",
            "materials": {
                "default": "armor",
                "enchanted": "armor_enchanted"
            },
            "textures": {
                "default": "textures/wiki/models/armor/custom_1",
                "enchanted": "textures/misc/enchanted_actor_glint",
                "baby": "textures/wiki/models/armor/custom_baby"
            },
            "geometry": {
                "default": "geometry.humanoid.armor.boots",
                "baby": "geometry.humanoid.baby.armor.boots"
            },
            "scripts": {
                // Prevents parts of the player's skin from sticking through the armor
                "parent_setup": "v.boot_layer_visible = false;",
                "pre_animation": [
                    // Variable used by the render controller to determine whether the "baby" geometry and texture should be used
                    "v.use_baby_geo = q.is_baby && c.owning_entity->v.use_dedicated_baby_armor;"
                ]
            },
            "render_controllers": ["controller.render.armor.v2"]
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Item Name ​

RP/texts/en_US.lang
lang
item.wiki:custom_boots=Custom Boots
1

Result ​

That's it, you now have a whole suit of custom armor to swagger around in! You can use this as a basis to make whatever other armor you want in the game.

An armor stand and a baby zombie both equipped with a full set of custom armor.

Bonus - Making Set Effects ​

This is a bit more advanced but lets say you want your custom armor to act like it's a set from an RPG game. We can add some code to check if we have the set equipped and do some great stuff with it.

Note that for effects you can use tick.json and functions with hasitem selector argument to avoid using player.json.

In this example we will just add a chance to teleport the attacker somewhere nearby and put a blurb on the console for flavour.

As we want this to trigger when the player is hit we need to add some logic to the player.json file. This is a huge file and we unfortunately need to make sure it has all the default content in there as well due to the way it will overwrite the default player components etc.

So rather than include the whole player.json I will just include the parts you will need to add to your components and events sections. If you have no idea what the player.json is then look in the vanilla behavior pack and look for it and just copy it over into your project.

So first of all lets put in the damage sensor component (which goes in your component section) which listens for when you take damage and lets you raise an event from it.

BP/entities/player.json#components
json
"minecraft:damage_sensor": {
    "triggers": {
        "on_damage": {
            "filters": {
                "all_of": [
                    {
                        "test": "has_equipment",
                        "subject": "self",
                        // Domain is the body part in this case
                        "domain": "head",
                        "operator": "==",
                        // The item identifier we want to check
                        "value": "wiki:custom_helm"
                    },
                    {
                        "test": "has_equipment",
                        "subject": "self",
                        "domain": "torso",
                        "operator": "==",
                        // Worth noting you can omit prefix for minecraft internal items i.e stick
                        "value": "wiki:custom_chest"
                    },
                    {
                        "test": "has_equipment",
                        "subject": "self",
                        "domain": "leg",
                        "operator": "==",
                        "value": "wiki:custom_leggings"
                    },
                    {
                        "test": "has_equipment",
                        "subject": "self",
                        "domain": "feet",
                        "operator": "==",
                        "value": "wiki:custom_boots"
                    }
                ]
            },
            // If all the triggers match in the filter raise the event
            "event": "wiki:armor_sets.custom.taken_damage"
        },
        // This means if it matches the check it still applies damage
        // Can be good to ignore team damage or similar scenarios
        "deals_damage": true
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

As you can see from the comments, there is a lot there but really all we are doing is listening out for something then making sure we only filter the results we care about then relay on an event.

The event can be called anything but it is often better to have it more specific, in case you end up having multiple similar events etc., also it can help finding if you have multiple sections to it, i.e. I could search for "armour_sets" and find all events related to it. Then once you are done, in the same file we decide what we want to do with the event, which we put into our events section.

BP/entities/player.json#events
json
"wiki:armor_sets.my_custom.taken_damage": {
    "randomize": [
        {
            "weight": 1,
            // We do a sequence here as we want to apply one command on one entity and the other on ourselves
            "sequence": [
                {
                    // This will take the attacker/other because it was in context at time of raising the event in the damage_sensor
                    "queue_command": {
                        // Teleport the entity away from us
                        "command": "spreadplayers ~~ 5 20 @s",
                        // Run the command on the attacker not us
                        "target": "other"
                    }
                },
                {
                    "queue_command": {
                        "command": "tellraw @s { \"rawtext\": [{ \"text\": \"§aYour armor glows and the enemy vanishes\" }] }"
                    }
                }
            ]
        },
        {
            // Dummy weighting so it happens semi frequently
            "weight": 20
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

Thats it, you can rejig the bits how you see fit but ultimately you have all the pieces to apply effects to armor and check for if you have the whole set applied or check for other equipment.

You can also change the equipment checks from self to other and check if whoever is attacking you has something equipped or even check if you are attacking a sort of block/entity and do different effects based on that. We haven't touched on that directly here but there is a good enough starting point to get you on your way and let you be creative with things.

Contributors

Edit Custom Armor on GitHub

Text and image content on this page is licensed under the Creative Commons Attribution 4.0 International License

Code samples on this page are licensed under the MIT License

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