Permalink
Browse files

mce.py: dumpsigns: Don't decode sign text now that TAG_String automat…

…ically decodes it.
  • Loading branch information...
1 parent c830ee6 commit a97ce1c8c689d5a8493befeaf1a9dd00e1821f5a @codewarrior0 codewarrior0 committed Mar 10, 2013
Showing with 2 additions and 5 deletions.
  1. +2 −5 mce.py
View
7 mce.py
@@ -586,7 +586,7 @@ def _dumpsigns(self, command):
on the first line, followed by four lines of sign text. For example:
[229, 118, -15]
- "To boldy go
+ "To boldly go
where no man
has gone
before."
@@ -600,9 +600,6 @@ def _dumpsigns(self, command):
else:
filename = self.level.displayName + ".signs"
- # It appears that Minecraft interprets the sign text as UTF-8,
- # so we should decode it as such too.
- decodeSignText = codecs.getdecoder('utf-8')
# We happen to encode the output file in UTF-8 too, although
# we could use another UTF encoding. The '-sig' encoding puts
# a signature at the start of the output file that tools such
@@ -626,7 +623,7 @@ def _dumpsigns(self, command):
outFile.write(str(map(lambda x: tileEntity[x].value, "xyz")) + "\n")
for i in range(4):
signText = tileEntity["Text{0}".format(i + 1)].value
- outFile.write(decodeSignText(signText)[0] + u"\n")
+ outFile.write(signText + u"\n")
if i % 100 == 0:
print "Chunk {0}...".format(i)

0 comments on commit a97ce1c

Please sign in to comment.