Avoid planted saplings when pathfinding
This commit is contained in:
1 parent
0a499f901a
commit
0b462f4a76
2 files changed
+18
-7
No files matched your search
@@ -60,6 +60,12 @@ def get_set(names):
|
||||
SAND_IDS = get_set(['sand', 'red_sand'])
|
||||
|
||||
|
||||
LOGS = sorted(name for name in MCD_BLOCKS
|
||||
if name.endswith(('_log', '_wood', '_stem', '_hyphae')))
|
||||
LEAVES = sorted(name for name in MCD_BLOCKS if name.endswith('_leaves'))
|
||||
SAPLINGS = sorted(name for name in MCD_BLOCKS
|
||||
if name.endswith('_sapling') or name.endswith('_propagule'))
|
||||
|
||||
# Collision geometry is safer for navigation than the old hard-coded 1.16 list.
|
||||
NON_SOLID_IDS = {
|
||||
state_id for state_id, boxes in COLLISION_BOXES.items() if not boxes
|
||||
@@ -67,19 +73,13 @@ NON_SOLID_IDS = {
|
||||
AVOID = {
|
||||
'lava', 'water', 'fire', 'magma_block', 'sweet_berry_bush',
|
||||
'nether_portal', 'end_portal', 'cactus', 'powder_snow',
|
||||
}
|
||||
} | set(SAPLINGS)
|
||||
AVOID_IDS = get_set(AVOID)
|
||||
AVOID_IDS.update(
|
||||
state_id for state_id, name in BLOCKS.items()
|
||||
if name.endswith(('_fence', '_fence_gate', '_wall'))
|
||||
)
|
||||
WATER_IDS = get_set(['water'])
|
||||
|
||||
LOGS = sorted(name for name in MCD_BLOCKS
|
||||
if name.endswith(('_log', '_wood', '_stem', '_hyphae')))
|
||||
LEAVES = sorted(name for name in MCD_BLOCKS if name.endswith('_leaves'))
|
||||
SAPLINGS = sorted(name for name in MCD_BLOCKS
|
||||
if name.endswith('_sapling') or name.endswith('_propagule'))
|
||||
BEDS = sorted(name for name in MCD_BLOCKS if name.endswith('_bed'))
|
||||
INDEXED = ['chest', 'trapped_chest', 'emerald_block', 'barrel'] + BEDS + [
|
||||
'wheat', 'potatoes', 'carrots', 'beetroots', 'nether_wart',
|
||||
|
||||
Reference in new issue
Block a user