1

Setblock command issue.

TMCThomas 9/7/17 11:47 am
4.4k
9/8/2017 9:25 pm
Hello everyone!

Recently one of my redstone based minigames (Spleef) stopped working due to a crucial command block that stopped working. The command goes as follows:

"setblock -376 69 1854 command_block 0 replace {Command:"minecraft:tp @p[r=4] -396 74 1917"}"

now this worked fine in the past but all the command blocks with this and similair commands stopped working recently. I can't seem to spot the fault myself. Does anyone see what's wrong with the commando when executed in Minecraft 1.12.1. The error is (translated from Dutch) "The block could not be placed".


Greetings Thomas Mulder


PS. I believe that the the problem is caused by a mc update which changed the syntax for the command but I can't seem to find what changed.
Posted by
TMCThomas
Level 1 : New Miner
0

  Have something to say?

JoinSign in

4

Lololboy420
09/08/2017 9:25 pm
Level 1 : New Crafter
history
You need to specify which block you want to replace /setblock X Y Z minecraft:command_block 0 replace minecraft:command_block {tags} also you don't need minecraft: in the tags
1
Pepijn
09/08/2017 2:49 pm
Level 58 : Grandmaster Cyborg
history
This is a bug introduced in 1.12: bugs.mojang.com/browse/MC-117574

Your issue relates to a `setblock` command not working if the destination already has the block with the same blockstates/datavalue even if the NBT data is different.

This will be fixed in 1.13, but for now just run "/setblock -376 69 1854 air" right before it (like others have said).
1
Wazy_Hemisphere
09/07/2017 8:12 pm
Level 7 : Apprentice System
history
This is the case for me sometimes, but I think it's because you replaced a command block with another command block. The solution if this is the issue is to execute the command (using a command block): "setblock -376 69 1854 air" before executing your command above.

That is how it is in my Minecraft, though when I see YouTubers doing it just fine, I wonder why my Minecraft can't.



Oh and try doing 'tp' instead of 'minecraft:tp' like Enertoutpuissant said.
1
Enertoutpuissant
09/07/2017 1:30 pm
Level 45 : Master Architect
history
Hey, often when it says the block couldn't be placed, it's because either the coordinates are in unloaded chunks, or that the command block is already there.
However, a friend of mine who really is good at command blocks said that you might need to delete the word "minecraft:" and juste leave "tp". He says, for him it works.
Last possibility but it is highly unprobable, is that your world is corrupted, but I don't think this is the issue :/
I hope this helped >.<
2

Welcome