The minecraft:bucket
item component allows the player to place or drain a fluid, or place an entity or block, or any combination of them.
Name | Description | Type | Default Value |
---|---|---|---|
fluid | The fluid to place. Note that minecraft:empty tries to drain a fluid instead. | An optional fluid | |
entity | The entity to spawn. | An optional entity target | |
block | The block to place. | An optional block picker | |
emptying_sound_event | The sound event to play when placing a fluid. | An optional sound event | |
transforms_into | The item to transform into once used. | An optional item |
{ "fluid": "minecraft:water", "emptying_sound_event": "minecraft:item.bucket.empty", "transforms_into": "minecraft:bucket" }
May spawn an entity depending on the previous placement result.
Name | Description | Type | Default Value |
---|---|---|---|
entity | The entity to spawn. | An entity initializer | |
require_other_successful_placement | Whether to require a successful fluid or block placement before placing an entity. | An optional boolean | false |
{ "entity": { "type": "minecraft:salmon" }, "require_other_successful_placement": true }