The Meaning of Life, the Universe, and Everything.
Join Date:
1/12/2017
Posts:
53
Minecraft:
AngaBlue
PSN:
AngaBlue
Member Details
Hey, I'm Back!
Recently I've been trying to summon an Item entity with a custom coloured name. I've tried all those coloured generator thingos and they seem to be broken in 1.12. Here is my command:
summon item 0 10 0 {Item:{id:"minecraft:double_plant",Count:1b,tag:{display:{Name:"§eToken",Lore:["Trade With The Merchant"]}}},Age:5889}
Obviously The colour code there won't work but it's just there to show I want the word "Token" yellow. If anyone knows how to do this it would be appreciated if you could let me know.
Its very easy to use, and just copy paste that command into the COMMAND HERE box. The command that it gives you, will give you a sign and that sign when clicked will replace it with a command block with the colored name. You cannot edit the command after this or else it will remove the color from it. If you do this, the name of the item will become un-italicized, so you will have to add the italic color code too. Simply CTRL + Middle click to grab the command block with the command inside, and place it wherever you want it. One more thing to note. This generator is broken in 1.12 like you listed above. So click on the link below and copy paste the command the website gives you into the 1.11 COMMAND HERE box and copy paste the ouput into minecraft. It should work.
I have tried it and can confirm that the section symbol formatting does work with functions. If you insert the command you wish to execute in a function text file (since text files can store the section symbol while command blocks in Minecraft obviously cannot) and execute the function in Minecraft, it will work.
The Meaning of Life, the Universe, and Everything.
Join Date:
1/12/2017
Posts:
53
Minecraft:
AngaBlue
PSN:
AngaBlue
Member Details
Mate, you're a legend. This is only thing that actually works. Thanks so much. I guess as soon as you edit it the game realizes that the character shouldn't be there and it deletes it. I've tried putting the code into functions but that won't work. There is another step probably to getting it to work because I've seen others do it.
It does work with functions, I've tested it and achieved it successfully before. I even tried opening a new world and executing your command from a function (I modified it to a /give to make it easier):
give @a minecraft:double_plant 1 0 {display:{Name:"§eToken",Lore:["Trade With The Merchant"]}}
The section symbol does not at all invalidate the format. The reason that section symbols don't work directly with command blocks is because Minecraft doesn't accept it (since the encoder does not support it). Though, you are able to "hack" them in using MCEdit or NBT editors, so long as you don't edit the command block in Minecraft.
So, you'd expect it to work using functions, so long as you save the function file using UTF-8 encoding (not ANSI, which is what Notepad defaults to). There's no need for any other symbols; the section symbol should work on its own. I would suggest using something like Notepad++ for editing function files, as that is what I used and it works perfectly.
The Meaning of Life, the Universe, and Everything.
Join Date:
1/12/2017
Posts:
53
Minecraft:
AngaBlue
PSN:
AngaBlue
Member Details
Trust me, man. He's right and it does work. It's much easier than using  because you can edit it at any time and you don't need extra characters other than the colour codes.
The Meaning of Life, the Universe, and Everything.
Join Date:
3/11/2012
Posts:
55
Minecraft:
yoshiweegee
Member Details
It seems that Minecraft reads strings as if they were unicode, specifically UTF-8, regardless of the encoding of the given text. In UTF-8, § is represented by 0xC2A7. In the default Windows encoding, Windows-1252 (which Notepad erroneously calls ANSI), 0xC2A7 represents §, where  is 0xC2 and § is 0xA7. This is why saving the file with Windows-1252 encoding lets Minecraft interpret § as §.
As for why Minecraft might be rejecting files saved in a unicode format, most unicode formats use a byte header, which is a specific sequence of bytes at the beginning of text which tells programs "Hey, I'm in unicode format!". It could be the case that Minecraft does not account for this, expecting a file using the default encoding (which varies from system to system) not using a byte header. As such, it would try to interpret the byte header as part of the first command, which likely would invalidate the function.
EDIT: Corrected my hypothesis on what Minecraft is expecting from function files.
I highly doubt that. The very moment I use any other format but plain text (Unicode, UTF8, etc.) then Minecraft refuses to load the entire function. Even when using plain commands. Besides: you don't need those formats in order to use characters such as § or Â.
On the Minecraft Wiki page, it states that "it is recommended to use UTF-8 (without BOM) encoding on function files to prevent any problems". Notepad, however, defaults to ANSI (or extended ASCII), which I don't think supports §, which might be where such problems are being encountered. I use Notepad++ with UTF-8 encoding, and like I mentioned in my previous post, I don't experience any issues when using the section symbol alone.
EDIT: My mistake, I didn't see yoshimo's post. He definitely does a better job at explaining it.
The Meaning of Life, the Universe, and Everything.
Join Date:
3/11/2012
Posts:
55
Minecraft:
yoshiweegee
Member Details
Also, on the subject of summoning items with colored names, this would be completely solved if all String NBT tags supported JSON parsing. Signs do, so you can use clickEvents with them to summon items with colored names using Minecraft commands alone. I really don't get why JSON parsing is only done (in fact, required) by signs.
Yes, you are correct, I was not completely sure where the issue lies which is why I kept reiterating that I was using Notepad++. Though, I suppose if Notepad++ makes things more convenient, then there's no reason to not use it.
Hey, I'm Back!
Recently I've been trying to summon an Item entity with a custom coloured name. I've tried all those coloured generator thingos and they seem to be broken in 1.12. Here is my command:
Obviously The colour code there won't work but it's just there to show I want the word "Token" yellow. If anyone knows how to do this it would be appreciated if you could let me know.
Thanks
Use this website: mctoolbox.me/colors/
Its very easy to use, and just copy paste that command into the COMMAND HERE box. The command that it gives you, will give you a sign and that sign when clicked will replace it with a command block with the colored name. You cannot edit the command after this or else it will remove the color from it. If you do this, the name of the item will become un-italicized, so you will have to add the italic color code too. Simply CTRL + Middle click to grab the command block with the command inside, and place it wherever you want it. One more thing to note. This generator is broken in 1.12 like you listed above. So click on the link below and copy paste the command the website gives you into the 1.11 COMMAND HERE box and copy paste the ouput into minecraft. It should work.
The Link: https://mrgarretto.com/convert-1-12#
Feel free to DM me if you have any questions.
Thanks, without you I don't think I would of known there was a 1.12 converter. Does it work in functions as well?
I don't think so because minecraft is reading the commands directly from a text document and doesn't know how to detect colors.
I have tried it and can confirm that the section symbol formatting does work with functions. If you insert the command you wish to execute in a function text file (since text files can store the section symbol while command blocks in Minecraft obviously cannot) and execute the function in Minecraft, it will work.
Really? Which command did you use because it didn't work for me.
Mate, you're a legend. This is only thing that actually works. Thanks so much. I guess as soon as you edit it the game realizes that the character shouldn't be there and it deletes it. I've tried putting the code into functions but that won't work. There is another step probably to getting it to work because I've seen others do it.
Thanks again
Any Idea on how to make it work with functions? Simply typing the section sign in there doesn't seem to work.
It's been done in a map called Makers Punch and I've been told how to do it with command blocks. So it is possible, we just don't know how
Yeah, don't worry. The functions are fairly new so not a lot people know much about them.
It does work with functions, I've tested it and achieved it successfully before. I even tried opening a new world and executing your command from a function (I modified it to a /give to make it easier):
The section symbol does not at all invalidate the format. The reason that section symbols don't work directly with command blocks is because Minecraft doesn't accept it (since the encoder does not support it). Though, you are able to "hack" them in using MCEdit or NBT editors, so long as you don't edit the command block in Minecraft.
So, you'd expect it to work using functions, so long as you save the function file using UTF-8 encoding (not ANSI, which is what Notepad defaults to). There's no need for any other symbols; the section symbol should work on its own. I would suggest using something like Notepad++ for editing function files, as that is what I used and it works perfectly.
Yes, you just beat me to it. I found this out last night but forgot to post. It's much easier and finicky.
Trust me, man. He's right and it does work. It's much easier than using  because you can edit it at any time and you don't need extra characters other than the colour codes.
It seems that Minecraft reads strings as if they were unicode, specifically UTF-8, regardless of the encoding of the given text. In UTF-8, § is represented by 0xC2A7. In the default Windows encoding, Windows-1252 (which Notepad erroneously calls ANSI), 0xC2A7 represents §, where  is 0xC2 and § is 0xA7. This is why saving the file with Windows-1252 encoding lets Minecraft interpret § as §.
As for why Minecraft might be rejecting files saved in a unicode format, most unicode formats use a byte header, which is a specific sequence of bytes at the beginning of text which tells programs "Hey, I'm in unicode format!". It could be the case that Minecraft does not account for this, expecting a file
using the default encoding (which varies from system to system)not using a byte header. As such, it would try to interpret the byte header as part of the first command, which likely would invalidate the function.EDIT: Corrected my hypothesis on what Minecraft is expecting from function files.
On the Minecraft Wiki page, it states that "it is recommended to use UTF-8 (without BOM) encoding on function files to prevent any problems". Notepad, however, defaults to ANSI (or extended ASCII),
which I don't think supports §, which might be where such problems are being encountered. I use Notepad++ with UTF-8 encoding, and like I mentioned in my previous post, I don't experience any issues when using the section symbol alone.EDIT: My mistake, I didn't see yoshimo's post. He definitely does a better job at explaining it.
Also, on the subject of summoning items with colored names, this would be completely solved if all String NBT tags supported JSON parsing. Signs do, so you can use clickEvents with them to summon items with colored names using Minecraft commands alone. I really don't get why JSON parsing is only done (in fact, required) by signs.
Yes, you are correct, I was not completely sure where the issue lies which is why I kept reiterating that I was using Notepad++. Though, I suppose if Notepad++ makes things more convenient, then there's no reason to not use it.
Well this post blew up. It's solved now though.