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
    • Functions
    • Block States
    • Coordinate System
    • Giving NBT Items
    • Scoreboard Operations
    • Understanding Selectors
  • Commands
    • Damage
    • Execute
    • Playanimation
    • Playsound
  • On Event Systems
    • On First World Load
    • 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
  • Techniques
    • Execute Logic Gates
    • Execute at Block Variant
    • MBE - Max's Block Entity
    • FMBE - A New Way to Create Display Entities
    • Item Drop Detection
    • Look Detection
    • Movement Detections
    • Orbital Camera
  • Useful Creations
    • Compass Display
    • Custom Crafter
    • 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
    • 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
    • Introduction to AOE Clouds
    • 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 Forms
    • Script Privileges
    • Script Requests API
  • 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

Item Functions

Item Functions
  • General
    • Count
    • Name
    • Lore
    • Data
    • Block State
    • Aux Value
    • Durability
  • Item-Specific Data
    • Heat Item
    • Book Contents
    • Exploration Map
    • Banner Type
    • Random Dyeing
    • Spawn Eggs
    • Container Contents
    • Potion Type
    • Ominous Bottle Amplifier
    • Suspicous Stew Effect
  • Enchanting
    • Enchant for Trading
    • Level-Based Enchantments
    • Random Enchantments
    • Enchant Gear
    • Specific Enchantments
  • External Factors
    • Held Tool Looting Enchantment
    • Explosion Decay
    • Entity Color
    • Trader Material Type
  • Potion Types
  • Enchantment Types

Item functions modify the nature of an item in loot tables and trade tables.

TODO can enchantments be prefixed with minecraft:/whatever?

