def item_stack(item): item_tag = TAG_Compound() item_tag.name = 'tag' item_tag['id'] = TAG_Short(item['id']) item_tag['Damage'] = TAG_Short(item['damage']) item_tag['Count'] = TAG_Byte(item['count']) item_tag['Slot'] = TAG_Byte(item['slot']) return item_tag
def item_stack(item): item_tag = TAG_Compound() item_tag.name = 'tag' item_tag['id'] = TAG_Short(item['id']) item_tag['Damage'] = TAG_Short(item['damage']) item_tag['Count'] = TAG_Byte(item['count']) item_tag['Slot'] = TAG_Byte(item['slot']) return item_tag
def signed_book(title='', pages=[''], author='Skyblock CE'): book_tag = TAG_Compound() book_tag.name = 'tag' book_tag['title'] = title book_tag['author'] = author book_tag['pages'] = TAG_List(name='pages', list_type=TAG_String) for page in pages: book_tag['pages'].append(TAG_String(page)) item_tag = TAG_Compound() item_tag['id'] = TAG_Short(items.names['Written Book']) item_tag['Damage'] = TAG_Byte(0) item_tag['Count'] = TAG_Byte(1) item_tag['tag'] = book_tag return item_tag
def signed_book(title='', pages=[''], author='Skyblock CE'): book_tag = TAG_Compound() book_tag.name = 'tag' book_tag['title'] = title book_tag['author'] = author book_tag['pages'] = TAG_List(name='pages', list_type=TAG_String) for page in pages: book_tag['pages'].append(TAG_String(page)) item_tag = TAG_Compound() item_tag['id'] = TAG_Short(items.names['Written Book']) item_tag['Damage'] = TAG_Byte(0) item_tag['Count'] = TAG_Byte(1) item_tag['tag'] = book_tag return item_tag