1

Command Block Help!

beetlebot124 9/27/18 1:35 pm
322
10/9/2018 7:51 pm
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
Posted by
beetlebot124
Level 1 : New Miner
0

  Have something to say?

JoinSign in

6

gggekgjrn
10/09/2018 7:51 pm
Level 1 : New Miner
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!
1
garlicbreathinator
09/27/2018 4:47 pm
Level 33 : Artisan Loremaster owo
history
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.
1
beetlebot124
09/28/2018 1:25 am
Level 1 : New Miner
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.
1
ShelLuser
09/28/2018 1:44 am
Level 61 : High Grandmaster System
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.
1
beetlebot124
09/28/2018 3:46 pm
Level 1 : New Miner
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.
1
ShelLuser
09/27/2018 3:32 pm
Level 61 : High Grandmaster System
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:
  • /setblock -184 ~ 98 minecraft:chest
Optionally you can add some extra parameters such as facing= to have it set in a specific direction.
1

Welcome