arpruss / raspberryjammod

Raspberry Jam Mod - a Mod Forge Minecraft mod implementing most of Raspberry Juice/Pi API
http://www.instructables.com/id/Python-coding-for-Minecraft/
Other
355 stars 95 forks source link

cant get color in chat to work #31

Open matcool opened 6 years ago

matcool commented 6 years ago

im trying to do a simple postToChat('§eHello world') but a weird things occurs image

i dont know if theres any function that does the same thing as /tellraw but help would be appreciated.

arpruss commented 6 years ago

I doubt that color will work.

gemSquared commented 6 years ago

Righto um. Minecraft tends to freak out when a client (not server aparently) enters the "§" ... In a vanilla server, you'd normally get kicked for doing that :p No idea why it puts in "Â" though... Try "§kSome text".

arpruss commented 6 years ago

I wouldn't put non-ASCII characters into Python code. Try instead "\xA7kSome test"

gemSquared commented 6 years ago

Or like... char(21) inserted into a string.

arpruss commented 6 years ago

Why 21?

matcool commented 6 years ago

tried "\xA7kSome test" and the weird character still persists image chr(167) does the same thing as before image image

Probably the only way to get rid of it is to use some kind of tellraw

gemSquared commented 6 years ago

Hmmm dunno same here... but §k does what it should... (scramble letters)

gemSquared commented 6 years ago

Also. § is ASCII 21. On Windows machine, ALT + NUMPAD 21 = §

arpruss commented 6 years ago

Oh, if it's ascii 21, you should try "\x15Hello World".

matcool commented 6 years ago

"\x15Hello World" gives me this: image

gemSquared commented 6 years ago

How 'bout { chr(21) + "aHayo?" }

matcool commented 6 years ago

image