Add fake blockState with meta value for FML blocks

This commit is contained in:
David Vierra 2015-04-16 17:25:11 -10:00
parent 157e3d0aba
commit 2589b07c77

View File

@ -482,7 +482,7 @@ class AnvilWorldAdapter(object):
for entry in itemdata:
ID = entry['V'].value
name = entry['K'].value
if name[0] != u'\x01':
if name[0] != u'\x01': # 0x01 = blocks, 0x02 = items
continue
name = name[1:]
if ID not in blocktypes.namesByID:
@ -492,10 +492,11 @@ class AnvilWorldAdapter(object):
blocktypes.statesByID[ID, 0] = name
blocktypes.IDsByName[name] = ID
blocktypes.namesByID[ID] = name
blocktypes.defaultBlockstates[name] = '[0]'
blocktypes.blockJsons[name] = {
'displayName': name,
'internalName': name,
'blockState': '',
'blockState': '[0]',
'unknown': True,
}
blocktypes.allBlocks.append(BlockType(ID, 0, blocktypes))