195 lines
5.6 KiB
Python
195 lines
5.6 KiB
Python
|
import json
|
||
|
|
||
|
with open('blocks.json') as f:
|
||
|
BLOCKS = json.load(f)
|
||
|
|
||
|
AVOID = [
|
||
|
'minecraft:lava',
|
||
|
'minecraft:water',
|
||
|
'minecraft:fire',
|
||
|
'minecraft:magma_block',
|
||
|
'minecraft:oak_fence',
|
||
|
'minecraft:oak_fence_gate',
|
||
|
'minecraft:nether_brick_fence',
|
||
|
'minecraft:spruce_fence_gate',
|
||
|
'minecraft:birch_fence_gate',
|
||
|
'minecraft:jungle_fence_gate',
|
||
|
'minecraft:acacia_fence_gate',
|
||
|
'minecraft:dark_oak_fence_gate',
|
||
|
'minecraft:spruce_fence',
|
||
|
'minecraft:birch_fence',
|
||
|
'minecraft:jungle_fence',
|
||
|
'minecraft:acacia_fence',
|
||
|
'minecraft:dark_oak_fence',
|
||
|
'minecraft:sweet_berry_bush',
|
||
|
'minecraft:nether_portal',
|
||
|
'minecraft:end_portal',
|
||
|
'minecraft:cobblestone_wall',
|
||
|
'minecraft:mossy_cobblestone_wall',
|
||
|
'minecraft:brick_wall',
|
||
|
'minecraft:prismarine_wall',
|
||
|
'minecraft:red_sandstone_wall',
|
||
|
'minecraft:mossy_stone_brick_wall',
|
||
|
'minecraft:granite_wall',
|
||
|
'minecraft:stone_brick_wall',
|
||
|
'minecraft:nether_brick_wall',
|
||
|
'minecraft:andesite_wall',
|
||
|
'minecraft:red_nether_brick_wall',
|
||
|
'minecraft:sandstone_wall',
|
||
|
'minecraft:end_stone_brick_wall',
|
||
|
'minecraft:diorite_wall',
|
||
|
|
||
|
]
|
||
|
|
||
|
|
||
|
NON_SOLID = [
|
||
|
'minecraft:air',
|
||
|
'minecraft:oak_sapling',
|
||
|
'minecraft:spruce_sapling',
|
||
|
'minecraft:birch_sapling',
|
||
|
'minecraft:jungle_sapling',
|
||
|
'minecraft:acacia_sapling',
|
||
|
'minecraft:dark_oak_sapling',
|
||
|
'minecraft:powered_rail',
|
||
|
'minecraft:detector_rail',
|
||
|
'minecraft:grass',
|
||
|
'minecraft:fern',
|
||
|
'minecraft:dead_bush',
|
||
|
'minecraft:seagrass',
|
||
|
'minecraft:tall_seagrass',
|
||
|
'minecraft:dandelion',
|
||
|
'minecraft:poppy',
|
||
|
'minecraft:blue_orchid',
|
||
|
'minecraft:allium',
|
||
|
'minecraft:azure_bluet',
|
||
|
'minecraft:red_tulip',
|
||
|
'minecraft:orange_tulip',
|
||
|
'minecraft:white_tulip',
|
||
|
'minecraft:pink_tulip',
|
||
|
'minecraft:oxeye_daisy',
|
||
|
'minecraft:cornflower',
|
||
|
'minecraft:wither_rose',
|
||
|
'minecraft:lily_of_the_valley',
|
||
|
'minecraft:brown_mushroom',
|
||
|
'minecraft:red_mushroom',
|
||
|
'minecraft:torch',
|
||
|
'minecraft:wall_torch',
|
||
|
'minecraft:redstone_wire',
|
||
|
'minecraft:wheat',
|
||
|
'minecraft:oak_sign',
|
||
|
'minecraft:spruce_sign',
|
||
|
'minecraft:birch_sign',
|
||
|
'minecraft:acacia_sign',
|
||
|
'minecraft:jungle_sign',
|
||
|
'minecraft:dark_oak_sign',
|
||
|
'minecraft:rail',
|
||
|
'minecraft:oak_wall_sign',
|
||
|
'minecraft:spruce_wall_sign',
|
||
|
'minecraft:birch_wall_sign',
|
||
|
'minecraft:acacia_wall_sign',
|
||
|
'minecraft:jungle_wall_sign',
|
||
|
'minecraft:dark_oak_wall_sign',
|
||
|
'minecraft:lever',
|
||
|
'minecraft:stone_pressure_plate',
|
||
|
'minecraft:oak_pressure_plate',
|
||
|
'minecraft:spruce_pressure_plate',
|
||
|
'minecraft:birch_pressure_plate',
|
||
|
'minecraft:jungle_pressure_plate',
|
||
|
'minecraft:acacia_pressure_plate',
|
||
|
'minecraft:dark_oak_pressure_plate',
|
||
|
'minecraft:redstone_torch',
|
||
|
'minecraft:redstone_wall_torch',
|
||
|
'minecraft:stone_button',
|
||
|
'minecraft:sugar_cane',
|
||
|
'minecraft:repeater',
|
||
|
'minecraft:attached_pumpkin_stem',
|
||
|
'minecraft:attached_melon_stem',
|
||
|
'minecraft:pumpkin_stem',
|
||
|
'minecraft:melon_stem',
|
||
|
'minecraft:nether_wart',
|
||
|
'minecraft:tripwire_hook',
|
||
|
'minecraft:tripwire',
|
||
|
'minecraft:carrots',
|
||
|
'minecraft:potatoes',
|
||
|
'minecraft:oak_button',
|
||
|
'minecraft:spruce_button',
|
||
|
'minecraft:birch_button',
|
||
|
'minecraft:jungle_button',
|
||
|
'minecraft:acacia_button',
|
||
|
'minecraft:dark_oak_button',
|
||
|
'minecraft:light_weighted_pressure_plate',
|
||
|
'minecraft:heavy_weighted_pressure_plate',
|
||
|
'minecraft:comparator',
|
||
|
'minecraft:activator_rail',
|
||
|
'minecraft:white_carpet',
|
||
|
'minecraft:orange_carpet',
|
||
|
'minecraft:magenta_carpet',
|
||
|
'minecraft:light_blue_carpet',
|
||
|
'minecraft:yellow_carpet',
|
||
|
'minecraft:lime_carpet',
|
||
|
'minecraft:pink_carpet',
|
||
|
'minecraft:gray_carpet',
|
||
|
'minecraft:light_gray_carpet',
|
||
|
'minecraft:cyan_carpet',
|
||
|
'minecraft:purple_carpet',
|
||
|
'minecraft:blue_carpet',
|
||
|
'minecraft:brown_carpet',
|
||
|
'minecraft:green_carpet',
|
||
|
'minecraft:red_carpet',
|
||
|
'minecraft:black_carpet',
|
||
|
'minecraft:sunflower',
|
||
|
'minecraft:lilac',
|
||
|
'minecraft:rose_bush',
|
||
|
'minecraft:peony',
|
||
|
'minecraft:tall_grass',
|
||
|
'minecraft:large_fern',
|
||
|
'minecraft:white_banner',
|
||
|
'minecraft:orange_banner',
|
||
|
'minecraft:magenta_banner',
|
||
|
'minecraft:light_blue_banner',
|
||
|
'minecraft:yellow_banner',
|
||
|
'minecraft:lime_banner',
|
||
|
'minecraft:pink_banner',
|
||
|
'minecraft:gray_banner',
|
||
|
'minecraft:light_gray_banner',
|
||
|
'minecraft:cyan_banner',
|
||
|
'minecraft:purple_banner',
|
||
|
'minecraft:blue_banner',
|
||
|
'minecraft:brown_banner',
|
||
|
'minecraft:green_banner',
|
||
|
'minecraft:red_banner',
|
||
|
'minecraft:black_banner',
|
||
|
'minecraft:white_wall_banner',
|
||
|
'minecraft:orange_wall_banner',
|
||
|
'minecraft:magenta_wall_banner',
|
||
|
'minecraft:light_blue_wall_banner',
|
||
|
'minecraft:yellow_wall_banner',
|
||
|
'minecraft:lime_wall_banner',
|
||
|
'minecraft:pink_wall_banner',
|
||
|
'minecraft:gray_wall_banner',
|
||
|
'minecraft:light_gray_wall_banner',
|
||
|
'minecraft:cyan_wall_banner',
|
||
|
'minecraft:purple_wall_banner',
|
||
|
'minecraft:blue_wall_banner',
|
||
|
'minecraft:brown_wall_banner',
|
||
|
'minecraft:green_wall_banner',
|
||
|
'minecraft:red_wall_banner',
|
||
|
'minecraft:black_wall_banner',
|
||
|
'minecraft:beetroots',
|
||
|
'minecraft:bamboo_sapling',
|
||
|
'minecraft:void_air',
|
||
|
'minecraft:cave_air',
|
||
|
'minecraft:lantern',
|
||
|
]
|
||
|
SINGLE_SNOW = 3919
|
||
|
|
||
|
NON_SOLID_IDS = [SINGLE_SNOW]
|
||
|
for block_name in NON_SOLID:
|
||
|
for state in BLOCKS[block_name]['states']:
|
||
|
NON_SOLID_IDS.append(state['id'])
|
||
|
|
||
|
AVOID_IDS = []
|
||
|
for block_name in AVOID:
|
||
|
for state in BLOCKS[block_name]['states']:
|
||
|
AVOID_IDS.append(state['id'])
|