Skip to content

Commit

Permalink
mce.py: dumpsigns: Don't decode sign text now that TAG_String automat…
Browse files Browse the repository at this point in the history
…ically decodes it.
  • Loading branch information
codewarrior0 committed Mar 10, 2013
1 parent c830ee6 commit a97ce1c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mce.py
Expand Up @@ -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."
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit a97ce1c

Please sign in to comment.