How To Use The Item Command In Minecraft Java Edition! Replace Player Items Chest Items!

Video Summary
In this video I show how to use the /item command in Minecraft Java Edition (the newer version of replaceitem) for 1.17+ and explain that it won’t work on Bedrock. I break down the two options—replace and modifier—then demonstrate replacing items in player/entity slots like putting a glass block on my head. I also show how to replace items inside containers like chests by targeting the block and choosing the correct container slot number. Finally, I demonstrate using selectors to replace gear on mobs like zombies, and note that it won’t work on entities without those equipment slots (like creepers).

Formatted Transcript

Hey everyone, it’s UnderMyCap, and welcome back to another video. Today I’m going to show you how to use the /item command. This command was formerly known as /replaceitem. I’ve made a video on this in the past, but that one applies to versions below 1.17.

Please keep in mind that what I’m showing here only works on Minecraft Java Edition. None of this will work on Bedrock Edition. I do have a Bedrock version coming out, so don’t worry if you’re a Bedrock player.

Getting Started with /item

To begin, type:

/item

You’ll be given two main options:

1) replace — replaces an item (this is the modern equivalent of the old /replaceitem command).

2) modify — modifies an item that already exists (such as an item currently in an inventory).

In this tutorial, we’re focusing on replace.

Replacing an Item on an Entity (Player or Mob)

Start with:

/item replace

Now you choose what you’re replacing:

entity — replaces an inventory slot belonging to an entity (a player, mob, etc.).

block — replaces an item in a container block (like a chest, barrel, ender chest, etc.).

For now, choose entity. For example, you can target yourself using a selector such as @s. You can also use selectors like:

@a (all players), @e (all entities), @p (nearest player), @r (random player), and @s (yourself).

Choosing a Slot (Example: Putting Glass on Your Head)

After selecting the entity, you’ll select the slot you want to replace. These include equipment slots like head, chest, legs, and more.

For example, to put a glass block on your head:

/item replace entity @s head with glass

After running that command, you’ll see a glass block equipped on your head. It ends up looking like a space helmet, which is pretty cool.

Note: Some slots won’t accept certain items. For instance, you can’t put a glass block in a slot that only accepts armor items.

Using from (Copying Equipment Between Entities)

You may also see an option like from. This lets you copy an item from one entity’s slot into another entity’s slot.

For example, you could copy what another player is wearing on their head and place it onto someone else. This won’t be very noticeable in a single-player setup unless there are other players or entities to copy from, but that’s the idea.

Replacing Items in a Chest or Container

If you want to replace an item inside a chest (or another container), you’ll use block.

Important: your crosshair must be pointing at the container block you want to edit. Once you do that, Minecraft will help autofill the block position.

Start with:

/item replace block

Then select a container slot. Container slots are zero-indexed, meaning:

container.0 is the first slot you see when you open a chest.

container.1 is the second slot, and so on.

Example: Replacing Slot 1 in a Chest

If you want to replace the first slot in the chest you’re looking at (slot container.0) with a boat:

/item replace block <coordinates> container.0 with oak_boat

After running the command, slot 1 (the first visible slot) will be replaced with an oak boat.

You can also replace other slots the same way. For example, you could replace container.17 with a boat as well, and it will update that slot accordingly.

Replacing Items on Mobs (Example: Zombies Wearing Glass)

This command is also useful for modifying mob equipment, such as changing what a zombie is holding or wearing.

For example, to put glass on the head of every zombie:

/item replace entity @e[type=zombie] head with glass

If zombies are spawned in your world, you’ll see them walking around with glass helmets—again, it looks like a space helmet.

Why It Doesn’t Work on Some Mobs (Example: Creepers)

Not every mob has every equipment slot available. For example, creepers don’t normally wear armor, so they don’t have armor slots mapped in a way this command can use. Zombies do, so the head slot replacement works for them.

Wrapping Up

If you enjoyed this tutorial, consider leaving a like and subscribing. This was really fun to make, and I’m glad to be back—I’ve been busy with school, but I’m happy I could get this out.

And again, if you’re a Bedrock player, don’t worry: I’m planning to make a Bedrock version of this tutorial soon.

Thanks so much for watching, and I’ll see you in the next video.

Video Thumbnail

Advertisment

Leave a Reply

Scroll to Top