Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.07 KB

File metadata and controls

42 lines (31 loc) · 1.07 KB
author ms.author title description ms.service
JimSeaman42
mikeam
Entity Documentation - minecraft:barter
A reference document detailing the 'barter' entity component
minecraft-bedrock-edition

Entity Documentation - minecraft:barter

minecraft:barter compels the entity to drop an item as a barter exchange.

Parameters

Name Default Value Type Description
barter_table not set String Loot table used to drop a random item
cooldown_after_being_attacked 0 Integer Duration, in seconds, when the entity won't barter items if it was hurt

Example

"minecraft:barter":{
    "barter_table": "loot_tables/entities/custom_villager_barter.json",
    "cooldown_after_being_attacked": 5
}

Vanilla entities examples

piglin

"minecraft:barter": {
    "barter_table": "loot_tables/entities/piglin_barter.json",
    "cooldown_after_being_attacked": 20
},

Vanilla entities using minecraft:barter