author | ms.author | title | description | ms.service |
---|---|---|---|---|
JimSeaman42 |
mikeam |
Entity Documentation - minecraft:barter |
A reference document detailing the 'barter' entity component |
minecraft-bedrock-edition |
minecraft:barter
compels the entity to drop an item as a barter exchange.
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 |
"minecraft:barter":{
"barter_table": "loot_tables/entities/custom_villager_barter.json",
"cooldown_after_being_attacked": 5
}
"minecraft:barter": {
"barter_table": "loot_tables/entities/piglin_barter.json",
"cooldown_after_being_attacked": 20
},