aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code
diff options
context:
space:
mode:
authorEightFactorial <29801334+EightFactorial@users.noreply.github.com>2024-12-04 16:31:22 -0800
committerGitHub <noreply@github.com>2024-12-04 18:31:22 -0600
commit6379035b852f1b619565d27f5cee3b93042c2312 (patch)
tree30c858cfaf841d0fcc5a139f1507b9b67d768e8b /codegen/lib/code
parent241c7527ce11177082dcc0ebc4152506946ee684 (diff)
downloadazalea-drasl-6379035b852f1b619565d27f5cee3b93042c2312.tar.xz
Update Bevy and migrate to workspace dependencies and package attributes (#181)
* Use workspace `Cargo.toml` for dependencies and package atributes * Fix a couple clippy warnings * Update bevy, update build script, move deps to workspace, and fix clippy warnings * Remove carrots from crate versions The default behavior is the same * Remove unused dependencies Compiles and all tests pass, so it should be fine * Update codegen to use `std::sync::LazyLock` instead of `once_cell::sync::Lazy` * Update Bevy to `0.15.0-rc.3` Surprisingly little needed to be changed * Update to bevy 0.15.0 * Fix leftover merge issues * Clarify the reason the swarm can't connect * Fix duplicate lint, remove `log` dependency
Diffstat (limited to 'codegen/lib/code')
-rwxr-xr-xcodegen/lib/code/shapes.py3
-rw-r--r--codegen/lib/code/tags.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/codegen/lib/code/shapes.py b/codegen/lib/code/shapes.py
index c4964fa6..a7dd58fb 100755
--- a/codegen/lib/code/shapes.py
+++ b/codegen/lib/code/shapes.py
@@ -119,10 +119,11 @@ def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report):
#![allow(clippy::explicit_auto_deref)]
#![allow(clippy::redundant_closure)]
+use std::sync::LazyLock;
+
use super::VoxelShape;
use crate::collision::{{self, Shapes}};
use azalea_block::*;
-use std::sync::LazyLock;
pub trait BlockWithShape {{
fn shape(&self) -> &'static VoxelShape;
diff --git a/codegen/lib/code/tags.py b/codegen/lib/code/tags.py
index d43b0071..51b41f50 100644
--- a/codegen/lib/code/tags.py
+++ b/codegen/lib/code/tags.py
@@ -8,8 +8,8 @@ def generate_tags(registries: dict, file_name: str, struct_name: str):
generated = f'''// This file was generated by codegen/lib/code/tags.py, don't edit it manually!
-use std::collections::HashSet;
-use std::sync::LazyLock;
+use std::{collections::HashSet, sync::LazyLock};
+
use crate::{struct_name};