User Tools

Site Tools


items:item_components:bucket

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
items:item_components:bucket [2024/04/19 13:27] – removed - external edit (Unknown date) 127.0.0.1items:item_components:bucket [2024/05/14 22:46] (current) – fix link to entity initializers errorcraft
Line 1: Line 1:
 +====== minecraft:bucket ======
 +The ''minecraft:bucket'' item component allows the player to place or drain a [[mc>Fluid|fluid]], or place an [[mc>Entity|entity]] or [[mc>Block|block]], or any combination of them.
  
 +
 +===== Fields =====
 +^  Name  ^  Description  ^  Type  ^  Default Value  ^
 +| ''fluid'' | The fluid to place. Note that ''minecraft:empty'' tries to drain a fluid instead. | An optional [[mc>Fluid|fluid]] | |
 +| ''entity'' | The entity to spawn. | An optional [[#entity_target|entity target]] | |
 +| ''block'' | The block to place. | An optional [[blocks:block_pickers:start|block picker]] | |
 +| ''emptying_sound_event'' | The sound event to play when placing a fluid. | An optional [[mc>Sounds.json#Sound_events|sound event]] | |
 +| ''transforms_into'' | The item to transform into once used. | An optional item | |
 +
 +
 +===== Example =====
 +<code javascript>
 +{
 +  "fluid": "minecraft:water",
 +  "emptying_sound_event": "minecraft:item.bucket.empty",
 +  "transforms_into": "minecraft:bucket"
 +}
 +</code>
 +
 +
 +===== Entity Target =====
 +May spawn an entity depending on the previous placement result.
 +
 +
 +==== Fields ====
 +^  Name  ^  Description  ^  Type  ^  Default Value  ^
 +| ''entity'' | The entity to spawn. | An [[entities:entity_initializers:|entity initializer]] | |
 +| ''require_other_successful_placement'' | Whether to require a successful fluid or block placement before placing an entity. | An optional boolean | ''false'' |
 +
 +
 +==== Example ====
 +<code javascript>
 +{
 +  "entity": {
 +    "type": "minecraft:salmon"
 +  },
 +  "require_other_successful_placement": true
 +}
 +</code>