Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save more tokens by adding fill placing type #26

Merged
merged 1 commit into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 250 additions & 0 deletions block_id_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
minecraft:air
minecraft:stone
minecraft:granite
minecraft:polished_granite
minecraft:diorite
minecraft:polished_diorite
minecraft:andesite
minecraft:polished_andesite
minecraft:grass_block
minecraft:dirt
minecraft:coarse_dirt
minecraft:podzol
minecraft:cobblestone
minecraft:oak_planks
minecraft:spruce_planks
minecraft:birch_planks
minecraft:jungle_planks
minecraft:acacia_planks
minecraft:dark_oak_planks
minecraft:mangrove_planks
minecraft:crimson_planks
minecraft:warped_planks
minecraft:bamboo_planks
minecraft:oak_sapling
minecraft:spruce_sapling
minecraft:birch_sapling
minecraft:jungle_sapling
minecraft:acacia_sapling
minecraft:dark_oak_sapling
minecraft:mangrove_propagule
minecraft:bedrock
minecraft:sand
minecraft:red_sand
minecraft:gravel
minecraft:gold_ore
minecraft:deepslate_gold_ore
minecraft:iron_ore
minecraft:deepslate_iron_ore
minecraft:coal_ore
minecraft:deepslate_coal_ore
minecraft:nether_gold_ore
minecraft:oak_log
minecraft:spruce_log
minecraft:birch_log
minecraft:jungle_log
minecraft:acacia_log
minecraft:dark_oak_log
minecraft:mangrove_log
minecraft:crimson_stem
minecraft:warped_stem
minecraft:bamboo_block
minecraft:oak_leaves
minecraft:spruce_leaves
minecraft:birch_leaves
minecraft:jungle_leaves
minecraft:acacia_leaves
minecraft:dark_oak_leaves
minecraft:mangrove_leaves
minecraft:azalea_leaves
minecraft:flowering_azalea_leaves
minecraft:sponge
minecraft:wet_sponge
minecraft:glass
minecraft:tinted_glass
minecraft:lapis_ore
minecraft:deepslate_lapis_ore
minecraft:lapis_block
minecraft:dispenser
minecraft:sandstone
minecraft:chiseled_sandstone
minecraft:cut_sandstone
minecraft:note_block
minecraft:white_bed
minecraft:orange_bed
minecraft:magenta_bed
minecraft:light_blue_bed
minecraft:yellow_bed
minecraft:lime_bed
minecraft:pink_bed
minecraft:gray_bed
minecraft:light_gray_bed
minecraft:cyan_bed
minecraft:purple_bed
minecraft:blue_bed
minecraft:brown_bed
minecraft:green_bed
minecraft:red_bed
minecraft:black_bed
minecraft:powered_rail
minecraft:detector_rail
minecraft:sticky_piston
minecraft:cobweb
minecraft:grass
minecraft:fern
minecraft:dead_bush
minecraft:seagrass
minecraft:tall_seagrass
minecraft:sea_pickle
minecraft:piston
minecraft:white_wool
minecraft:orange_wool
minecraft:magenta_wool
minecraft:light_blue_wool
minecraft:yellow_wool
minecraft:lime_wool
minecraft:pink_wool
minecraft:gray_wool
minecraft:light_gray_wool
minecraft:cyan_wool
minecraft:purple_wool
minecraft:blue_wool
minecraft:brown_wool
minecraft:green_wool
minecraft:red_wool
minecraft:black_wool
minecraft:moving_piston
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:lily_of_the_valley
minecraft:wither_rose
minecraft:spore_blossom
minecraft:brown_mushroom
minecraft:red_mushroom
minecraft:crimson_fungus
minecraft:warped_fungus
minecraft:crimson_roots
minecraft:warped_roots
minecraft:nether_sprouts
minecraft:weeping_vines
minecraft:twisting_vines
minecraft:sugar_cane
minecraft:kelp
minecraft:moss_carpet
minecraft:moss_block
minecraft:flowering_azalea
minecraft:azalea
minecraft:hay_block
minecraft:terracotta
minecraft:white_terracotta
minecraft:orange_terracotta
minecraft:magenta_terracotta
minecraft:light_blue_terracotta
minecraft:yellow_terracotta
minecraft:lime_terracotta
minecraft:pink_terracotta
minecraft:gray_terracotta
minecraft:light_gray_terracotta
minecraft:cyan_terracotta
minecraft:purple_terracotta
minecraft:blue_terracotta
minecraft:brown_terracotta
minecraft:green_terracotta
minecraft:red_terracotta
minecraft:black_terracotta
minecraft:barrel
minecraft:smoker
minecraft:blast_furnace
minecraft:cartography_table
minecraft:fletching_table
minecraft:grindstone
minecraft:lectern
minecraft:loom
minecraft:smithing_table
minecraft:stonecutter
minecraft:bell
minecraft:lantern
minecraft:soul_lantern
minecraft:campfire
minecraft:soul_campfire
minecraft:shroomlight
minecraft:bee_nest
minecraft:beehive
minecraft:honey_block
minecraft:honeycomb_block
minecraft:lodestone
minecraft:crying_obsidian
minecraft:respawn_anchor
minecraft:ancient_debris
minecraft:netherite_block
minecraft:blackstone
minecraft:blackstone_slab
minecraft:blackstone_stairs
minecraft:gilded_blackstone
minecraft:polished_blackstone
minecraft:polished_blackstone_slab
minecraft:polished_blackstone_stairs
minecraft:chiseled_polished_blackstone
minecraft:polished_blackstone_bricks
minecraft:polished_blackstone_brick_slab
minecraft:polished_blackstone_brick_stairs
minecraft:cracked_polished_blackstone_bricks
minecraft:respawn_anchor
minecraft:crying_obsidian
minecraft:ancient_debris
minecraft:netherite_block
minecraft:blackstone
minecraft:blackstone_slab
minecraft:blackstone_stairs
minecraft:gilded_blackstone
minecraft:polished_blackstone
minecraft:polished_blackstone_slab
minecraft:polished_blackstone_stairs
minecraft:chiseled_polished_blackstone
minecraft:polished_blackstone_bricks
minecraft:polished_blackstone_brick_slab
minecraft:polished_blackstone_brick_stairs
minecraft:cracked_polished_blackstone_bricks
minecraft:soul_soil
minecraft:budding_amethyst
minecraft:amethyst_block
minecraft:amethyst_cluster
minecraft:small_amethyst_bud
minecraft:medium_amethyst_bud
minecraft:large_amethyst_bud
minecraft:calcite
minecraft:tuff
minecraft:deepslate
minecraft:cobbled_deepslate
minecraft:polished_deepslate
minecraft:deepslate_bricks
minecraft:cracked_deepslate_bricks
minecraft:deepslate_tiles
minecraft:cracked_deepslate_tiles
minecraft:chiseled_deepslate
minecraft:infested_deepslate
minecraft:cobbled_deepslate_stairs
minecraft:cobbled_deepslate_slab
minecraft:cobbled_deepslate_wall
minecraft:polished_deepslate_stairs
minecraft:polished_deepslate_slab
minecraft:polished_deepslate_wall
minecraft:deepslate_brick_stairs
minecraft:deepslate_brick_slab
minecraft:deepslate_brick_wall
minecraft:deepslate_tile_stairs
minecraft:deepslate_tile_slab
minecraft:deepslate_tile_wall
minecraft:chiseled_bookshelf
minecraft:bamboo_mosaic
minecraft:bamboo_mosaic_slab
minecraft:bamboo_mosaic_stairs
11 changes: 6 additions & 5 deletions browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from playwright.sync_api import Playwright, sync_playwright, expect


def run(playwright: Playwright, progress_bar: str=None) -> None:
def run(playwright: Playwright, progress_bar: str=None, is_headless: bool=True) -> None:
def set_progress(progress):
if progress_bar is not None:
progress_bar.set(progress)

browser = playwright.chromium.launch(headless=True)
browser = playwright.chromium.launch(headless=is_headless)

set_progress(25)

Expand Down Expand Up @@ -46,10 +46,11 @@ def set_progress(progress):

download = download_info.value
download.save_as("temp/screenshot.png")
page.close()

context.close()
browser.close()
if is_headless:
page.close()
context.close()
browser.close()

set_progress(90)

Expand Down
Loading