Command Blocks in 1.11?

Sometimes, we all need a little general help.

Post Permalink
by theillusivemoose » 4/18/2017

Sooo... new user here! Extremely sorry if this is in the wrong forum. But I was wondering, have they changed the way command strings are entered in Command Blocks? The little interface changed, and I can't get my stuff to work any more. I have a custom made villager from a website (because I am awful at code strings and bracket stuff and all that jazz hrgh) but I updated his offers recently and killed off the old guy... and when I attempted to use the Command Block to spawn the updated guy, it tells me "Unable to summon object out of the world" or something like that. So I'm assuming my command is outdated, but I don't know how to make it workable again, lol.

Command under spoiler!
Spoiler
/summon villager ~-160 ~63 ~228 {Invulnerable:1,PersistenceRequired:1,CustomName:Trader Joe,Offers:{Recipes:[{buy:{id:beetroot,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:carrot,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:chorus_fruit,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:dye,Damage:3,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:fish,Damage:2,Count:1},sell:{id:gold_ingot,Count:1},maxUses:9999999},{buy:{id:egg,Count:16},sell:{id:gold_nugget,Count:16},maxUses:9999999},{buy:{id:apple,Count:1},sell:{id:diamond,Count:1},maxUses:9999999},{buy:{id:melon,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:poisonous_potato,Count:1},sell:{id:diamond,Count:1},maxUses:9999999},{buy:{id:potato,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:fish,Damage:3,Count:1},sell:{id:gold_ingot,Count:1},maxUses:9999999},{buy:{id:beef,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:chicken,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:fish,Count:1},sell:{id:dye,Damage:4,Count:8},maxUses:9999999},{buy:{id:mutton,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:porkchop,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:rabbit,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:fish,Damage:1,Count:1},sell:{id:dye,Damage:4,Count:8},maxUses:9999999},{buy:{id:rotten_flesh,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:beef,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:reeds,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:wheat,Count:64},sell:{id:emerald,Count:8},maxUses:9999999},{buy:{id:golden_sword,Count:1},sell:{id:gold_ingot,Count:5},maxUses:9999999},{buy:{id:coal,Count:64},sell:{id:iron_ingot,Count:8},maxUses:9999999},{buy:{id:wool,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:record_cat,Count:1},sell:{id:diamond,Count:9},maxUses:9999999},{buy:{id:bone,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:blaze_rod,Count:8},sell:{id:gold_ingot,Count:1},maxUses:9999999},{buy:{id:ender_pearl,Count:16},sell:{id:gold_nugget,Count:16},maxUses:9999999},{buy:{id:feather,Count:64},sell:{id:iron_nugget,Count:9},maxUses:9999999},{buy:{id:flint,Count:64},sell:{id:iron_nugget,Count:9},maxUses:9999999},{buy:{id:ghast_tear,Count:1},sell:{id:diamond,Count:1},maxUses:9999999},{buy:{id:gunpowder,Count:64},sell:{id:experience_bottle,Count:1},maxUses:9999999},{buy:{id:leather,Count:64},sell:{id:gold_ingot,Count:8},maxUses:9999999},{buy:{id:quartz,Count:8},sell:{id:dye,Damage:4,Count:8},maxUses:9999999},{buy:{id:nether_wart,Count:64},sell:{id:experience_bottle,Count:1},maxUses:9999999},{buy:{id:rabbit_hide,Count:8},sell:{id:gold_ingot,Count:1},maxUses:9999999},{buy:{id:rabbit_foot,Count:1},sell:{id:diamond,Count:1},maxUses:9999999},{buy:{id:redstone,Count:64},sell:{id:gold_nugget,Count:64},maxUses:9999999},{buy:{id:spider_eye,Count:64},sell:{id:experience_bottle,Count:8},maxUses:9999999},{buy:{id:string,Count:64},sell:{id:experience_bottle,Count:8},maxUses:9999999},{buy:{id:saddle,Count:1},sell:{id:leather,Count:5},maxUses:9999999},{buy:{id:minecart,Count:1},sell:{id:iron_ingot,Count:5},maxUses:9999999},{buy:{id:diamond_horse_armor,Count:1},sell:{id:diamond,Count:7},maxUses:9999999},{buy:{id:iron_horse_armor,Count:1},sell:{id:iron_ingot,Count:7},maxUses:9999999},{buy:{id:golden_horse_armor,Count:1},sell:{id:gold_ingot,Count:7},maxUses:9999999},{buy:{id:totem_of_undying,Count:1},sell:{id:diamond_block,Count:64},maxUses:9999999},{buy:{id:magma_cream,Count:8},sell:{id:diamond,Count:1},maxUses:9999999}]},Profession:5,Career:1,CareerLevel:0}


So OP, this guy. xD;; (Can y'all tell I'm a hoarder?!)
User avatar
Level 1
New Explorer
Posts: 8
Joined: 4/18/17

Post Permalink
by Pepijn » 4/18/2017

"Unable to summon object out of the world" means that the coordinates you put in the summon command (~-160 ~63 ~228) are out of the loaded chunks, the summon command only works with coordinates that are loaded.
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Post Permalink
by theillusivemoose » 4/18/2017

Pepijn wrote:"Unable to summon object out of the world" means that the coordinates you put in the summon command (~-160 ~63 ~228) are out of the loaded chunks, the summon command only works with coordinates that are loaded.

