|
|
|
@ -28,10 +28,6 @@ EMERALD_BLOCK = 5407 |
|
|
|
|
TEST_BLOCK = (616, 78, 496) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WATER = [ |
|
|
|
|
'water', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
AVOID = [ |
|
|
|
|
'lava', |
|
|
|
|
'water', |
|
|
|
@ -263,89 +259,37 @@ INDEXED = [ |
|
|
|
|
'barrel', |
|
|
|
|
] + BEDS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NON_SOLID_IDS = set([SINGLE_SNOW]) |
|
|
|
|
for block_name in NON_SOLID: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
NON_SOLID_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
AVOID_IDS = set() |
|
|
|
|
for block_name in AVOID: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
AVOID_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
WATER_IDS = set() |
|
|
|
|
for block_name in WATER: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
WATER_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
LOG_IDS = set() |
|
|
|
|
for block_name in LOGS: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
LOG_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
LEAF_IDS = set() |
|
|
|
|
for block_name in LEAVES: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
LEAF_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
CHEST_IDS = set() |
|
|
|
|
for block_name in ['chest']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
CHEST_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
BARREL_IDS = set() |
|
|
|
|
for block_name in ['barrel']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
BARREL_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
TRAPPED_CHEST_IDS = set() |
|
|
|
|
for block_name in ['trapped_chest']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
TRAPPED_CHEST_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
NETHERWART_IDS = set() |
|
|
|
|
for block_name in ['nether_wart']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
NETHERWART_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
WHEAT_IDS = set() |
|
|
|
|
for block_name in ['wheat']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
WHEAT_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
POTATO_IDS = set() |
|
|
|
|
for block_name in ['potatoes']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
POTATO_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
CARROT_IDS = set() |
|
|
|
|
for block_name in ['carrots']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
CARROT_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
BEETROOT_IDS = set() |
|
|
|
|
for block_name in ['beetroots']: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
BEETROOT_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
SAPLING_IDS = set() |
|
|
|
|
for block_name in SAPLINGS: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
SAPLING_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
BED_IDS = set() |
|
|
|
|
for block_name in BEDS: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
BED_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_set(ids): |
|
|
|
|
result = set() |
|
|
|
|
for block_name in ids: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
result.add(state['id']) |
|
|
|
|
return result |
|
|
|
|
|
|
|
|
|
NON_SOLID_IDS = get_set(NON_SOLID) |
|
|
|
|
NON_SOLID_IDS.add(SINGLE_SNOW) |
|
|
|
|
|
|
|
|
|
AVOID_IDS = get_set(AVOID) |
|
|
|
|
WATER_IDS = get_set(['water']) |
|
|
|
|
LOG_IDS = get_set(LOGS) |
|
|
|
|
LEAF_IDS = get_set(LEAVES) |
|
|
|
|
CHEST_IDS = get_set(['chest']) |
|
|
|
|
BARREL_IDS = get_set(['barrel']) |
|
|
|
|
TRAPPED_CHEST_IDS = get_set(['trapped_chest']) |
|
|
|
|
NETHERWART_IDS = get_set(['nether_wart']) |
|
|
|
|
WHEAT_IDS = get_set(['wheat']) |
|
|
|
|
POTATO_IDS = get_set(['potatoes']) |
|
|
|
|
CARROT_IDS = get_set(['carrots']) |
|
|
|
|
BEETROOT_IDS = get_set(['beetroots']) |
|
|
|
|
SAPLING_IDS = get_set(SAPLINGS) |
|
|
|
|
BED_IDS = get_set(BEDS) |
|
|
|
|
|
|
|
|
|
INDEXED_IDS = set() |
|
|
|
|
for block_name in INDEXED: |
|
|
|
|
for state in JSON_BLOCKS['minecraft:' + block_name]['states']: |
|
|
|
|
INDEXED_IDS.add(state['id']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MATURE_WHEAT_ID = max(WHEAT_IDS) |
|
|
|
|
MATURE_POTATO_ID = max(POTATO_IDS) |
|
|
|
|
MATURE_CARROT_ID = max(CARROT_IDS) |
|
|
|
|