-
Notifications
You must be signed in to change notification settings - Fork 0
Functions
Functions are used to provide data in an item. Data in question can be the enchantment, data value, the number of items that can be dropped together, etc.
Used by: Various Structures
Similar to:enchant_random_gear
Set random enchantment to item. The item must be enchantable.
Optional Parameter:
Name | Type | Description |
---|---|---|
treasure | Boolean | Set treasure enchantment to apply See the list here |
Used by: Various Entity Equipments
Similar to:enchant_randomly
Set a chance for an item to be randomly enchanted. The item must be enchantable.
Parameter:
Name | Type | Description |
---|---|---|
chance | Float | Set a chance Allow number from 0-1 as 0% - 100% |
Used by: Various Structures (mostly End City)
Set a specific enchantment level (similar mechanics with Enchanting Table and Bookshelf) for the item.
Parameters:
Name | Type | Description |
---|---|---|
level | Integer | Set enchantment level Max possible number is 30 Use min/max parameters to define as a range |
treasure | Boolean | Set treasure enchantment to appear See the list here |
Used by: Shipwreck and Underwater Ruin
Set destination/target location for exploration map.
Parameter:
Name | Type | Description |
---|---|---|
destination | String | Set destination/target location See the list here |
Used by: Various Entities
Set cooked items to be dropped when the entity is on fire. Possibly item is food items
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
}
Used by: Various Entities
Set additional drop for the items when killed using Looting Enchantment.
Following formula: normalDrop + (lootingDrop * lootingLevel)
Parameters:
Name | Type | Description |
---|---|---|
count | Integer | Set the number to item been dropped when using Looting Use min/max parameter to define as a range |
limit | Integer | Set the max number to item been dropped when using Looting |
Used by: Shipwreck
Set the random data values to the items.
Parameter:
Name | Type | Description |
---|---|---|
values | JSON Object | Set the values for min/max data value Use min/max parameter to define as a range |
Used by: Pillager Captain
Set banner detail/type. Only used by Pillager/Vindicator Captain that holds Illager Banner.
Parameter:
Name | Type | Description |
---|---|---|
type | Integer | Set the banner type |
Used by: Various Structure and Entities
Set the number of items to be dropped. If you didn't define the value or didn't use this function, the item ALWAYS drops 1.
Parameter:
Name | Type | Description |
---|---|---|
count | Integer | Set the number to item been dropped Use min/max parameter to define as a range |
Used by: Various Structure, Entities, and Gameplay
Set how much damage to the item. The item must have durability value (Tools).
Parameter:
Name | Type | Description |
---|---|---|
damage | Integer | Set how much damage to the item Use min/max parameter to define as a range |
Used by: Various Structure and Entities
Set the data value of the item.
Parameter:
Name | Type | Description |
---|---|---|
data | Integer | Set the data value of the item |
Used by: Mooshroom and Sheep
[Sorry, no documentation yet]
These are lists of treasure enchantment.
- Curse of Binding
- Curse of Vanishing
- Frost Walker
- Mending
- Soul Speed
See Summary of enchantments from Minecraft Wiki for detailed enchantment
These are lists of available destinations. Note: The list that is given a proven checklist can be used
- Buried Treasure [
burriedTreasure
] - Mansion [
mansion
] - Monument [
monument
] - Mineshaft [
mineshaft
] - Fortress [
fortress
] - Underwater Ruins [
ruins
] - Stronghold [
stronghold
] - Village [
village
] - End City [
endcity
] - Shipwreck [
shipwreck
] - Pillager Outpust [
pillageroutpost
]
This is pure my documentation, so any mistake is my fault :)
Reference Link:
Bedrock Wiki
Microsoft Docs
Not affiliated with Mojang Studio or Microsoft