I don't get how they aren't loaded. That's at my base, right near my natural spawn point. :shock: I'm there all the time. How do I load these chunks?
User avatar
Level 1
New Explorer
Posts: 8
Joined: 4/18/17

Post Permalink
by Pepijn » 4/18/2017

theillusivemoose wrote:
Pepijn wrote:"Unable to summon object out of the world" means that the coordinates you put in the summon command (~-160 ~63 ~228) are out of the loaded chunks, the summon command only works with coordinates that are loaded.

I don't get how they aren't loaded. That's at my base, right near my natural spawn point. :shock: I'm there all the time. How do I load these chunks?


"~-160 ~63 ~228" are relative coordinates (the ~ does that). If you want the mob to spawn at the absolute coordinates, leave out the ~ (so -160 63 228). Relative coordinates mean that the mob gets spawned so many blocks away from the position of the commandblock (so if the commandblock is at x=50, ~-160 means that the mob will spawn at x=50-160=-110)
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Post Permalink
by theillusivemoose » 4/18/2017

Pepijn wrote:
theillusivemoose wrote:
Pepijn wrote:"Unable to summon object out of the world" means that the coordinates you put in the summon command (~-160 ~63 ~228) are out of the loaded chunks, the summon command only works with coordinates that are loaded.

I don't get how they aren't loaded. That's at my base, right near my natural spawn point. :shock: I'm there all the time. How do I load these chunks?


"~-160 ~63 ~228" are relative coordinates (the ~ does that). If you want the mob to spawn at the absolute coordinates, leave out the ~ (so -160 63 228). Relative coordinates mean that the mob gets spawned so many blocks away from the position of the commandblock (so if the commandblock is at x=50, ~-160 means that the mob will spawn at x=50-160=-110)

Just tried that, and it still gave the same message. :? Before 1.11 everything worked just fine. Is there something in that command that doesn't work?
User avatar
Level 1
New Explorer
Posts: 8
Joined: 4/18/17

Post Permalink
by Pepijn » 4/18/2017

The command is fine. If you use "~ ~1 ~" for the coordinates it successfully summons the villagers one block above the commandblock. So the coordinates you are putting in the commandblock are wrong.

I suggest you just place the commandblock exactly where you want the villager, and use "~ ~ ~" for the coordinates.
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Post Permalink
by theillusivemoose » 4/18/2017

Pepijn wrote:The command is fine. If you use "~ ~1 ~" for the coordinates it successfully summons the villagers one block above the commandblock. So the coordinates you are putting in the commandblock are wrong.

I suggest you just place the commandblock exactly where you want the villager, and use "~ ~ ~" for the coordinates.

Just tried it. The villager fails to appear, but at least it's not telling me "unable to summon object out of the world." I guess that's a step in the right direction... xD;
User avatar
Level 1
New Explorer
Posts: 8
Joined: 4/18/17

Post Permalink
by Pepijn » 4/18/2017

It's working completely fine for me, so I'm not sure what is going wrong.
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Post Permalink
by Bertiecrafter » 4/18/2017

1. Use absolute coords as Pepijn already said. (Either ~ ~ ~ for current location or -160 63 228)
2. Surround Trader Joe by quotes. Minecraft only reads the DataTag until the next space. There is a space after Trader and mc would stop right there. Fix this by surrounding it by quotes.

Btw, I don't think having a space in a DataTag worked in any version. So no, the way commands are read didn't change in 1.11. Recently mob names DID change (e.g: ArmorStand became armor_stand). Your command already has the right name for a villager though, so don't worry.
Image
Image
User avatar
Level 22
Expert Engineer
Posts: 412
Joined: 2/15/15
Says: gibi.minecraftr.us
Minecraft: Bertiecrafter
mc_server: GIBI - Gather It, Build It

Post Permalink
by Pepijn » 4/18/2017

Bertiecrafter wrote:Minecraft only reads the DataTag until the next space. There is a space after Trader and mc would stop right there. Fix this by surrounding it by quotes.


This is just simply not true.

Image
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Post Permalink
by theillusivemoose » 4/18/2017

Pepijn wrote:
Bertiecrafter wrote:Minecraft only reads the DataTag until the next space. There is a space after Trader and mc would stop right there. Fix this by surrounding it by quotes.


This is just simply not true.

Image

I'm glad to see it works for you! I'm not sure why it refuses to work for me, though. I tried it in a new world and it still won't do a darn thing. Perhaps I'm not doing something correctly outside of the code. Could you detail the exact steps you take in using the CB? I haven't used it in a long time, so maybe I'm missing something...
User avatar
Level 1
New Explorer
Posts: 8
Joined: 4/18/17

Post Permalink
by Pepijn » 4/19/2017

theillusivemoose wrote:I'm glad to see it works for you! I'm not sure why it refuses to work for me, though. I tried it in a new world and it still won't do a darn thing. Perhaps I'm not doing something correctly outside of the code. Could you detail the exact steps you take in using the CB? I haven't used it in a long time, so maybe I'm missing something...


I place down the commandblock (/give @p command_block), paste the command into the top bar and press "done". Then I just activate the commandblock with a redstone block.
Image
User avatar
Contest Judge
Level 51
Grandmaster Cyborg
Posts: 1156
Joined: 12/9/13
Location: The Netherlands
Minecraft: Pepijn

Next

Return to General Help