Minecraft Bedrock /replaceitem Command

Bedrock commands

Replaces items in the inventory.

  • operator and command block
  • cheats are needed
  • Bedrock 1.26.50.4
My Game select version

Save your preferences in this browser and apply them to supported tools. Settings in a shared link take priority. Wiki version labels are not affected.

On this page 6 sections

At a glance

Syntax and parameters — below

Replaces items in the inventory. Requires enabled cheats.

How to record?

  • /replaceitem block <position> slot.container <slotId> <itemName> [amount] [data] [components]
  • /replaceitem entity <target> <slotType> <slotId> <itemName> [amount] [data] [components]
  • /replaceitem block <position> slot.container <slotId> <oldItemHandling> <itemName> [amount] [data] [components]
  • /replaceitem entity <target> <slotType> <slotId> <oldItemHandling> <itemName> [amount] [data] [components]

In angular brackets — what must be written; in square brackets — optional. Words without brackets are written as-is.

Parameters

ParameterWhat to write
positionx, y, z coordinates (can use ~ and ^)
slotIdinteger
itemNameitem ID, for example diamond (total 3411)
amountinteger
datainteger
componentsJSON
targetgoal: username or selector @s, @p, @a, @r, @e
slotTypeone out of 14: slot.weapon.mainhand, slot.weapon.offhand, slot.armor.head, slot.armor.chest, slot.armor.legs, slot.armor.feet, slot.armor.body, slot.hotbar, and others
oldItemHandlingone of: destroy, keep

Who can

WhatValue
The command/replaceitem
Who canoperator and command block
Cheats are requiredyes
Variants of recording4
In Javasuch a command does not exist

Frequently asked questions

What does /replaceitem do in Bedrock?

Replaces items in the inventory.

Why doesn't /replaceitem work?

Commands require cheats: they are enabled in the world settings — after which achievements in this world are no longer awarded. This command can be executed by the world host or a command block.

Commands nearby

Minecraft Bedrock 1.26.50.4 data: commands, parameters, and descriptions — from Mojang's official bedrock-samples repository.