Locate nearest tree and pathfind to it
This commit is contained in:
@@ -183,6 +183,26 @@ NON_SOLID = [
|
||||
]
|
||||
SINGLE_SNOW = 3919
|
||||
|
||||
|
||||
LOGS = [
|
||||
'minecraft:oak_log',
|
||||
'minecraft:spruce_log',
|
||||
'minecraft:birch_log',
|
||||
'minecraft:jungle_log',
|
||||
'minecraft:acacia_log',
|
||||
'minecraft:dark_oak_log',
|
||||
]
|
||||
|
||||
LEAVES = [
|
||||
'minecraft:oak_leaves',
|
||||
'minecraft:spruce_leaves',
|
||||
'minecraft:birch_leaves',
|
||||
'minecraft:jungle_leaves',
|
||||
'minecraft:acacia_leaves',
|
||||
'minecraft:dark_oak_leaves',
|
||||
]
|
||||
|
||||
|
||||
NON_SOLID_IDS = set([SINGLE_SNOW])
|
||||
for block_name in NON_SOLID:
|
||||
for state in BLOCKS[block_name]['states']:
|
||||
@@ -192,3 +212,13 @@ AVOID_IDS = set()
|
||||
for block_name in AVOID:
|
||||
for state in BLOCKS[block_name]['states']:
|
||||
AVOID_IDS.add(state['id'])
|
||||
|
||||
LOG_IDS = set()
|
||||
for block_name in LOGS:
|
||||
for state in BLOCKS[block_name]['states']:
|
||||
LOG_IDS.add(state['id'])
|
||||
|
||||
LEAF_IDS = set()
|
||||
for block_name in LEAVES:
|
||||
for state in BLOCKS[block_name]['states']:
|
||||
LEAF_IDS.add(state['id'])
|
||||
|
||||
Reference in New Issue
Block a user