Skip to content

Instantly share code, notes, and snippets.

@claym
Last active November 26, 2016 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claym/1c530332b44c1206cc1ce45f791920e1 to your computer and use it in GitHub Desktop.
Save claym/1c530332b44c1206cc1ce45f791920e1 to your computer and use it in GitHub Desktop.
def signFilter(poi):
def getSignLineText(text):
import json
data = json.loads(text)
if 'extra' in data:
return data['extra'][0]['text']
else:
return data['text']
return
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
slist = list()
for x in range(1, 5):
line = getSignLineText(poi['Text' + str(x)])
slist.append(line)
return "\n".join(slist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment