plancraft 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- plancraft/__init__.py +0 -0
- plancraft/config.py +155 -0
- plancraft/environments/__init__.py +0 -0
- plancraft/environments/actions.py +218 -0
- plancraft/environments/constants.json +64582 -0
- plancraft/environments/env_real.py +316 -0
- plancraft/environments/env_symbolic.py +212 -0
- plancraft/environments/items.py +10 -0
- plancraft/environments/planner.py +109 -0
- plancraft/environments/recipes/acacia_boat.json +16 -0
- plancraft/environments/recipes/acacia_button.json +12 -0
- plancraft/environments/recipes/acacia_door.json +18 -0
- plancraft/environments/recipes/acacia_fence.json +20 -0
- plancraft/environments/recipes/acacia_fence_gate.json +19 -0
- plancraft/environments/recipes/acacia_planks.json +13 -0
- plancraft/environments/recipes/acacia_pressure_plate.json +15 -0
- plancraft/environments/recipes/acacia_sign.json +21 -0
- plancraft/environments/recipes/acacia_slab.json +16 -0
- plancraft/environments/recipes/acacia_stairs.json +18 -0
- plancraft/environments/recipes/acacia_trapdoor.json +17 -0
- plancraft/environments/recipes/acacia_wood.json +17 -0
- plancraft/environments/recipes/activator_rail.json +23 -0
- plancraft/environments/recipes/andesite.json +15 -0
- plancraft/environments/recipes/andesite_slab.json +15 -0
- plancraft/environments/recipes/andesite_slab_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/andesite_stairs.json +17 -0
- plancraft/environments/recipes/andesite_stairs_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/andesite_wall.json +16 -0
- plancraft/environments/recipes/andesite_wall_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/anvil.json +19 -0
- plancraft/environments/recipes/armor_dye.json +3 -0
- plancraft/environments/recipes/armor_stand.json +19 -0
- plancraft/environments/recipes/arrow.json +23 -0
- plancraft/environments/recipes/baked_potato.json +9 -0
- plancraft/environments/recipes/baked_potato_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/baked_potato_from_smoking.json +9 -0
- plancraft/environments/recipes/banner_duplicate.json +3 -0
- plancraft/environments/recipes/barrel.json +19 -0
- plancraft/environments/recipes/beacon.json +22 -0
- plancraft/environments/recipes/beehive.json +19 -0
- plancraft/environments/recipes/beetroot_soup.json +29 -0
- plancraft/environments/recipes/birch_boat.json +16 -0
- plancraft/environments/recipes/birch_button.json +12 -0
- plancraft/environments/recipes/birch_door.json +18 -0
- plancraft/environments/recipes/birch_fence.json +20 -0
- plancraft/environments/recipes/birch_fence_gate.json +19 -0
- plancraft/environments/recipes/birch_planks.json +13 -0
- plancraft/environments/recipes/birch_pressure_plate.json +15 -0
- plancraft/environments/recipes/birch_sign.json +21 -0
- plancraft/environments/recipes/birch_slab.json +16 -0
- plancraft/environments/recipes/birch_stairs.json +18 -0
- plancraft/environments/recipes/birch_trapdoor.json +17 -0
- plancraft/environments/recipes/birch_wood.json +17 -0
- plancraft/environments/recipes/black_banner.json +20 -0
- plancraft/environments/recipes/black_bed.json +19 -0
- plancraft/environments/recipes/black_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/black_carpet.json +16 -0
- plancraft/environments/recipes/black_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/black_concrete_powder.json +37 -0
- plancraft/environments/recipes/black_dye.json +12 -0
- plancraft/environments/recipes/black_dye_from_wither_rose.json +12 -0
- plancraft/environments/recipes/black_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/black_stained_glass.json +21 -0
- plancraft/environments/recipes/black_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/black_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/black_terracotta.json +21 -0
- plancraft/environments/recipes/black_wool.json +15 -0
- plancraft/environments/recipes/blackstone_slab.json +15 -0
- plancraft/environments/recipes/blackstone_slab_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/blackstone_stairs.json +17 -0
- plancraft/environments/recipes/blackstone_stairs_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/blackstone_wall.json +16 -0
- plancraft/environments/recipes/blackstone_wall_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/blast_furnace.json +22 -0
- plancraft/environments/recipes/blaze_powder.json +12 -0
- plancraft/environments/recipes/blue_banner.json +20 -0
- plancraft/environments/recipes/blue_bed.json +19 -0
- plancraft/environments/recipes/blue_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/blue_carpet.json +16 -0
- plancraft/environments/recipes/blue_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/blue_concrete_powder.json +37 -0
- plancraft/environments/recipes/blue_dye.json +12 -0
- plancraft/environments/recipes/blue_dye_from_cornflower.json +12 -0
- plancraft/environments/recipes/blue_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/blue_ice.json +16 -0
- plancraft/environments/recipes/blue_stained_glass.json +21 -0
- plancraft/environments/recipes/blue_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/blue_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/blue_terracotta.json +21 -0
- plancraft/environments/recipes/blue_wool.json +15 -0
- plancraft/environments/recipes/bone_block.json +16 -0
- plancraft/environments/recipes/bone_meal.json +13 -0
- plancraft/environments/recipes/bone_meal_from_bone_block.json +13 -0
- plancraft/environments/recipes/book.json +20 -0
- plancraft/environments/recipes/book_cloning.json +3 -0
- plancraft/environments/recipes/bookshelf.json +19 -0
- plancraft/environments/recipes/bow.json +19 -0
- plancraft/environments/recipes/bowl.json +16 -0
- plancraft/environments/recipes/bread.json +14 -0
- plancraft/environments/recipes/brewing_stand.json +18 -0
- plancraft/environments/recipes/brick.json +9 -0
- plancraft/environments/recipes/brick_slab.json +15 -0
- plancraft/environments/recipes/brick_slab_from_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/brick_stairs.json +17 -0
- plancraft/environments/recipes/brick_stairs_from_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/brick_wall.json +16 -0
- plancraft/environments/recipes/brick_wall_from_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/bricks.json +15 -0
- plancraft/environments/recipes/brown_banner.json +20 -0
- plancraft/environments/recipes/brown_bed.json +19 -0
- plancraft/environments/recipes/brown_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/brown_carpet.json +16 -0
- plancraft/environments/recipes/brown_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/brown_concrete_powder.json +37 -0
- plancraft/environments/recipes/brown_dye.json +12 -0
- plancraft/environments/recipes/brown_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/brown_stained_glass.json +21 -0
- plancraft/environments/recipes/brown_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/brown_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/brown_terracotta.json +21 -0
- plancraft/environments/recipes/brown_wool.json +15 -0
- plancraft/environments/recipes/bucket.json +15 -0
- plancraft/environments/recipes/cake.json +25 -0
- plancraft/environments/recipes/campfire.json +22 -0
- plancraft/environments/recipes/carrot_on_a_stick.json +18 -0
- plancraft/environments/recipes/cartography_table.json +19 -0
- plancraft/environments/recipes/cauldron.json +16 -0
- plancraft/environments/recipes/chain.json +19 -0
- plancraft/environments/recipes/charcoal.json +9 -0
- plancraft/environments/recipes/chest.json +16 -0
- plancraft/environments/recipes/chest_minecart.json +18 -0
- plancraft/environments/recipes/chiseled_nether_bricks.json +15 -0
- plancraft/environments/recipes/chiseled_nether_bricks_from_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_polished_blackstone.json +15 -0
- plancraft/environments/recipes/chiseled_polished_blackstone_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_polished_blackstone_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_quartz_block.json +15 -0
- plancraft/environments/recipes/chiseled_quartz_block_from_quartz_block_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_red_sandstone.json +15 -0
- plancraft/environments/recipes/chiseled_red_sandstone_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_sandstone.json +15 -0
- plancraft/environments/recipes/chiseled_sandstone_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_stone_bricks.json +15 -0
- plancraft/environments/recipes/chiseled_stone_bricks_from_stone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/chiseled_stone_bricks_stone_from_stonecutting.json +8 -0
- plancraft/environments/recipes/clay.json +15 -0
- plancraft/environments/recipes/clock.json +19 -0
- plancraft/environments/recipes/coal.json +12 -0
- plancraft/environments/recipes/coal_block.json +16 -0
- plancraft/environments/recipes/coal_from_blasting.json +9 -0
- plancraft/environments/recipes/coal_from_smelting.json +9 -0
- plancraft/environments/recipes/coarse_dirt.json +19 -0
- plancraft/environments/recipes/cobblestone_slab.json +15 -0
- plancraft/environments/recipes/cobblestone_slab_from_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/cobblestone_stairs.json +17 -0
- plancraft/environments/recipes/cobblestone_stairs_from_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/cobblestone_wall.json +16 -0
- plancraft/environments/recipes/cobblestone_wall_from_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/comparator.json +22 -0
- plancraft/environments/recipes/compass.json +19 -0
- plancraft/environments/recipes/composter.json +16 -0
- plancraft/environments/recipes/conduit.json +19 -0
- plancraft/environments/recipes/cooked_beef.json +9 -0
- plancraft/environments/recipes/cooked_beef_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_beef_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_chicken.json +9 -0
- plancraft/environments/recipes/cooked_chicken_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_chicken_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_cod.json +9 -0
- plancraft/environments/recipes/cooked_cod_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_cod_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_mutton.json +9 -0
- plancraft/environments/recipes/cooked_mutton_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_mutton_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_porkchop.json +9 -0
- plancraft/environments/recipes/cooked_porkchop_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_porkchop_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_rabbit.json +9 -0
- plancraft/environments/recipes/cooked_rabbit_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_rabbit_from_smoking.json +9 -0
- plancraft/environments/recipes/cooked_salmon.json +9 -0
- plancraft/environments/recipes/cooked_salmon_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/cooked_salmon_from_smoking.json +9 -0
- plancraft/environments/recipes/cookie.json +18 -0
- plancraft/environments/recipes/cracked_nether_bricks.json +9 -0
- plancraft/environments/recipes/cracked_polished_blackstone_bricks.json +9 -0
- plancraft/environments/recipes/cracked_stone_bricks.json +9 -0
- plancraft/environments/recipes/crafting_table.json +15 -0
- plancraft/environments/recipes/creeper_banner_pattern.json +14 -0
- plancraft/environments/recipes/crimson_button.json +12 -0
- plancraft/environments/recipes/crimson_door.json +18 -0
- plancraft/environments/recipes/crimson_fence.json +20 -0
- plancraft/environments/recipes/crimson_fence_gate.json +19 -0
- plancraft/environments/recipes/crimson_hyphae.json +17 -0
- plancraft/environments/recipes/crimson_planks.json +13 -0
- plancraft/environments/recipes/crimson_pressure_plate.json +15 -0
- plancraft/environments/recipes/crimson_sign.json +21 -0
- plancraft/environments/recipes/crimson_slab.json +16 -0
- plancraft/environments/recipes/crimson_stairs.json +18 -0
- plancraft/environments/recipes/crimson_trapdoor.json +17 -0
- plancraft/environments/recipes/crossbow.json +25 -0
- plancraft/environments/recipes/cut_red_sandstone.json +16 -0
- plancraft/environments/recipes/cut_red_sandstone_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cut_red_sandstone_slab.json +15 -0
- plancraft/environments/recipes/cut_red_sandstone_slab_from_cut_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cut_red_sandstone_slab_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cut_sandstone.json +16 -0
- plancraft/environments/recipes/cut_sandstone_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cut_sandstone_slab.json +15 -0
- plancraft/environments/recipes/cut_sandstone_slab_from_cut_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cut_sandstone_slab_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/cyan_banner.json +20 -0
- plancraft/environments/recipes/cyan_bed.json +19 -0
- plancraft/environments/recipes/cyan_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/cyan_carpet.json +16 -0
- plancraft/environments/recipes/cyan_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/cyan_concrete_powder.json +37 -0
- plancraft/environments/recipes/cyan_dye.json +15 -0
- plancraft/environments/recipes/cyan_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/cyan_stained_glass.json +21 -0
- plancraft/environments/recipes/cyan_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/cyan_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/cyan_terracotta.json +21 -0
- plancraft/environments/recipes/cyan_wool.json +15 -0
- plancraft/environments/recipes/dark_oak_boat.json +16 -0
- plancraft/environments/recipes/dark_oak_button.json +12 -0
- plancraft/environments/recipes/dark_oak_door.json +18 -0
- plancraft/environments/recipes/dark_oak_fence.json +20 -0
- plancraft/environments/recipes/dark_oak_fence_gate.json +19 -0
- plancraft/environments/recipes/dark_oak_planks.json +13 -0
- plancraft/environments/recipes/dark_oak_pressure_plate.json +15 -0
- plancraft/environments/recipes/dark_oak_sign.json +21 -0
- plancraft/environments/recipes/dark_oak_slab.json +16 -0
- plancraft/environments/recipes/dark_oak_stairs.json +18 -0
- plancraft/environments/recipes/dark_oak_trapdoor.json +17 -0
- plancraft/environments/recipes/dark_oak_wood.json +17 -0
- plancraft/environments/recipes/dark_prismarine.json +19 -0
- plancraft/environments/recipes/dark_prismarine_slab.json +15 -0
- plancraft/environments/recipes/dark_prismarine_slab_from_dark_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/dark_prismarine_stairs.json +17 -0
- plancraft/environments/recipes/dark_prismarine_stairs_from_dark_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/daylight_detector.json +22 -0
- plancraft/environments/recipes/detector_rail.json +23 -0
- plancraft/environments/recipes/diamond.json +12 -0
- plancraft/environments/recipes/diamond_axe.json +19 -0
- plancraft/environments/recipes/diamond_block.json +16 -0
- plancraft/environments/recipes/diamond_boots.json +15 -0
- plancraft/environments/recipes/diamond_chestplate.json +16 -0
- plancraft/environments/recipes/diamond_from_blasting.json +9 -0
- plancraft/environments/recipes/diamond_from_smelting.json +9 -0
- plancraft/environments/recipes/diamond_helmet.json +15 -0
- plancraft/environments/recipes/diamond_hoe.json +19 -0
- plancraft/environments/recipes/diamond_leggings.json +16 -0
- plancraft/environments/recipes/diamond_pickaxe.json +19 -0
- plancraft/environments/recipes/diamond_shovel.json +19 -0
- plancraft/environments/recipes/diamond_sword.json +19 -0
- plancraft/environments/recipes/diorite.json +19 -0
- plancraft/environments/recipes/diorite_slab.json +15 -0
- plancraft/environments/recipes/diorite_slab_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/diorite_stairs.json +17 -0
- plancraft/environments/recipes/diorite_stairs_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/diorite_wall.json +16 -0
- plancraft/environments/recipes/diorite_wall_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/dispenser.json +22 -0
- plancraft/environments/recipes/dried_kelp.json +12 -0
- plancraft/environments/recipes/dried_kelp_block.json +35 -0
- plancraft/environments/recipes/dried_kelp_from_campfire_cooking.json +9 -0
- plancraft/environments/recipes/dried_kelp_from_smelting.json +9 -0
- plancraft/environments/recipes/dried_kelp_from_smoking.json +9 -0
- plancraft/environments/recipes/dropper.json +19 -0
- plancraft/environments/recipes/emerald.json +12 -0
- plancraft/environments/recipes/emerald_block.json +16 -0
- plancraft/environments/recipes/emerald_from_blasting.json +9 -0
- plancraft/environments/recipes/emerald_from_smelting.json +9 -0
- plancraft/environments/recipes/enchanting_table.json +22 -0
- plancraft/environments/recipes/end_crystal.json +22 -0
- plancraft/environments/recipes/end_rod.json +19 -0
- plancraft/environments/recipes/end_stone_brick_slab.json +15 -0
- plancraft/environments/recipes/end_stone_brick_slab_from_end_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_brick_slab_from_end_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_brick_stairs.json +17 -0
- plancraft/environments/recipes/end_stone_brick_stairs_from_end_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_brick_stairs_from_end_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_brick_wall.json +16 -0
- plancraft/environments/recipes/end_stone_brick_wall_from_end_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_brick_wall_from_end_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/end_stone_bricks.json +16 -0
- plancraft/environments/recipes/end_stone_bricks_from_end_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/ender_chest.json +19 -0
- plancraft/environments/recipes/ender_eye.json +14 -0
- plancraft/environments/recipes/fermented_spider_eye.json +17 -0
- plancraft/environments/recipes/fire_charge.json +23 -0
- plancraft/environments/recipes/firework_rocket.json +3 -0
- plancraft/environments/recipes/firework_star.json +3 -0
- plancraft/environments/recipes/firework_star_fade.json +3 -0
- plancraft/environments/recipes/fishing_rod.json +19 -0
- plancraft/environments/recipes/fletching_table.json +19 -0
- plancraft/environments/recipes/flint_and_steel.json +14 -0
- plancraft/environments/recipes/flower_banner_pattern.json +14 -0
- plancraft/environments/recipes/flower_pot.json +15 -0
- plancraft/environments/recipes/furnace.json +16 -0
- plancraft/environments/recipes/furnace_minecart.json +18 -0
- plancraft/environments/recipes/glass.json +9 -0
- plancraft/environments/recipes/glass_bottle.json +16 -0
- plancraft/environments/recipes/glass_pane.json +16 -0
- plancraft/environments/recipes/glistering_melon_slice.json +19 -0
- plancraft/environments/recipes/glowstone.json +15 -0
- plancraft/environments/recipes/gold_block.json +16 -0
- plancraft/environments/recipes/gold_ingot.json +9 -0
- plancraft/environments/recipes/gold_ingot_from_blasting.json +9 -0
- plancraft/environments/recipes/gold_ingot_from_gold_block.json +13 -0
- plancraft/environments/recipes/gold_ingot_from_nuggets.json +17 -0
- plancraft/environments/recipes/gold_nugget.json +12 -0
- plancraft/environments/recipes/gold_nugget_from_blasting.json +38 -0
- plancraft/environments/recipes/gold_nugget_from_smelting.json +38 -0
- plancraft/environments/recipes/golden_apple.json +19 -0
- plancraft/environments/recipes/golden_axe.json +19 -0
- plancraft/environments/recipes/golden_boots.json +15 -0
- plancraft/environments/recipes/golden_carrot.json +19 -0
- plancraft/environments/recipes/golden_chestplate.json +16 -0
- plancraft/environments/recipes/golden_helmet.json +15 -0
- plancraft/environments/recipes/golden_hoe.json +19 -0
- plancraft/environments/recipes/golden_leggings.json +16 -0
- plancraft/environments/recipes/golden_pickaxe.json +19 -0
- plancraft/environments/recipes/golden_shovel.json +19 -0
- plancraft/environments/recipes/golden_sword.json +19 -0
- plancraft/environments/recipes/granite.json +14 -0
- plancraft/environments/recipes/granite_slab.json +15 -0
- plancraft/environments/recipes/granite_slab_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/granite_stairs.json +17 -0
- plancraft/environments/recipes/granite_stairs_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/granite_wall.json +16 -0
- plancraft/environments/recipes/granite_wall_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/gray_banner.json +20 -0
- plancraft/environments/recipes/gray_bed.json +19 -0
- plancraft/environments/recipes/gray_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/gray_carpet.json +16 -0
- plancraft/environments/recipes/gray_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/gray_concrete_powder.json +37 -0
- plancraft/environments/recipes/gray_dye.json +15 -0
- plancraft/environments/recipes/gray_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/gray_stained_glass.json +21 -0
- plancraft/environments/recipes/gray_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/gray_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/gray_terracotta.json +21 -0
- plancraft/environments/recipes/gray_wool.json +15 -0
- plancraft/environments/recipes/green_banner.json +20 -0
- plancraft/environments/recipes/green_bed.json +19 -0
- plancraft/environments/recipes/green_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/green_carpet.json +16 -0
- plancraft/environments/recipes/green_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/green_concrete_powder.json +37 -0
- plancraft/environments/recipes/green_dye.json +9 -0
- plancraft/environments/recipes/green_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/green_stained_glass.json +21 -0
- plancraft/environments/recipes/green_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/green_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/green_terracotta.json +21 -0
- plancraft/environments/recipes/green_wool.json +15 -0
- plancraft/environments/recipes/grindstone.json +21 -0
- plancraft/environments/recipes/hay_block.json +16 -0
- plancraft/environments/recipes/heavy_weighted_pressure_plate.json +14 -0
- plancraft/environments/recipes/honey_block.json +15 -0
- plancraft/environments/recipes/honey_bottle.json +24 -0
- plancraft/environments/recipes/honeycomb_block.json +15 -0
- plancraft/environments/recipes/hopper.json +19 -0
- plancraft/environments/recipes/hopper_minecart.json +18 -0
- plancraft/environments/recipes/iron_axe.json +19 -0
- plancraft/environments/recipes/iron_bars.json +16 -0
- plancraft/environments/recipes/iron_block.json +16 -0
- plancraft/environments/recipes/iron_boots.json +15 -0
- plancraft/environments/recipes/iron_chestplate.json +16 -0
- plancraft/environments/recipes/iron_door.json +17 -0
- plancraft/environments/recipes/iron_helmet.json +15 -0
- plancraft/environments/recipes/iron_hoe.json +19 -0
- plancraft/environments/recipes/iron_ingot.json +9 -0
- plancraft/environments/recipes/iron_ingot_from_blasting.json +9 -0
- plancraft/environments/recipes/iron_ingot_from_iron_block.json +13 -0
- plancraft/environments/recipes/iron_ingot_from_nuggets.json +17 -0
- plancraft/environments/recipes/iron_leggings.json +16 -0
- plancraft/environments/recipes/iron_nugget.json +12 -0
- plancraft/environments/recipes/iron_nugget_from_blasting.json +50 -0
- plancraft/environments/recipes/iron_nugget_from_smelting.json +50 -0
- plancraft/environments/recipes/iron_pickaxe.json +19 -0
- plancraft/environments/recipes/iron_shovel.json +19 -0
- plancraft/environments/recipes/iron_sword.json +19 -0
- plancraft/environments/recipes/iron_trapdoor.json +15 -0
- plancraft/environments/recipes/item_frame.json +19 -0
- plancraft/environments/recipes/jack_o_lantern.json +18 -0
- plancraft/environments/recipes/jukebox.json +19 -0
- plancraft/environments/recipes/jungle_boat.json +16 -0
- plancraft/environments/recipes/jungle_button.json +12 -0
- plancraft/environments/recipes/jungle_door.json +18 -0
- plancraft/environments/recipes/jungle_fence.json +20 -0
- plancraft/environments/recipes/jungle_fence_gate.json +19 -0
- plancraft/environments/recipes/jungle_planks.json +13 -0
- plancraft/environments/recipes/jungle_pressure_plate.json +15 -0
- plancraft/environments/recipes/jungle_sign.json +21 -0
- plancraft/environments/recipes/jungle_slab.json +16 -0
- plancraft/environments/recipes/jungle_stairs.json +18 -0
- plancraft/environments/recipes/jungle_trapdoor.json +17 -0
- plancraft/environments/recipes/jungle_wood.json +17 -0
- plancraft/environments/recipes/ladder.json +17 -0
- plancraft/environments/recipes/lantern.json +19 -0
- plancraft/environments/recipes/lapis_block.json +16 -0
- plancraft/environments/recipes/lapis_from_blasting.json +9 -0
- plancraft/environments/recipes/lapis_from_smelting.json +9 -0
- plancraft/environments/recipes/lapis_lazuli.json +12 -0
- plancraft/environments/recipes/lead.json +20 -0
- plancraft/environments/recipes/leather.json +15 -0
- plancraft/environments/recipes/leather_boots.json +15 -0
- plancraft/environments/recipes/leather_chestplate.json +16 -0
- plancraft/environments/recipes/leather_helmet.json +15 -0
- plancraft/environments/recipes/leather_horse_armor.json +16 -0
- plancraft/environments/recipes/leather_leggings.json +16 -0
- plancraft/environments/recipes/lectern.json +19 -0
- plancraft/environments/recipes/lever.json +18 -0
- plancraft/environments/recipes/light_blue_banner.json +20 -0
- plancraft/environments/recipes/light_blue_bed.json +19 -0
- plancraft/environments/recipes/light_blue_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/light_blue_carpet.json +16 -0
- plancraft/environments/recipes/light_blue_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/light_blue_concrete_powder.json +37 -0
- plancraft/environments/recipes/light_blue_dye_from_blue_orchid.json +12 -0
- plancraft/environments/recipes/light_blue_dye_from_blue_white_dye.json +16 -0
- plancraft/environments/recipes/light_blue_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/light_blue_stained_glass.json +21 -0
- plancraft/environments/recipes/light_blue_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/light_blue_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/light_blue_terracotta.json +21 -0
- plancraft/environments/recipes/light_blue_wool.json +15 -0
- plancraft/environments/recipes/light_gray_banner.json +20 -0
- plancraft/environments/recipes/light_gray_bed.json +19 -0
- plancraft/environments/recipes/light_gray_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/light_gray_carpet.json +16 -0
- plancraft/environments/recipes/light_gray_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/light_gray_concrete_powder.json +37 -0
- plancraft/environments/recipes/light_gray_dye_from_azure_bluet.json +12 -0
- plancraft/environments/recipes/light_gray_dye_from_black_white_dye.json +19 -0
- plancraft/environments/recipes/light_gray_dye_from_gray_white_dye.json +16 -0
- plancraft/environments/recipes/light_gray_dye_from_oxeye_daisy.json +12 -0
- plancraft/environments/recipes/light_gray_dye_from_white_tulip.json +12 -0
- plancraft/environments/recipes/light_gray_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/light_gray_stained_glass.json +21 -0
- plancraft/environments/recipes/light_gray_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/light_gray_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/light_gray_terracotta.json +21 -0
- plancraft/environments/recipes/light_gray_wool.json +15 -0
- plancraft/environments/recipes/light_weighted_pressure_plate.json +14 -0
- plancraft/environments/recipes/lime_banner.json +20 -0
- plancraft/environments/recipes/lime_bed.json +19 -0
- plancraft/environments/recipes/lime_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/lime_carpet.json +16 -0
- plancraft/environments/recipes/lime_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/lime_concrete_powder.json +37 -0
- plancraft/environments/recipes/lime_dye.json +15 -0
- plancraft/environments/recipes/lime_dye_from_smelting.json +9 -0
- plancraft/environments/recipes/lime_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/lime_stained_glass.json +21 -0
- plancraft/environments/recipes/lime_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/lime_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/lime_terracotta.json +21 -0
- plancraft/environments/recipes/lime_wool.json +15 -0
- plancraft/environments/recipes/lodestone.json +19 -0
- plancraft/environments/recipes/loom.json +18 -0
- plancraft/environments/recipes/magenta_banner.json +20 -0
- plancraft/environments/recipes/magenta_bed.json +19 -0
- plancraft/environments/recipes/magenta_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/magenta_carpet.json +16 -0
- plancraft/environments/recipes/magenta_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/magenta_concrete_powder.json +37 -0
- plancraft/environments/recipes/magenta_dye_from_allium.json +12 -0
- plancraft/environments/recipes/magenta_dye_from_blue_red_pink.json +19 -0
- plancraft/environments/recipes/magenta_dye_from_blue_red_white_dye.json +22 -0
- plancraft/environments/recipes/magenta_dye_from_lilac.json +13 -0
- plancraft/environments/recipes/magenta_dye_from_purple_and_pink.json +16 -0
- plancraft/environments/recipes/magenta_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/magenta_stained_glass.json +21 -0
- plancraft/environments/recipes/magenta_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/magenta_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/magenta_terracotta.json +21 -0
- plancraft/environments/recipes/magenta_wool.json +15 -0
- plancraft/environments/recipes/magma_block.json +15 -0
- plancraft/environments/recipes/magma_cream.json +14 -0
- plancraft/environments/recipes/map.json +19 -0
- plancraft/environments/recipes/map_cloning.json +3 -0
- plancraft/environments/recipes/map_extending.json +3 -0
- plancraft/environments/recipes/melon.json +16 -0
- plancraft/environments/recipes/melon_seeds.json +11 -0
- plancraft/environments/recipes/minecart.json +15 -0
- plancraft/environments/recipes/mojang_banner_pattern.json +14 -0
- plancraft/environments/recipes/mossy_cobblestone.json +14 -0
- plancraft/environments/recipes/mossy_cobblestone_slab.json +15 -0
- plancraft/environments/recipes/mossy_cobblestone_slab_from_mossy_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_cobblestone_stairs.json +17 -0
- plancraft/environments/recipes/mossy_cobblestone_stairs_from_mossy_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_cobblestone_wall.json +16 -0
- plancraft/environments/recipes/mossy_cobblestone_wall_from_mossy_cobblestone_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_stone_brick_slab.json +15 -0
- plancraft/environments/recipes/mossy_stone_brick_slab_from_mossy_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_stone_brick_stairs.json +17 -0
- plancraft/environments/recipes/mossy_stone_brick_stairs_from_mossy_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_stone_brick_wall.json +16 -0
- plancraft/environments/recipes/mossy_stone_brick_wall_from_mossy_stone_brick_stonecutting.json +8 -0
- plancraft/environments/recipes/mossy_stone_bricks.json +14 -0
- plancraft/environments/recipes/mushroom_stew.json +17 -0
- plancraft/environments/recipes/nether_brick.json +9 -0
- plancraft/environments/recipes/nether_brick_fence.json +19 -0
- plancraft/environments/recipes/nether_brick_slab.json +15 -0
- plancraft/environments/recipes/nether_brick_slab_from_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/nether_brick_stairs.json +17 -0
- plancraft/environments/recipes/nether_brick_stairs_from_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/nether_brick_wall.json +16 -0
- plancraft/environments/recipes/nether_brick_wall_from_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/nether_bricks.json +15 -0
- plancraft/environments/recipes/nether_wart_block.json +16 -0
- plancraft/environments/recipes/netherite_axe_smithing.json +12 -0
- plancraft/environments/recipes/netherite_block.json +16 -0
- plancraft/environments/recipes/netherite_boots_smithing.json +12 -0
- plancraft/environments/recipes/netherite_chestplate_smithing.json +12 -0
- plancraft/environments/recipes/netherite_helmet_smithing.json +12 -0
- plancraft/environments/recipes/netherite_hoe_smithing.json +12 -0
- plancraft/environments/recipes/netherite_ingot.json +33 -0
- plancraft/environments/recipes/netherite_ingot_from_netherite_block.json +13 -0
- plancraft/environments/recipes/netherite_leggings_smithing.json +12 -0
- plancraft/environments/recipes/netherite_pickaxe_smithing.json +12 -0
- plancraft/environments/recipes/netherite_scrap.json +9 -0
- plancraft/environments/recipes/netherite_scrap_from_blasting.json +9 -0
- plancraft/environments/recipes/netherite_shovel_smithing.json +12 -0
- plancraft/environments/recipes/netherite_sword_smithing.json +12 -0
- plancraft/environments/recipes/note_block.json +19 -0
- plancraft/environments/recipes/oak_boat.json +16 -0
- plancraft/environments/recipes/oak_button.json +12 -0
- plancraft/environments/recipes/oak_door.json +18 -0
- plancraft/environments/recipes/oak_fence.json +20 -0
- plancraft/environments/recipes/oak_fence_gate.json +19 -0
- plancraft/environments/recipes/oak_planks.json +13 -0
- plancraft/environments/recipes/oak_pressure_plate.json +15 -0
- plancraft/environments/recipes/oak_sign.json +21 -0
- plancraft/environments/recipes/oak_slab.json +16 -0
- plancraft/environments/recipes/oak_stairs.json +18 -0
- plancraft/environments/recipes/oak_trapdoor.json +17 -0
- plancraft/environments/recipes/oak_wood.json +17 -0
- plancraft/environments/recipes/observer.json +22 -0
- plancraft/environments/recipes/orange_banner.json +20 -0
- plancraft/environments/recipes/orange_bed.json +19 -0
- plancraft/environments/recipes/orange_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/orange_carpet.json +16 -0
- plancraft/environments/recipes/orange_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/orange_concrete_powder.json +37 -0
- plancraft/environments/recipes/orange_dye_from_orange_tulip.json +12 -0
- plancraft/environments/recipes/orange_dye_from_red_yellow.json +16 -0
- plancraft/environments/recipes/orange_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/orange_stained_glass.json +21 -0
- plancraft/environments/recipes/orange_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/orange_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/orange_terracotta.json +21 -0
- plancraft/environments/recipes/orange_wool.json +15 -0
- plancraft/environments/recipes/packed_ice.json +35 -0
- plancraft/environments/recipes/painting.json +19 -0
- plancraft/environments/recipes/paper.json +15 -0
- plancraft/environments/recipes/pink_banner.json +20 -0
- plancraft/environments/recipes/pink_bed.json +19 -0
- plancraft/environments/recipes/pink_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/pink_carpet.json +16 -0
- plancraft/environments/recipes/pink_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/pink_concrete_powder.json +37 -0
- plancraft/environments/recipes/pink_dye_from_peony.json +13 -0
- plancraft/environments/recipes/pink_dye_from_pink_tulip.json +12 -0
- plancraft/environments/recipes/pink_dye_from_red_white_dye.json +16 -0
- plancraft/environments/recipes/pink_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/pink_stained_glass.json +21 -0
- plancraft/environments/recipes/pink_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/pink_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/pink_terracotta.json +21 -0
- plancraft/environments/recipes/pink_wool.json +15 -0
- plancraft/environments/recipes/piston.json +25 -0
- plancraft/environments/recipes/polished_andesite.json +16 -0
- plancraft/environments/recipes/polished_andesite_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_andesite_slab.json +15 -0
- plancraft/environments/recipes/polished_andesite_slab_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_andesite_slab_from_polished_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_andesite_stairs.json +17 -0
- plancraft/environments/recipes/polished_andesite_stairs_from_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_andesite_stairs_from_polished_andesite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_basalt.json +16 -0
- plancraft/environments/recipes/polished_basalt_from_basalt_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone.json +16 -0
- plancraft/environments/recipes/polished_blackstone_brick_slab.json +15 -0
- plancraft/environments/recipes/polished_blackstone_brick_slab_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_slab_from_polished_blackstone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_slab_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_stairs.json +17 -0
- plancraft/environments/recipes/polished_blackstone_brick_stairs_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_stairs_from_polished_blackstone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_stairs_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_wall.json +16 -0
- plancraft/environments/recipes/polished_blackstone_brick_wall_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_wall_from_polished_blackstone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_brick_wall_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_bricks.json +16 -0
- plancraft/environments/recipes/polished_blackstone_bricks_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_bricks_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_button.json +11 -0
- plancraft/environments/recipes/polished_blackstone_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_pressure_plate.json +14 -0
- plancraft/environments/recipes/polished_blackstone_slab.json +15 -0
- plancraft/environments/recipes/polished_blackstone_slab_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_slab_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_stairs.json +17 -0
- plancraft/environments/recipes/polished_blackstone_stairs_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_stairs_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_wall.json +16 -0
- plancraft/environments/recipes/polished_blackstone_wall_from_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_blackstone_wall_from_polished_blackstone_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_diorite.json +16 -0
- plancraft/environments/recipes/polished_diorite_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_diorite_slab.json +15 -0
- plancraft/environments/recipes/polished_diorite_slab_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_diorite_slab_from_polished_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_diorite_stairs.json +17 -0
- plancraft/environments/recipes/polished_diorite_stairs_from_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_diorite_stairs_from_polished_diorite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_granite.json +16 -0
- plancraft/environments/recipes/polished_granite_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_granite_slab.json +15 -0
- plancraft/environments/recipes/polished_granite_slab_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_granite_slab_from_polished_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_granite_stairs.json +17 -0
- plancraft/environments/recipes/polished_granite_stairs_from_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/polished_granite_stairs_from_polished_granite_stonecutting.json +8 -0
- plancraft/environments/recipes/popped_chorus_fruit.json +9 -0
- plancraft/environments/recipes/powered_rail.json +23 -0
- plancraft/environments/recipes/prismarine.json +15 -0
- plancraft/environments/recipes/prismarine_brick_slab.json +15 -0
- plancraft/environments/recipes/prismarine_brick_slab_from_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/prismarine_brick_stairs.json +17 -0
- plancraft/environments/recipes/prismarine_brick_stairs_from_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/prismarine_bricks.json +16 -0
- plancraft/environments/recipes/prismarine_slab.json +15 -0
- plancraft/environments/recipes/prismarine_slab_from_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/prismarine_stairs.json +17 -0
- plancraft/environments/recipes/prismarine_stairs_from_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/prismarine_wall.json +16 -0
- plancraft/environments/recipes/prismarine_wall_from_prismarine_stonecutting.json +8 -0
- plancraft/environments/recipes/pumpkin_pie.json +17 -0
- plancraft/environments/recipes/pumpkin_seeds.json +12 -0
- plancraft/environments/recipes/purple_banner.json +20 -0
- plancraft/environments/recipes/purple_bed.json +19 -0
- plancraft/environments/recipes/purple_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/purple_carpet.json +16 -0
- plancraft/environments/recipes/purple_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/purple_concrete_powder.json +37 -0
- plancraft/environments/recipes/purple_dye.json +15 -0
- plancraft/environments/recipes/purple_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/purple_stained_glass.json +21 -0
- plancraft/environments/recipes/purple_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/purple_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/purple_terracotta.json +21 -0
- plancraft/environments/recipes/purple_wool.json +15 -0
- plancraft/environments/recipes/purpur_block.json +16 -0
- plancraft/environments/recipes/purpur_pillar.json +15 -0
- plancraft/environments/recipes/purpur_pillar_from_purpur_block_stonecutting.json +8 -0
- plancraft/environments/recipes/purpur_slab.json +20 -0
- plancraft/environments/recipes/purpur_slab_from_purpur_block_stonecutting.json +8 -0
- plancraft/environments/recipes/purpur_stairs.json +22 -0
- plancraft/environments/recipes/purpur_stairs_from_purpur_block_stonecutting.json +8 -0
- plancraft/environments/recipes/quartz.json +9 -0
- plancraft/environments/recipes/quartz_block.json +15 -0
- plancraft/environments/recipes/quartz_bricks.json +16 -0
- plancraft/environments/recipes/quartz_bricks_from_quartz_block_stonecutting.json +8 -0
- plancraft/environments/recipes/quartz_from_blasting.json +9 -0
- plancraft/environments/recipes/quartz_pillar.json +16 -0
- plancraft/environments/recipes/quartz_pillar_from_quartz_block_stonecutting.json +8 -0
- plancraft/environments/recipes/quartz_slab.json +23 -0
- plancraft/environments/recipes/quartz_slab_from_stonecutting.json +8 -0
- plancraft/environments/recipes/quartz_stairs.json +25 -0
- plancraft/environments/recipes/quartz_stairs_from_quartz_block_stonecutting.json +8 -0
- plancraft/environments/recipes/rabbit_stew_from_brown_mushroom.json +24 -0
- plancraft/environments/recipes/rabbit_stew_from_red_mushroom.json +24 -0
- plancraft/environments/recipes/rail.json +20 -0
- plancraft/environments/recipes/red_banner.json +20 -0
- plancraft/environments/recipes/red_bed.json +19 -0
- plancraft/environments/recipes/red_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/red_carpet.json +16 -0
- plancraft/environments/recipes/red_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/red_concrete_powder.json +37 -0
- plancraft/environments/recipes/red_dye_from_beetroot.json +12 -0
- plancraft/environments/recipes/red_dye_from_poppy.json +12 -0
- plancraft/environments/recipes/red_dye_from_rose_bush.json +13 -0
- plancraft/environments/recipes/red_dye_from_tulip.json +12 -0
- plancraft/environments/recipes/red_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/red_nether_brick_slab.json +15 -0
- plancraft/environments/recipes/red_nether_brick_slab_from_red_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/red_nether_brick_stairs.json +17 -0
- plancraft/environments/recipes/red_nether_brick_stairs_from_red_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/red_nether_brick_wall.json +16 -0
- plancraft/environments/recipes/red_nether_brick_wall_from_red_nether_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/red_nether_bricks.json +18 -0
- plancraft/environments/recipes/red_sandstone.json +15 -0
- plancraft/environments/recipes/red_sandstone_slab.json +20 -0
- plancraft/environments/recipes/red_sandstone_slab_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/red_sandstone_stairs.json +25 -0
- plancraft/environments/recipes/red_sandstone_stairs_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/red_sandstone_wall.json +16 -0
- plancraft/environments/recipes/red_sandstone_wall_from_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/red_stained_glass.json +21 -0
- plancraft/environments/recipes/red_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/red_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/red_terracotta.json +21 -0
- plancraft/environments/recipes/red_wool.json +15 -0
- plancraft/environments/recipes/redstone.json +12 -0
- plancraft/environments/recipes/redstone_block.json +16 -0
- plancraft/environments/recipes/redstone_from_blasting.json +9 -0
- plancraft/environments/recipes/redstone_from_smelting.json +9 -0
- plancraft/environments/recipes/redstone_lamp.json +19 -0
- plancraft/environments/recipes/redstone_torch.json +18 -0
- plancraft/environments/recipes/repair_item.json +3 -0
- plancraft/environments/recipes/repeater.json +21 -0
- plancraft/environments/recipes/respawn_anchor.json +19 -0
- plancraft/environments/recipes/sandstone.json +15 -0
- plancraft/environments/recipes/sandstone_slab.json +20 -0
- plancraft/environments/recipes/sandstone_slab_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/sandstone_stairs.json +25 -0
- plancraft/environments/recipes/sandstone_stairs_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/sandstone_wall.json +16 -0
- plancraft/environments/recipes/sandstone_wall_from_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/scaffolding.json +20 -0
- plancraft/environments/recipes/sea_lantern.json +19 -0
- plancraft/environments/recipes/shears.json +15 -0
- plancraft/environments/recipes/shield.json +19 -0
- plancraft/environments/recipes/shield_decoration.json +3 -0
- plancraft/environments/recipes/shulker_box.json +19 -0
- plancraft/environments/recipes/shulker_box_coloring.json +3 -0
- plancraft/environments/recipes/skull_banner_pattern.json +14 -0
- plancraft/environments/recipes/slime_ball.json +12 -0
- plancraft/environments/recipes/slime_block.json +16 -0
- plancraft/environments/recipes/smithing_table.json +19 -0
- plancraft/environments/recipes/smoker.json +19 -0
- plancraft/environments/recipes/smooth_quartz.json +9 -0
- plancraft/environments/recipes/smooth_quartz_slab.json +15 -0
- plancraft/environments/recipes/smooth_quartz_slab_from_smooth_quartz_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_quartz_stairs.json +17 -0
- plancraft/environments/recipes/smooth_quartz_stairs_from_smooth_quartz_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_red_sandstone.json +9 -0
- plancraft/environments/recipes/smooth_red_sandstone_slab.json +15 -0
- plancraft/environments/recipes/smooth_red_sandstone_slab_from_smooth_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_red_sandstone_stairs.json +17 -0
- plancraft/environments/recipes/smooth_red_sandstone_stairs_from_smooth_red_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_sandstone.json +9 -0
- plancraft/environments/recipes/smooth_sandstone_slab.json +15 -0
- plancraft/environments/recipes/smooth_sandstone_slab_from_smooth_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_sandstone_stairs.json +17 -0
- plancraft/environments/recipes/smooth_sandstone_stairs_from_smooth_sandstone_stonecutting.json +8 -0
- plancraft/environments/recipes/smooth_stone.json +9 -0
- plancraft/environments/recipes/smooth_stone_slab.json +15 -0
- plancraft/environments/recipes/smooth_stone_slab_from_smooth_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/snow.json +15 -0
- plancraft/environments/recipes/snow_block.json +15 -0
- plancraft/environments/recipes/soul_campfire.json +22 -0
- plancraft/environments/recipes/soul_lantern.json +19 -0
- plancraft/environments/recipes/soul_torch.json +28 -0
- plancraft/environments/recipes/spectral_arrow.json +20 -0
- plancraft/environments/recipes/sponge.json +9 -0
- plancraft/environments/recipes/spruce_boat.json +16 -0
- plancraft/environments/recipes/spruce_button.json +12 -0
- plancraft/environments/recipes/spruce_door.json +18 -0
- plancraft/environments/recipes/spruce_fence.json +20 -0
- plancraft/environments/recipes/spruce_fence_gate.json +19 -0
- plancraft/environments/recipes/spruce_planks.json +13 -0
- plancraft/environments/recipes/spruce_pressure_plate.json +15 -0
- plancraft/environments/recipes/spruce_sign.json +21 -0
- plancraft/environments/recipes/spruce_slab.json +16 -0
- plancraft/environments/recipes/spruce_stairs.json +18 -0
- plancraft/environments/recipes/spruce_trapdoor.json +17 -0
- plancraft/environments/recipes/spruce_wood.json +17 -0
- plancraft/environments/recipes/stick.json +17 -0
- plancraft/environments/recipes/stick_from_bamboo_item.json +16 -0
- plancraft/environments/recipes/sticky_piston.json +18 -0
- plancraft/environments/recipes/stone.json +9 -0
- plancraft/environments/recipes/stone_axe.json +19 -0
- plancraft/environments/recipes/stone_brick_slab.json +15 -0
- plancraft/environments/recipes/stone_brick_slab_from_stone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_brick_slab_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_brick_stairs.json +17 -0
- plancraft/environments/recipes/stone_brick_stairs_from_stone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_brick_stairs_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_brick_wall.json +16 -0
- plancraft/environments/recipes/stone_brick_wall_from_stone_bricks_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_brick_walls_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_bricks.json +16 -0
- plancraft/environments/recipes/stone_bricks_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_button.json +11 -0
- plancraft/environments/recipes/stone_hoe.json +19 -0
- plancraft/environments/recipes/stone_pickaxe.json +19 -0
- plancraft/environments/recipes/stone_pressure_plate.json +14 -0
- plancraft/environments/recipes/stone_shovel.json +19 -0
- plancraft/environments/recipes/stone_slab.json +15 -0
- plancraft/environments/recipes/stone_slab_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_stairs.json +17 -0
- plancraft/environments/recipes/stone_stairs_from_stone_stonecutting.json +8 -0
- plancraft/environments/recipes/stone_sword.json +19 -0
- plancraft/environments/recipes/stonecutter.json +18 -0
- plancraft/environments/recipes/stripped_acacia_wood.json +17 -0
- plancraft/environments/recipes/stripped_birch_wood.json +17 -0
- plancraft/environments/recipes/stripped_crimson_hyphae.json +17 -0
- plancraft/environments/recipes/stripped_dark_oak_wood.json +17 -0
- plancraft/environments/recipes/stripped_jungle_wood.json +17 -0
- plancraft/environments/recipes/stripped_oak_wood.json +17 -0
- plancraft/environments/recipes/stripped_spruce_wood.json +17 -0
- plancraft/environments/recipes/stripped_warped_hyphae.json +17 -0
- plancraft/environments/recipes/sugar_from_honey_bottle.json +13 -0
- plancraft/environments/recipes/sugar_from_sugar_cane.json +12 -0
- plancraft/environments/recipes/suspicious_stew.json +3 -0
- plancraft/environments/recipes/target.json +19 -0
- plancraft/environments/recipes/terracotta.json +9 -0
- plancraft/environments/recipes/tipped_arrow.json +3 -0
- plancraft/environments/recipes/tnt.json +24 -0
- plancraft/environments/recipes/tnt_minecart.json +18 -0
- plancraft/environments/recipes/torch.json +24 -0
- plancraft/environments/recipes/trapped_chest.json +14 -0
- plancraft/environments/recipes/tripwire_hook.json +23 -0
- plancraft/environments/recipes/turtle_helmet.json +15 -0
- plancraft/environments/recipes/warped_button.json +12 -0
- plancraft/environments/recipes/warped_door.json +18 -0
- plancraft/environments/recipes/warped_fence.json +20 -0
- plancraft/environments/recipes/warped_fence_gate.json +19 -0
- plancraft/environments/recipes/warped_fungus_on_a_stick.json +18 -0
- plancraft/environments/recipes/warped_hyphae.json +17 -0
- plancraft/environments/recipes/warped_planks.json +13 -0
- plancraft/environments/recipes/warped_pressure_plate.json +15 -0
- plancraft/environments/recipes/warped_sign.json +21 -0
- plancraft/environments/recipes/warped_slab.json +16 -0
- plancraft/environments/recipes/warped_stairs.json +18 -0
- plancraft/environments/recipes/warped_trapdoor.json +17 -0
- plancraft/environments/recipes/wheat.json +12 -0
- plancraft/environments/recipes/white_banner.json +20 -0
- plancraft/environments/recipes/white_bed.json +19 -0
- plancraft/environments/recipes/white_carpet.json +16 -0
- plancraft/environments/recipes/white_concrete_powder.json +37 -0
- plancraft/environments/recipes/white_dye.json +12 -0
- plancraft/environments/recipes/white_dye_from_lily_of_the_valley.json +12 -0
- plancraft/environments/recipes/white_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/white_stained_glass.json +21 -0
- plancraft/environments/recipes/white_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/white_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/white_terracotta.json +21 -0
- plancraft/environments/recipes/white_wool_from_string.json +15 -0
- plancraft/environments/recipes/wooden_axe.json +19 -0
- plancraft/environments/recipes/wooden_hoe.json +19 -0
- plancraft/environments/recipes/wooden_pickaxe.json +19 -0
- plancraft/environments/recipes/wooden_shovel.json +19 -0
- plancraft/environments/recipes/wooden_sword.json +19 -0
- plancraft/environments/recipes/writable_book.json +17 -0
- plancraft/environments/recipes/yellow_banner.json +20 -0
- plancraft/environments/recipes/yellow_bed.json +19 -0
- plancraft/environments/recipes/yellow_bed_from_white_bed.json +15 -0
- plancraft/environments/recipes/yellow_carpet.json +16 -0
- plancraft/environments/recipes/yellow_carpet_from_white_carpet.json +21 -0
- plancraft/environments/recipes/yellow_concrete_powder.json +37 -0
- plancraft/environments/recipes/yellow_dye_from_dandelion.json +12 -0
- plancraft/environments/recipes/yellow_dye_from_sunflower.json +13 -0
- plancraft/environments/recipes/yellow_glazed_terracotta.json +9 -0
- plancraft/environments/recipes/yellow_stained_glass.json +21 -0
- plancraft/environments/recipes/yellow_stained_glass_pane.json +17 -0
- plancraft/environments/recipes/yellow_stained_glass_pane_from_glass_pane.json +21 -0
- plancraft/environments/recipes/yellow_terracotta.json +21 -0
- plancraft/environments/recipes/yellow_wool.json +15 -0
- plancraft/environments/recipes.py +542 -0
- plancraft/environments/sampler.py +224 -0
- plancraft/environments/tags/acacia_logs.json +9 -0
- plancraft/environments/tags/anvil.json +8 -0
- plancraft/environments/tags/arrows.json +8 -0
- plancraft/environments/tags/banners.json +21 -0
- plancraft/environments/tags/beacon_payment_items.json +10 -0
- plancraft/environments/tags/beds.json +21 -0
- plancraft/environments/tags/birch_logs.json +9 -0
- plancraft/environments/tags/boats.json +11 -0
- plancraft/environments/tags/buttons.json +8 -0
- plancraft/environments/tags/carpets.json +21 -0
- plancraft/environments/tags/coals.json +7 -0
- plancraft/environments/tags/creeper_drop_music_discs.json +17 -0
- plancraft/environments/tags/crimson_stems.json +9 -0
- plancraft/environments/tags/dark_oak_logs.json +9 -0
- plancraft/environments/tags/doors.json +7 -0
- plancraft/environments/tags/fences.json +7 -0
- plancraft/environments/tags/fishes.json +11 -0
- plancraft/environments/tags/flowers.json +7 -0
- plancraft/environments/tags/gold_ores.json +7 -0
- plancraft/environments/tags/jungle_logs.json +9 -0
- plancraft/environments/tags/leaves.json +11 -0
- plancraft/environments/tags/lectern_books.json +7 -0
- plancraft/environments/tags/logs.json +8 -0
- plancraft/environments/tags/logs_that_burn.json +11 -0
- plancraft/environments/tags/music_discs.json +7 -0
- plancraft/environments/tags/non_flammable_wood.json +33 -0
- plancraft/environments/tags/oak_logs.json +9 -0
- plancraft/environments/tags/piglin_loved.json +26 -0
- plancraft/environments/tags/piglin_repellents.json +8 -0
- plancraft/environments/tags/planks.json +13 -0
- plancraft/environments/tags/rails.json +9 -0
- plancraft/environments/tags/sand.json +7 -0
- plancraft/environments/tags/saplings.json +11 -0
- plancraft/environments/tags/signs.json +13 -0
- plancraft/environments/tags/slabs.json +38 -0
- plancraft/environments/tags/small_flowers.json +18 -0
- plancraft/environments/tags/soul_fire_base_blocks.json +7 -0
- plancraft/environments/tags/spruce_logs.json +9 -0
- plancraft/environments/tags/stairs.json +34 -0
- plancraft/environments/tags/stone_bricks.json +9 -0
- plancraft/environments/tags/stone_crafting_materials.json +7 -0
- plancraft/environments/tags/stone_tool_materials.json +7 -0
- plancraft/environments/tags/tall_flowers.json +9 -0
- plancraft/environments/tags/trapdoors.json +7 -0
- plancraft/environments/tags/walls.json +22 -0
- plancraft/environments/tags/warped_stems.json +9 -0
- plancraft/environments/tags/wooden_buttons.json +13 -0
- plancraft/environments/tags/wooden_doors.json +13 -0
- plancraft/environments/tags/wooden_fences.json +13 -0
- plancraft/environments/tags/wooden_pressure_plates.json +13 -0
- plancraft/environments/tags/wooden_slabs.json +13 -0
- plancraft/environments/tags/wooden_stairs.json +13 -0
- plancraft/environments/tags/wooden_trapdoors.json +13 -0
- plancraft/environments/tags/wool.json +21 -0
- plancraft/evaluator.py +273 -0
- plancraft/models/__init__.py +21 -0
- plancraft/models/act.py +184 -0
- plancraft/models/base.py +152 -0
- plancraft/models/bbox_model.py +492 -0
- plancraft/models/dummy.py +54 -0
- plancraft/models/few_shot_images/0.png +0 -0
- plancraft/models/few_shot_images/1.png +0 -0
- plancraft/models/few_shot_images/2.png +0 -0
- plancraft/models/few_shot_images/3.png +0 -0
- plancraft/models/few_shot_images/__init__.py +16 -0
- plancraft/models/generators.py +480 -0
- plancraft/models/oam.py +283 -0
- plancraft/models/oracle.py +265 -0
- plancraft/models/prompts.py +158 -0
- plancraft/models/react.py +93 -0
- plancraft/models/utils.py +289 -0
- plancraft/train/dataset.py +187 -0
- plancraft/utils.py +84 -0
- {plancraft-0.1.2.dist-info → plancraft-0.1.4.dist-info}/METADATA +1 -1
- plancraft-0.1.4.dist-info/RECORD +948 -0
- plancraft-0.1.4.dist-info/top_level.txt +1 -0
- plancraft-0.1.2.dist-info/RECORD +0 -5
- plancraft-0.1.2.dist-info/top_level.txt +0 -1
- {plancraft-0.1.2.dist-info → plancraft-0.1.4.dist-info}/LICENSE +0 -0
- {plancraft-0.1.2.dist-info → plancraft-0.1.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,480 @@
|
|
1
|
+
import os
|
2
|
+
import time
|
3
|
+
|
4
|
+
import torch
|
5
|
+
from dotenv import load_dotenv
|
6
|
+
from loguru import logger
|
7
|
+
from openai import OpenAI
|
8
|
+
from PIL import Image
|
9
|
+
from transformers import (
|
10
|
+
AutoModelForCausalLM,
|
11
|
+
AutoModelForVision2Seq,
|
12
|
+
AutoProcessor,
|
13
|
+
AutoTokenizer,
|
14
|
+
BitsAndBytesConfig,
|
15
|
+
)
|
16
|
+
from transformers.cache_utils import DynamicCache
|
17
|
+
|
18
|
+
from plancraft.models.base import History
|
19
|
+
from plancraft.models.oam import PlancraftOAM
|
20
|
+
from plancraft.models.utils import (
|
21
|
+
get_downloaded_models,
|
22
|
+
numpy_to_base64,
|
23
|
+
tokenize,
|
24
|
+
)
|
25
|
+
|
26
|
+
load_dotenv()
|
27
|
+
|
28
|
+
|
29
|
+
class TransformersGenerator:
|
30
|
+
def __init__(
|
31
|
+
self,
|
32
|
+
model_name: str,
|
33
|
+
tokenizer_name: str = "same",
|
34
|
+
quantize=False,
|
35
|
+
use_images=False,
|
36
|
+
use_hot_cache=True,
|
37
|
+
adapter_name="",
|
38
|
+
**kwargs,
|
39
|
+
):
|
40
|
+
self.model_name = model_name
|
41
|
+
self.use_hot_cache = use_hot_cache
|
42
|
+
|
43
|
+
if tokenizer_name == "same":
|
44
|
+
tokenizer_name = model_name
|
45
|
+
|
46
|
+
self.use_images = use_images
|
47
|
+
model_name, model_kwargs = self.build_model_kwargs(
|
48
|
+
model_name, quantize=quantize
|
49
|
+
)
|
50
|
+
self.processor = None
|
51
|
+
if "idefics" in model_name:
|
52
|
+
assert use_images, "Idefics model requires multimodal input"
|
53
|
+
self.tokenizer = AutoProcessor.from_pretrained(
|
54
|
+
tokenizer_name,
|
55
|
+
**model_kwargs,
|
56
|
+
)
|
57
|
+
self.tokenizer.eos_token_id = self.tokenizer.tokenizer.eos_token_id
|
58
|
+
logger.info("Loading model")
|
59
|
+
time_now = time.time()
|
60
|
+
self.model = AutoModelForVision2Seq.from_pretrained(
|
61
|
+
model_name,
|
62
|
+
device_map="auto",
|
63
|
+
**model_kwargs,
|
64
|
+
)
|
65
|
+
logger.info(f"Model loaded in {time.time() - time_now:.2f} seconds")
|
66
|
+
# set pad_token_id
|
67
|
+
if self.tokenizer.tokenizer.pad_token_id:
|
68
|
+
self.pad_token_id = self.tokenizer.tokenizer.pad_token_id
|
69
|
+
else:
|
70
|
+
self.pad_token_id = self.tokenizer.tokenizer.eos_token_id
|
71
|
+
else:
|
72
|
+
self.tokenizer = AutoTokenizer.from_pretrained(
|
73
|
+
tokenizer_name,
|
74
|
+
token=os.getenv("HF_TOKEN"), # trust_remote_code=True
|
75
|
+
padding_side="left", # ensure that the padding is on the left
|
76
|
+
)
|
77
|
+
logger.info("Loading model")
|
78
|
+
time_now = time.time()
|
79
|
+
self.model = AutoModelForCausalLM.from_pretrained(
|
80
|
+
model_name,
|
81
|
+
device_map="auto",
|
82
|
+
**model_kwargs,
|
83
|
+
)
|
84
|
+
logger.info(f"Model loaded in {time.time() - time_now:.2f} seconds")
|
85
|
+
|
86
|
+
# load OA adapter
|
87
|
+
if adapter_name != "":
|
88
|
+
logger.info(f"Loading adapter and tokenizer from {adapter_name}")
|
89
|
+
self.tokenizer = AutoTokenizer.from_pretrained(
|
90
|
+
adapter_name,
|
91
|
+
padding_side="left",
|
92
|
+
)
|
93
|
+
self.model.resize_token_embeddings(len(self.tokenizer))
|
94
|
+
self.model.load_adapter(adapter_name)
|
95
|
+
|
96
|
+
# set pad_token_id
|
97
|
+
if self.tokenizer.pad_token_id:
|
98
|
+
self.pad_token_id = self.tokenizer.pad_token_id
|
99
|
+
else:
|
100
|
+
self.tokenizer.pad_token = self.tokenizer.eos_token
|
101
|
+
self.pad_token_id = self.tokenizer.eos_token_id
|
102
|
+
|
103
|
+
# compile
|
104
|
+
time_now = time.time()
|
105
|
+
self.model = torch.compile(self.model)
|
106
|
+
logger.info(f"Model compiled in {time.time() - time_now:.2f} seconds")
|
107
|
+
|
108
|
+
self.model.eval()
|
109
|
+
if self.pad_token_id is None:
|
110
|
+
self.tokenizer.pad_token = self.tokenizer.eos_token
|
111
|
+
self.model.config.pad_token_id = self.model.config.eos_token_id
|
112
|
+
self.tokenizer.truncation_side = "left"
|
113
|
+
|
114
|
+
self.past_key_values_kwargs = {}
|
115
|
+
self.past_token_ids = None
|
116
|
+
|
117
|
+
def truncate_kv_cache(self, new_token_ids: torch.Tensor):
|
118
|
+
"""
|
119
|
+
Truncate the key-value cache to the size which overlap the past_ids with the new_ids.
|
120
|
+
Uses:
|
121
|
+
past_ids: torch.Tensor [B, T]
|
122
|
+
new_ids: torch.Tensor [B, T]
|
123
|
+
kv_cache: tuple[tuple[torch.Tensor]]: tuple of key-value cache tensors
|
124
|
+
|
125
|
+
NOTE: this essentially implements System Prompt in the worst case when using batch_size==1
|
126
|
+
"""
|
127
|
+
if (
|
128
|
+
self.past_token_ids is None
|
129
|
+
or "past_key_values" not in self.past_key_values_kwargs
|
130
|
+
):
|
131
|
+
return
|
132
|
+
|
133
|
+
# caching doesn't seem to work with multimodal models
|
134
|
+
if self.use_images:
|
135
|
+
self.past_key_values_kwargs = {}
|
136
|
+
return
|
137
|
+
|
138
|
+
past_batch_size, past_seq_len = self.past_token_ids.shape
|
139
|
+
new_batch_size, new_seq_len = new_token_ids.shape
|
140
|
+
|
141
|
+
# If the batch size has changed, reset the cache
|
142
|
+
if past_batch_size != new_batch_size:
|
143
|
+
self.past_key_values_kwargs = {}
|
144
|
+
return
|
145
|
+
|
146
|
+
min_shape = min(past_seq_len, new_seq_len)
|
147
|
+
compare_past = (
|
148
|
+
self.past_token_ids[:, :min_shape] != new_token_ids[:, :min_shape]
|
149
|
+
)
|
150
|
+
|
151
|
+
# All tokens are the same - no need to truncate
|
152
|
+
if not compare_past.any():
|
153
|
+
return
|
154
|
+
|
155
|
+
# Find the first token that is different between the past and new tokens
|
156
|
+
seq_min = torch.argmax(compare_past.double(), dim=1).min()
|
157
|
+
|
158
|
+
# Truncate the key-value cache to the size which overlap the past_ids with the new_ids.
|
159
|
+
# assumes shape is [num_layers, num_heads, seq_len, hidden_size]
|
160
|
+
self.past_key_values_kwargs["past_key_values"] = [
|
161
|
+
[kv[:, :, :seq_min, :] for kv in kvs]
|
162
|
+
for kvs in self.past_key_values_kwargs["past_key_values"]
|
163
|
+
]
|
164
|
+
|
165
|
+
@staticmethod
|
166
|
+
def build_model_kwargs(model_name: str, **kwargs) -> tuple[str, dict]:
|
167
|
+
model_kwargs = {
|
168
|
+
"token": os.getenv("HF_TOKEN"),
|
169
|
+
# "attn_implementation": "flash_attention_2",
|
170
|
+
# "trust_remote_code": True,
|
171
|
+
}
|
172
|
+
quantize = kwargs.get("quantize", False)
|
173
|
+
if quantize == "int4":
|
174
|
+
model_kwargs["quantization_config"] = BitsAndBytesConfig(
|
175
|
+
load_in_4bit=True,
|
176
|
+
)
|
177
|
+
elif quantize == "int8":
|
178
|
+
model_kwargs["quantization_config"] = BitsAndBytesConfig(
|
179
|
+
load_in_8bit=True,
|
180
|
+
)
|
181
|
+
else:
|
182
|
+
model_kwargs["torch_dtype"] = torch.bfloat16
|
183
|
+
|
184
|
+
downloaded_models = get_downloaded_models()
|
185
|
+
if model_name in downloaded_models:
|
186
|
+
model_kwargs["local_files_only"] = True
|
187
|
+
model_name = downloaded_models[model_name]
|
188
|
+
logger.info(f"Using local model {model_name}")
|
189
|
+
if "/plancraft/outputs" in model_name:
|
190
|
+
model_kwargs["local_files_only"] = True
|
191
|
+
logger.info(f"Using local model {model_name}")
|
192
|
+
|
193
|
+
return model_name, model_kwargs
|
194
|
+
|
195
|
+
def reset(self):
|
196
|
+
# NOTE: past_key_values cache with a rolling window
|
197
|
+
# is not maximally useful as the beggining shifts over time
|
198
|
+
# and therefore cache is invalidated
|
199
|
+
self.past_key_values_kwargs = {}
|
200
|
+
self.past_token_ids = None
|
201
|
+
|
202
|
+
def prepare_messages(
|
203
|
+
self,
|
204
|
+
history: History,
|
205
|
+
max_messages_window: int,
|
206
|
+
system_prompt: dict = None,
|
207
|
+
prompt_images: list = [],
|
208
|
+
) -> tuple[list[dict], list]:
|
209
|
+
"""
|
210
|
+
Prepare the messages using a history
|
211
|
+
"""
|
212
|
+
message_window = history.dialogue_history[-max_messages_window:]
|
213
|
+
# remove the first assistant message if it is present
|
214
|
+
if len(message_window) > 0 and message_window[0]["role"] == "assistant":
|
215
|
+
message_window = message_window[1:]
|
216
|
+
# add the system prompt if the first message is not a system message
|
217
|
+
if message_window[0]["role"] != "system" and system_prompt is not None:
|
218
|
+
message_window = [system_prompt] + message_window
|
219
|
+
|
220
|
+
image_window = []
|
221
|
+
if self.use_images:
|
222
|
+
image_list = prompt_images + history.images
|
223
|
+
image_count = 0
|
224
|
+
# iterate through the messages in reverse order to assign images
|
225
|
+
for m in message_window:
|
226
|
+
for content in m["content"]:
|
227
|
+
if content["type"] == "image":
|
228
|
+
image_count += 1
|
229
|
+
assert image_count <= len(image_list), "Too many images"
|
230
|
+
image_window = image_list[-image_count:]
|
231
|
+
image_window = [Image.fromarray(img) for img in image_window]
|
232
|
+
|
233
|
+
return message_window, image_window
|
234
|
+
|
235
|
+
@torch.inference_mode()
|
236
|
+
def generate_unconstrained(
|
237
|
+
self,
|
238
|
+
batch_messages: list[list[dict]],
|
239
|
+
start_messages_generation: str = "",
|
240
|
+
max_tokens: int = 256,
|
241
|
+
temperature=0.6,
|
242
|
+
**kwargs,
|
243
|
+
) -> tuple[list[str], int]:
|
244
|
+
"""
|
245
|
+
Generate unconstrained text based on the batch of messages.
|
246
|
+
"""
|
247
|
+
if self.use_images:
|
248
|
+
assert "images" in kwargs, "Images required for multimodal model"
|
249
|
+
|
250
|
+
tokenized_messages = tokenize(
|
251
|
+
self.model,
|
252
|
+
self.tokenizer,
|
253
|
+
batch_messages,
|
254
|
+
start_messages_generation=[start_messages_generation] * len(batch_messages),
|
255
|
+
max_tokens=max_tokens,
|
256
|
+
images=kwargs.get("images") if self.use_images else None,
|
257
|
+
)
|
258
|
+
prompt_tokens = tokenized_messages["input_ids"].shape[-1]
|
259
|
+
|
260
|
+
# Sent to the same device as model
|
261
|
+
tokenized_messages = {
|
262
|
+
k: v.to(self.model.device) for k, v in tokenized_messages.items()
|
263
|
+
}
|
264
|
+
|
265
|
+
# Truncate the key-value cache
|
266
|
+
self.truncate_kv_cache(tokenized_messages["input_ids"])
|
267
|
+
|
268
|
+
if (
|
269
|
+
"past_key_values" in self.past_key_values_kwargs
|
270
|
+
and self.past_key_values_kwargs["past_key_values"][0][0].shape[-2]
|
271
|
+
> tokenized_messages["input_ids"].shape[-1]
|
272
|
+
):
|
273
|
+
raise ValueError("Past key values are larger than the input_ids")
|
274
|
+
|
275
|
+
past_key_values = self.past_key_values_kwargs.get("past_key_values", None)
|
276
|
+
if past_key_values is not None:
|
277
|
+
past_key_values = DynamicCache.from_legacy_cache(past_key_values)
|
278
|
+
|
279
|
+
generated_sequences = self.model.generate(
|
280
|
+
**tokenized_messages,
|
281
|
+
do_sample=True,
|
282
|
+
temperature=temperature,
|
283
|
+
max_new_tokens=max_tokens,
|
284
|
+
pad_token_id=self.pad_token_id,
|
285
|
+
return_dict_in_generate=True,
|
286
|
+
use_cache=True,
|
287
|
+
past_key_values=past_key_values,
|
288
|
+
return_legacy_cache=True,
|
289
|
+
)
|
290
|
+
# Cache the past key values
|
291
|
+
if self.use_hot_cache:
|
292
|
+
self.past_key_values_kwargs["past_key_values"] = (
|
293
|
+
generated_sequences.past_key_values
|
294
|
+
)
|
295
|
+
self.past_token_ids = generated_sequences.sequences
|
296
|
+
|
297
|
+
# Decode the output
|
298
|
+
text_responses = self.tokenizer.batch_decode(
|
299
|
+
generated_sequences.sequences[:, prompt_tokens:],
|
300
|
+
skip_special_tokens=False,
|
301
|
+
)
|
302
|
+
|
303
|
+
text_responses = [
|
304
|
+
text_response.replace("<|eot_id|>", "") for text_response in text_responses
|
305
|
+
]
|
306
|
+
|
307
|
+
_, total_tokens_used = generated_sequences.sequences.shape
|
308
|
+
return text_responses, total_tokens_used
|
309
|
+
|
310
|
+
|
311
|
+
class OpenAIGenerator:
|
312
|
+
def __init__(self, use_images=False, model_name="gpt-4o-mini"):
|
313
|
+
self.client = OpenAI()
|
314
|
+
self.use_images = use_images
|
315
|
+
self.model_name = model_name
|
316
|
+
|
317
|
+
def reset(self):
|
318
|
+
pass
|
319
|
+
|
320
|
+
def prepare_messages(
|
321
|
+
self,
|
322
|
+
history: History,
|
323
|
+
max_messages_window: int,
|
324
|
+
system_prompt: dict = None,
|
325
|
+
prompt_images: list = [],
|
326
|
+
) -> tuple[list[dict], list]:
|
327
|
+
"""
|
328
|
+
Prepare the image messages for the model
|
329
|
+
"""
|
330
|
+
message_window = history.dialogue_history[-max_messages_window:]
|
331
|
+
# remove the first assistant message if it is present
|
332
|
+
if len(message_window) > 0 and message_window[0]["role"] == "assistant":
|
333
|
+
message_window = message_window[1:]
|
334
|
+
# add the system prompt if the first message is not a system message
|
335
|
+
if message_window[0]["role"] != "system" and system_prompt is not None:
|
336
|
+
message_window = [system_prompt] + message_window
|
337
|
+
|
338
|
+
if self.use_images:
|
339
|
+
image_list = prompt_images + history.images
|
340
|
+
img_idx = -1
|
341
|
+
seen_images = 0
|
342
|
+
# iterate through the messages in reverse order to assign images
|
343
|
+
for i in range(len(message_window) - 1, -1, -1):
|
344
|
+
new_content_list = []
|
345
|
+
for content in message_window[i]["content"]:
|
346
|
+
if content["type"] == "text":
|
347
|
+
new_content_list.append(content)
|
348
|
+
elif content["type"] == "image":
|
349
|
+
base64_image = numpy_to_base64(image_list[img_idx])
|
350
|
+
img_idx -= 1
|
351
|
+
seen_images + 1
|
352
|
+
new_content = {
|
353
|
+
"type": "image_url",
|
354
|
+
"image_url": {
|
355
|
+
"url": f"data:image/jpeg;base64,{base64_image}"
|
356
|
+
},
|
357
|
+
}
|
358
|
+
new_content_list.append(new_content)
|
359
|
+
message_window[i]["content"] = new_content_list
|
360
|
+
assert seen_images <= len(image_list), "Too many images"
|
361
|
+
|
362
|
+
return message_window, []
|
363
|
+
|
364
|
+
def generate_unconstrained(
|
365
|
+
self,
|
366
|
+
batch_messages: list[list[dict]],
|
367
|
+
max_tokens=256,
|
368
|
+
**kwargs,
|
369
|
+
) -> tuple[list[str], int]:
|
370
|
+
contents = []
|
371
|
+
tokens_used = 0
|
372
|
+
for messages in batch_messages:
|
373
|
+
response = self.client.chat.completions.create(
|
374
|
+
model=self.model_name,
|
375
|
+
messages=messages,
|
376
|
+
temperature=0.0,
|
377
|
+
max_tokens=max_tokens,
|
378
|
+
top_p=1,
|
379
|
+
frequency_penalty=0,
|
380
|
+
presence_penalty=0,
|
381
|
+
stop=["\n", "\n\n"],
|
382
|
+
)
|
383
|
+
content = response.choices[0].message.content
|
384
|
+
tokens_used += response.usage.total_tokens
|
385
|
+
contents.append(content)
|
386
|
+
return contents, tokens_used
|
387
|
+
|
388
|
+
|
389
|
+
class OAMGenerator:
|
390
|
+
def __init__(
|
391
|
+
self,
|
392
|
+
model_name,
|
393
|
+
):
|
394
|
+
self.model_name = model_name
|
395
|
+
logger.info("Loading model")
|
396
|
+
time_now = time.time()
|
397
|
+
self.model = PlancraftOAM.from_pretrained(model_name)
|
398
|
+
self.model.cuda()
|
399
|
+
logger.info(f"Model loaded in {time.time() - time_now:.2f} seconds")
|
400
|
+
# compile
|
401
|
+
time_now = time.time()
|
402
|
+
self.model = torch.compile(self.model)
|
403
|
+
logger.info(f"Model compiled in {time.time() - time_now:.2f} seconds")
|
404
|
+
|
405
|
+
self.model.eval()
|
406
|
+
self.model.tokenizer.pad_token = self.model.tokenizer.eos_token
|
407
|
+
self.model.tokenizer.truncation_side = "left"
|
408
|
+
|
409
|
+
def reset(self):
|
410
|
+
pass
|
411
|
+
|
412
|
+
def prepare_messages(
|
413
|
+
self,
|
414
|
+
history: History,
|
415
|
+
max_messages_window: int,
|
416
|
+
system_prompt: dict = None,
|
417
|
+
prompt_images: list = [],
|
418
|
+
) -> tuple[list[dict], list]:
|
419
|
+
"""
|
420
|
+
Prepare the messages using a history
|
421
|
+
"""
|
422
|
+
message_window = history.dialogue_history[-max_messages_window:]
|
423
|
+
# remove the first assistant message if it is present
|
424
|
+
if len(message_window) > 0 and message_window[0]["role"] == "assistant":
|
425
|
+
message_window = message_window[1:]
|
426
|
+
# add the system prompt if the first message is not a system message
|
427
|
+
if message_window[0]["role"] != "system" and system_prompt is not None:
|
428
|
+
message_window = [system_prompt] + message_window
|
429
|
+
|
430
|
+
image_window = []
|
431
|
+
|
432
|
+
image_list = prompt_images + history.images
|
433
|
+
image_count = 0
|
434
|
+
|
435
|
+
# iterate through the messages to count how many images are present
|
436
|
+
new_message_window = []
|
437
|
+
for m in message_window:
|
438
|
+
message_content = m["content"]
|
439
|
+
message_role = m["role"]
|
440
|
+
|
441
|
+
if "\ninventory:\n" in message_content:
|
442
|
+
message_content = (
|
443
|
+
message_content.split("\ninventory:\n")[0]
|
444
|
+
+ "\ninventory:<|inventory|>"
|
445
|
+
)
|
446
|
+
|
447
|
+
if "<|inventory|>" in message_content:
|
448
|
+
image_count += 1
|
449
|
+
|
450
|
+
new_message_window.append(
|
451
|
+
{"role": message_role, "content": message_content}
|
452
|
+
)
|
453
|
+
|
454
|
+
assert image_count <= len(image_list), "Too many images"
|
455
|
+
# get messages from end of queue
|
456
|
+
image_window = image_list[-image_count:]
|
457
|
+
image_window = [Image.fromarray(img) for img in image_window]
|
458
|
+
|
459
|
+
return new_message_window, image_window
|
460
|
+
|
461
|
+
@torch.inference_mode()
|
462
|
+
def generate_unconstrained(
|
463
|
+
self,
|
464
|
+
batch_messages: list[list[dict]],
|
465
|
+
images: list,
|
466
|
+
max_tokens: int = 256,
|
467
|
+
temperature=0.6,
|
468
|
+
**kwargs,
|
469
|
+
) -> tuple[list[str], int]:
|
470
|
+
"""
|
471
|
+
Generate unconstrained text based on the batch of messages.
|
472
|
+
"""
|
473
|
+
text_responses, total_tokens_used = self.model.generate(
|
474
|
+
batch_messages=batch_messages,
|
475
|
+
batch_images=images,
|
476
|
+
do_sample=True,
|
477
|
+
temperature=temperature,
|
478
|
+
max_new_tokens=max_tokens,
|
479
|
+
)
|
480
|
+
return text_responses, total_tokens_used
|