Loot Entry
json
{
    "type": "item",
    "name": "minecraft:diamond",
    "weight": 1,
    "functions": [
        {
            "function": "set_count",
            "count": {
                "min": 1,
                "max": 3
            }
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Most of the functions here were tested in trade tables only.

These functions are usable in trade tables and loot tables only.

These functions should be under the functions array.

None accept Molang.

No Java additional functions or properties were successful.

All may be prefixed with any sequence of text followed by a colon, like minecraft:exploration_map or d1245436576u:fio2ejfoijfiowejf::::::exploration_map

General ​

A handful of functions are available for basic item properties. These functions are usable on any item.

FunctionContainer LootBlock DropsFishingEntity DropsEntity EquipmentTrade Tables
set_count✅✅✅✅✅❌
set_name✅✅✅✅✅✅
set_lore✅✅✅✅✅✅
set_data✅✅✅✅✅✅
random_block_state✅✅✅✅✅✅
random_aux_value✅✅✅✅✅✅
set_damage✅✅✅✅✅✅

Count ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table❌

NOTE

Trade tables use the "quantity" property to set their count.

The set_count function sets the count for that item entry.

Count Function
json
{
    "function": "set_count",
    "count": {
        "min": 2,
        "max": 4
    }
}
1
2
3
4
5
6
7

The "count" property determines how many of that item should be yielded; it can either be provided as an integer or a range object. Provided counts values may be larger than the stack size for that item. When this happens, the item will leak into other slots if in a container or separate into multiple different item stacks if dropped into the world. The count property actually defaults to 0, so it should always be included.

Name ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

The name of an item can be set using the set_name function. Names are visible in the user interface when hovering over an item. Names can be changed by players using anvils.

Name Function
json
{
    "function": "set_name",
    "name": "Cursed Bow"
}
1
2
3
4

The name to give the item is given with the string "name" property. By default, name text appears italicized. However, item names support format codes, and §r can be inserted at the start of the text to reset it to non-italics. Raw text is unsupported in item names. \n can be used for newlines.

Lore ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

The set_lore function sets the lore for an item.

Lore Function
json
{
    "function": "set_lore",
    "lore": ["", ""]
}
1
2
3
4

The "lore" property configures the lore. It can be represented as either a string or an array of strings. All lore strings support format codes but do not support localization. In the array form, each string represents a new line of lore. Each such string's formatting context is independent, meaning formatting will reset with each string. By default, purple and italicized text is used for lore; this can be reset by prepending the reset format code (§r) to each string as necessary. \n can be used within any lore string to form a newline while preserving the current formatting context.

Data ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

set_data establishes the data for the given item, similar to the argument in the /give command. If used on a block, it will set the block's data value. If used on an item, it will set it's aux value. Unlike the command, however, set_data cannot set the durability of an item. For that, use durability.

Data Function
json
{
    "function": "set_data",
    "data": 2
}
1
2
3
4

The "data" property sets the item's data. If not provided, it will default to 0. "data" can either be provided as an integer or a range object.

As an integer:

json
"data": 1
1

As a range object:

json
"data": {
	"min": 0,
	"max": 5
}
1
2
3
4

The object form will randomly select a data value inclusively between the provided minimum and maximum each instance this function's item entry is selected.

Block State ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

random_block_state sets an individual block state for a block.

Block State Function
json
{
    "function": "random_block_state",
    "block_state": "wiki:color",
    "values": 3
}
1
2
3
4
5

Sets a block state for a block.

block_state: Required string name of block state.

values: Can be a number or a range object.

Defaults to 0… kinda required otherwise pointless? IDK…

Aux Value ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

random_aux_value

Aux Value Function
json
{
    "function": "random_aux_value",
    "values": {
        "min": 2,
        "max": 4
    }
}
1
2
3
4
5
6
7

Sets the auxiliary value of an item.

values: Can be an integer or a range object.

If using a range object, it will randomly choose the values uniformly(each value has the same chance of being chosen).

Only used for auxiliary value; won't, for example, set damage of a tool but will set color of wool.

It overrides any provided auxiliary value as identifier :suffix, like minecraft:wool:10.

Also works for block data.

Durability ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

Item durability can be set using the set_damage function.

Durability Function
json
{
    "function": "set_damage",
    "damage": {
        "min": 0.5,
        "max": 1
    }
}
1
2
3
4
5
6
7

Sets the damage value of this item.

damage: Can either be a set number or a range object. Allowed values range from 0.0-1.0.

Note that if this item has no durability component, this function will be ignored.

Item-Specific Data ​

Some functions are only usable by a certain set of items. See each function for which items are relevant.

FunctionContainer LootBlock DropsFishingEntity DropsEntity EquipmentTrade Tables
furnace_smelt❌❌❌✅❌❌
set_book_contents✅✅✅✅✅✅
exploration_map✅✅✅✅✅⚠️
set_banner_details✅✅✅✅✅✅
random_dye✅✅✅✅✅✅
set_actor_id✅✅✅✅✅✅
fill_container✅✅✅✅✅✅
set_potion✅✅✅✅✅✅
set_ominous_bottle_amplifier✅✅✅✅✅⚠️
set_stew_effect✅✅✅✅✅✅

Heat Item ​

UsageUsable
Container loot❌
Block drops❌
Fishing❌
Entity drops✅
Entity equipment❌
Trade table❌

furnace_smelt

Heat Item Function
json
{
    "function": "furnace_smelt"
}
1
2
3

Auto-implies that the entity must’ve been on fire when they died. Vanilla files use a function condition for this, but even removing that condition still implies that the entity must’ve died on fire for the furnace_smelt function to trigger.

Book Contents ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

set_book_contents

Book Contents Function
json
{
    "function": "set_book_contents",
    "title": "Wiki Book",
    "author": "Bedrock Wiki",
    "pages": ["Example page number one", "Example page number 2"]
}
1
2
3
4
5
6

Sets the data for a book.

Can only be used on minecraft:writable_book or minecraft:written_book.

author: String name of the author.

title: String name of the book.

pages: Array of strings — each string is the contents of that page.

Supports up to 50 strings and 798 characters per string 12,800‌ character limit across all pages. Use \n in the string (not \\n) to add newlines.

Can’t use tabs.

Can use color codes; Each different page string resets the color codes each time.

Exploration Map ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

exploration_map

Exploration Map Function
json
{
    "function": "exploration_map",
    "destination": "village"
}
1
2
3
4

Trade Table info:

destination:

Currently only monument and mansion are allowed.

Nothing else, not even buried treasure (this one looks like it’ll work — names the map right instead of Unknown Map like the others, but it doesn’t point anywhere). 😦

Loot Table info:

destination:

Works for any /locate location (see old recipe notes for caveats there; this is for container loot tables).

Only works if in the appropriate dimension.

If a mansion or monument, gets named, colored, and icon’d correctly, corresponding to the right marker decoration.

If invalid or no destination is given, shows no marker but still has the river and ocean lines on the map.

Works in both containers and entity equipment and drops.

Keep in mind how only 2 locations worked from traders.

Banner Type ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

set_banner_details

Banner Type Function
json
{
    "function": "set_banner_details",
    "type": 1 // Ominous Banner
}
1
2
3
4

Sets type of a minecraft:banner or the banner on a minecraft:shield (only usable on these).

type: Can only be 0 or 1.

  • 0 is a White Banner.
  • 1 is an Ominous Banner.

base_color: Can be set for banners of type 0 and sets the color of the banner. patterns: Is an array of banner patterns and colors to be applied to the banner. Up to 6 patterns can be applied.

Random Dyeing ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

random_dye

Random Dyeing Function
json
{
    "function": "random_dye"
}
1
2
3

Randomly dyes dyeable items. Such as leather horse armor, leather armor, and wolf armor.

It doesn’t work on wool or other related items.

Spawn Eggs ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

set_actor_id

Spawn Eggs Function
json
{
    "function": "set_actor_id",
    "id": "minecraft:chicken"
}
1
2
3
4

Usable with spawn eggs.

id: The identifier for the mob.

In trade tables, if the id property is omitted, it defaults to the trader's identifier.

Container Contents ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

fill_container

Container Contents Function
json
{
    "function": "fill_container",
    "loot_table": "loot_tables/chests/chest_loot.json"
}
1
2
3
4

Sets the contents of a container item/block. Allows container items such as shulker boxes and bundles to contain loot itself.

loot_table: Path to loot table file from behavior pack root.

The loot_table property is needed or it will just be the normal item. It cannot point to the same loot table the item is in. Works in containers and both entity stuff and blocks

Potion Type ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

set_potion

Potion Type Function
json
{
    "function": "set_potion",
    "id": "poison"
}
1
2
3
4

Sets the potion type of this item. Allowed item types are: minecraft:potion, minecraft:splash_potion, minecraft:lingering_potion, and minecraft:arrow.

id: the name of the potion type. Here is the list of all the Potion Types.

Ominous Bottle Amplifier ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table⚠️ (has not been tested yet)

set_ominous_bottle_amplifier

Ominous Bottle Amplifier Function
json
{
    "function": "set_ominous_bottle_amplifier",
    "amplifier": {
        "min": 0,
        "max": 4
    }
}
1
2
3
4
5
6
7

Sets the minecraft:ominous_bottle potion effect amplifier.

amplifier: can be a set number or a range object. Allowed values are 0-4.

Suspicous Stew Effect ​

UsageUsable
Container loot✅
Block drops✅
Fishing⚠️ (has not been tested yet)
Entity drops✅
Entity equipment⚠️ (has not been tested yet)
Trade table⚠️ (has not been tested yet)

set_ominous_bottle_amplifier

Set Stew Effect Function
json
{
    "function": "minecraft:set_stew_effect",
    "effects": [
        {
            "id": 0 // night vision
        },
        {
            "id": 3 // blindness
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11

Sets the effect of a minecraft:suspicious_stew item.

id can be set to any integer from 0 to 12.

Enchanting ​

These functions control whether an item has an enchantment.

FunctionContainer LootBlock DropsFishingEntity DropsEntity EquipmentTrade Tables
enchant_book_for_trading✅✅✅✅✅✅
enchant_with_levels✅✅✅✅✅✅
enchant_randomly✅✅✅✅✅✅
enchant_random_gear✅✅✅✅✅✅
specific_enchants✅✅✅✅✅✅

Enchant for Trading ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

enchant_book_for_trading

Enchant for Trading Function
json
{
    "function": "enchant_book_for_trading"
}
1
2
3

Documented in trade tables.

Level-Based Enchantments ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

enchant_with_levels enchants items using enchantment table logic, optionally allowing for treasure enchantments.

Level-Based Enchantments Function
json
{
    "function": "enchant_with_levels",
    "levels": {
        "min": 15,
        "max": 21
    },
    "treasure": true
}
1
2
3
4
5
6
7
8

Enchants books as though off an Enchanting Table with the given levels.

Unlike the Enchanting Table, it doesn’t cap at 30, otherwise seems symmetrical.

Level 99999 gives ludicrously powerful books… with pretty much every possible enchantment on them.

treasure: Enables treasure enchantments as possibilities for that item. Boolean, defaults to false. If false, curses can't appear as possibilities; if true, they can.

levels: Can be a number or a range object. Defaults to 0. Can be negative, but will just be remapped as though 0.

Random Enchantments ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

enchant_randomly

Random Enchantments Function
json
{
    "function": "enchant_randomly"
}
1
2
3

Randomly picks a count of enchantments and their strengths for the given item.

treasure:Enables treasure enchantments as possibilities for that item. Boolean, defaults to false.

Enchant Gear ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

enchant_random_gear

Enchant Gear Function
json
{
    "function": "enchant_random_gear",
    "chance": 0.5 // 50% chance of being enchanted
}
1
2
3
4

Randomly picks a count of enchantments and their strengths for the given item.

Pretty much like enchant_randomly, but seemingly no treasure enchantments.

Not working on shears, but does even work on carrot-on-a-stick.

chance: the probability of this item to get an enchanted at all. Allowed values ranges from 0.0-1.0. Defaults to 0. Note that going over 1.0 doesn't make it more "enchanted".

Specific Enchantments ​

UsageUsable
Container loot✅
Block drops✅
Fishing✅
Entity drops✅
Entity equipment✅
Trade table✅

specific_enchants

Specific Enchantments Function
json
{
    "function": "specific_enchants",
    "enchants": [
        {
            "id": "unbreaking",
            "level": [1, 3]
        }
    ]
}
1
2
3
4
5
6
7
8
9

Applies a specific set of enchantments.

enchants:

Can be a string array or object. Here is the list of all Enchantment Types.

For array, any mix of strings or objects (see below).

For string, an enchantment id.

For object:

id: The identifier for the enchantment.

level:

Optional, defaults to 1 Can be an exact number or a 2-valued array, representing min and max, inclusive.

Example:

json
{
    "function": "specific_enchants",
    "enchants": [ 
        "mending",
        {
            "id": "fortune",
            "level": [1, 3]
        }
    ]
}
1
2
3
4
5
6
7
8
9
10

External Factors ​

External conditions that affect item drops.

FunctionContainer LootBlock DropsFishingEntity DropsEntity EquipmentTrade Tables
looting_enchant❌❌❌✅❌❌
explosion_decay❌✅❌❌❌❌
set_data_from_color_index❌❌❌❌❌✅
trader_material_type❌❌❌❌❌✅

Held Tool Looting Enchantment ​

UsageUsable
Container loot❌
Block drops❌
Fishing❌
Entity drops✅
Entity equipment❌
Trade table❌

looting_enchant

Held Tool Looting Function
json
{
    "function": "looting_enchant",
    "count": {
        "min": 0,
        "max": 1
    }
}
1
2
3
4
5
6
7

Increases the number of items dropped based on the Looting Enchantment level used to kill the entity.

Count can be an integer or a range object.

Explosion Decay ​

UsageUsable
Container loot❌
Block drops✅
Fishing❌
Entity drops❌
Entity equipment❌
Trade table❌

explosion_decay

Explosion Decay Function
json
{
    "function": "explosion_decay"
}
1
2
3

By default, always survives. If in an explosion, has a chance of not dropping based on explosion power at that block’s location

Entity Color ​

UsageUsable
Container loot❌
Block drops❌
Fishing❌
Entity drops❌
Entity equipment❌
Trade table✅

set_data_from_color_index

Entity Color Function
json
{
    "function": "set_data_from_color_index"
}
1
2
3

Sets the data value of the block to the value of the minecraft:color component on the entity

Trader Material Type ​

UsageUsable
Container loot❌
Block drops❌
Fishing❌
Entity drops❌
Entity equipment❌
Trade table✅

trader_material_type

Trader Material Type Function
json
{
    "function": "trader_material_type"
}
1
2
3

Only in trades? Maybe it can work somewhere in loot.

Type Identifiers

List of all string values used in functions that use string values such as potion types and enchantments.

WARNING

Some of identifiers might not have been included or might be wrong. Always refer to official documentation, but otherwise some of these are usable.

Potion Types ​

Used by the set_potion function.

  • "water"
  • "mundane"
  • "long_mundane"
  • "awkward"
  • "nightvision"
  • "long_nightvision"
  • "invisibility"
  • "long_invisibility"
  • "leaping"
  • "long_leaping"
  • "strong_leaping"
  • "fire_resistance"
  • "long_fire_resistance"
  • "swiftness"
  • "long_swiftness"
  • "strong_swiftness"
  • "slowness"
  • "long_slowness"
  • "strong_slowness"
  • "water_breathing"
  • "long_water_breathing"
  • "healing"
  • "strong_healing"
  • "harming"
  • "strong_harming"
  • "poison"
  • "long_poison"
  • "strong_poison"
  • "regeneration"
  • "long_regeneration"
  • "strong_regeneration"
  • "strength"
  • "long_strength"
  • "strong_strength"
  • "weakness"
  • "long_weakness"
  • "wither"
  • "turtle_master"
  • "long_turtle_master"
  • "strong_turtle_master"
  • "slow_falling"
  • "long_slow_falling"
  • "wind_charge"
  • "weaving"
  • "oozing"
  • "infested"

Enchantment Types ​

Used by the specific_enchants function.

  • "protection"
  • "fire_protection"
  • "feather_falling"
  • "blast_protection"
  • "projectile_protection"
  • "unbreaking"
  • "mending"
  • "respiration"
  • "depth_strider"
  • "frost_walker"
  • "aqua_affinity"
  • "soul_speed"
  • "swift_sneak"
  • "sharpness"
  • "smite"
  • "bane_of_arthropods"
  • "fire_aspect"
  • "knockback"
  • "looting"
  • "efficiency"
  • "fortune"
  • "silk_touch"
  • "power"
  • "punch"
  • "flame"
  • "infinity"
  • "multishot"
  • "piercing"
  • "quick_charge"
  • "luck_of_the_sea"
  • "lure"
  • "impaling"
  • "riptide"
  • "loyalty"
  • "channeling"
  • "curse_of_binding"
  • "curse_of_vanishing"
  • "density"
  • "breach"
  • "wind_burst"
  • "lunge"

Contributors

Edit Item Functions 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