Video Summary
In this video, I explain how to use the /item command in Minecraft Java Edition to replace items on players, in containers like chests, and on mobs. The command has two main functions: “replace” to swap out items and “modifier” to alter existing inventory items, with specific syntax for targeting different entity slots and container positions. I also demonstrate practical examples like placing glass blocks on zombie heads and replacing chest inventory slots.
“`html
Hey everyone, it’s UnderMyCap and welcome back to another video! Today I’m going to be showing you how to use the /item command in Minecraft Java Edition. This command is formerly known as the replace item command, and I have done a video on that in the past — however, that covers versions below 1.17. Please keep in mind that everything covered here will only work on Java Edition. I do have a Replace Item Bedrock video coming out, so just keep that in mind. With that said, let’s get straight into the tutorial! If you’d prefer to watch the video version of this guide, you can check it out here: How To Use The Item Command In Minecraft Java Edition! To begin, type /item into the chat. You’ll immediately be presented with two options: modifier and replace. The replace option works similarly to the old replace item command — it replaces an item in an inventory slot. The modifier option, on the other hand, modifies the item currently sitting in an inventory slot. For the purpose of this guide, we’ll be focusing on /item replace. After selecting replace, you’ll be given two further options: block and entity. Choosing entity allows you to replace items in any entity’s inventory slot, including players. You can target yourself, all players, all entities, the nearest person, or a random player — all of the standard target selectors apply here. Once you’ve selected your target, you’ll be shown all of the available inventory slots you can fill or replace. These include your main body components such as your head, chest, legs, and feet. For example, if I type /item replace entity @s armor.head with glass and hit enter, a glass block will appear on my head — giving a really cool astronaut or space helmet look! It’s worth noting that some slots may not always be available depending on the item. For instance, you cannot place a glass block on the feet slot as that is intended for armour components. There is also a from option within this command, which allows you to copy an item from one entity’s slot to another. For example, if you targeted a specific player’s head slot as the source, it would copy whatever is in that slot over to the destination player’s slot. This is a really handy feature when working with multiple players! Now let’s look at how to replace items inside a chest or other container. First, make sure your crosshair is pointing directly at the block you want to target — this is important because the command uses your cursor position to auto-fill the block’s coordinates. Once you’re looking at the block, type /item replace block and you’ll see the coordinates auto-fill based on where you’re looking. After the coordinates are filled in, you’ll be prompted to select a container slot. It’s important to understand the slot numbering here: container slot 0 is technically the first slot you see when you open a chest, container slot 1 is the second, and so on. So if you wanted to replace slot one in a chest with, say, a boat, you would use container 0 as your slot value. Once you hit enter, that item will be placed directly into the chest without you needing to open it — really useful for map making and automation! This command is also incredibly useful for replacing items on mobs such as zombies. For example, using /item replace entity @e[type=zombie] armor.head with glass will place a glass block on the head of every zombie currently in the world — making them look like they’re wearing space helmets, which looks absolutely amazing! It’s a great way to customise mob appearances for adventure maps or fun creative builds. It’s worth noting, however, that this only works with entities that actually have the relevant slots mapped. For example, creepers don’t typically wear armour and don’t have armour slots assigned to them, so you won’t be able to replace their armour slots. Zombies, on the other hand, do have these slots available, which is why the command works perfectly on them. And that’s how you use the /item command in Minecraft Java Edition! Whether you’re replacing player equipment, filling chests with items, or customising mobs, this command is incredibly powerful and opens up a lot of creative possibilities. If you enjoyed this guide, don’t forget to leave a like and subscribe over on YouTube — it really does mean a lot! I’ve been busy with school lately so I’m really glad I was able to put this together for you. I’ll also be releasing a Bedrock Edition version of this guide very soon, so if you’re a Bedrock player, stay tuned — I’ve got you covered! Thank you so much for reading and I can’t wait to see you in the next one. See ya!
Getting Started with the /item Command
Replacing Items on Players (Entity)
Replacing Items in Chests and Containers (Block)
Replacing Items on Mobs
Wrapping Up





