azalea/codegen/genblocks.py
mat 7405427199
Mining (#95)
* more mining stuff

* initialize azalea-tags crate

* more mining stuff 2

* mining in ecs

* well technically mining works but

no codegen for how long it takes to mine each block yet

* rename downloads to __cache__

it was bothering me since it's not *just* downloads

* codegen block behavior

* fix not sending packet to finish breaking block

* mining animation 🎉

* clippy

* cleanup, move Client::mine into a client extension

* add azalea/src/mining.rs

---------

Co-authored-by: mat <git@matdoes.dev>
2023-07-14 22:20:40 -05:00

30 lines
969 B
Python
Executable file

import lib.code.version
import lib.code.shapes
import lib.code.packet
import lib.code.blocks
import lib.code.utils
import lib.download
import lib.extract
import lib.utils
version_id = lib.code.version.get_version_id()
shape_datas = lib.extract.get_pixlyzer_data(
version_id, 'shapes')
pixlyzer_block_datas = lib.extract.get_pixlyzer_data(
version_id, 'blocks')
mappings = lib.download.get_mappings_for_version(version_id)
block_states_burger = lib.extract.get_block_states_burger(version_id)
ordered_blocks = lib.extract.get_ordered_blocks_burger(version_id)
block_states_report = lib.extract.get_block_states_report(version_id)
lib.code.blocks.generate_blocks(
block_states_burger, block_states_report, pixlyzer_block_datas, ordered_blocks, mappings)
lib.code.shapes.generate_block_shapes(
pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, mappings)
lib.code.utils.fmt()
print('Done!')