Skip to content

Migrate fluid placer and unify bucket usage#91

Merged
ErrorCraft merged 4 commits into
0.6.0-preview.2+1.21.5from
migrate-fluid-placer
May 26, 2026
Merged

Migrate fluid placer and unify bucket usage#91
ErrorCraft merged 4 commits into
0.6.0-preview.2+1.21.5from
migrate-fluid-placer

Conversation

@ErrorCraft
Copy link
Copy Markdown
Owner

@ErrorCraft ErrorCraft commented May 26, 2026

Item Behaviour Components

minecraft:bucket

  • Unified block and fluid placement for buckets.
  • The fluid, block and transforms_into fields have been replaced with world modifications in the new modification field.
    • This means that the previously hardcoded behaviour of the minecraft:empty fluid draining a fluid instead has been removed.
Previously set field World modification
Fluid minecraft:empty minecraft:drain_fluid
Any other fluid minecraft:place_fluid with the specified fluid
Any block minecraft:place_block with the specified block
  • Moved the placed entity up a level by only specifying the entity type.
    • This means that the optional require_other_successful_placement field has been removed and now always requires a successful placement.
    • The field itself is still optional.

So if you had this:

{
  "minecraft:bucket": {
    "emptying_sound_event": "minecraft:item.bucket.empty_fish",
    "entity": {
      "entity": "minecraft:pufferfish",
      "require_other_successful_placement": true
    },
    "fluid": "minecraft:water",
    "transforms_into": "minecraft:bucket"
  }
}

You now have to use this instead:

{
  "minecraft:bucket": {
    "entity": "minecraft:pufferfish",
    "modification": {
      "type": "minecraft:place_fluid",
      "fluid": "minecraft:water",
      "place_sound": "minecraft:item.bucket.empty_fish",
      "transforms_into": "minecraft:bucket"
    }
  }
}

Actions

minecraft:place_block

  • Removed the decrement_count field.
    • This should be replaced by a sequence with a minecraft:decrement_item action.

So if you had this:

{
  "type": "minecraft:place_block",
  "block": "minecraft:fire",
  "decrement_count": true,
  "position": "interacted"
}

You now have to use this instead:

{
  "type": "minecraft:sequence",
  "handler": "minecraft:passing",
  "entries": [
    {
      "type": "minecraft:place_block",
      "block": "minecraft:fire",
      "position": "interacted"
    },
    {
      "type": "minecraft:decrement_item",
      "amount": 1
    }
  ]
}
  • Added an optional place_sound field.
    • When specified, this sound will be played instead of the normal block place sound.

World Modifications

Can modify the world by adding or removing something from it.

minecraft:drain_fluid

  • Drains a fluid from the world.
  • Has no additional fields.
  • Leaves an item stack specified by the drained fluid.

minecraft:place_fluid

  • Places a fluid in the world.
  • Fields:
    • fluid: A fluid. The fluid to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

minecraft:place_block

  • Places a block in the world.
  • Fields:
    • block: A block picker. The block to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

Fixes

  • Exchanging item stacks now works correctly again by dropping the exchanged item stack instead of the current item stack.

@ErrorCraft ErrorCraft merged commit ce776fd into 0.6.0-preview.2+1.21.5 May 26, 2026
2 of 3 checks passed
@ErrorCraft ErrorCraft deleted the migrate-fluid-placer branch May 26, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant