1
Command Block Help!
Wazzup friends.
So, here's the issue. I've got this cool map that I want to spawn in a chest when a command block is triggered. This is the code I've used:
replaceitem block 54 68 -68 container.2 minecraft:filled_map 1
However, this only places the very first map I ever made, and I don't know how to change that.
Hopefully some Minecraft-Command-Block-Wizards out there can help me out with my issue!
Thanks guys
So, here's the issue. I've got this cool map that I want to spawn in a chest when a command block is triggered. This is the code I've used:
replaceitem block 54 68 -68 container.2 minecraft:filled_map 1
However, this only places the very first map I ever made, and I don't know how to change that.
Hopefully some Minecraft-Command-Block-Wizards out there can help me out with my issue!
Thanks guys
6
I have a simple solution, make a pre-existing chest in the world with the map in it and clone the chest to the spot where you want it. Also im pretty sure if you already have a chest where you want the chest with a map in it to be i think it will still work. Let me know if you have any problems!
You are spawning one filled map item without any metadata. To get the map you need, you need to specify some data like the map's id. Try the command
/replaceitem block 54 68 -68 container.2 minecraft:filled_map 1 {map=X}
Where you must replace the X with the id number that appears on the map item of the map you want.
/replaceitem block 54 68 -68 container.2 minecraft:filled_map 1 {map=X}
Where you must replace the X with the id number that appears on the map item of the map you want.
When I put my cursor over the map I wanted, it said, Map #3, so I tried putting {map=3} in the command but it didn't work.
Turn on advanced tool tips (f3+h I think from mind) and then hover your mouse over your existing map. It will then show you the right id.
Thanks for your help! I still couldn't get it, but decided to use the clone command to clone a chest with the map inside.
I'm not sure I understand the problem. You want to spawn in a chest? But the code you used only replaces an item in an inventory, in this example the inventory of a chest (or other container block).
To place a chest in the world somewhere you'd use the /setblock command:
To place a chest in the world somewhere you'd use the /setblock command:
- /setblock -184 ~ 98 minecraft:chest
