build(deps)!: update azalea and fix ecs changes

This commit is contained in:
2025-04-18 00:20:55 -04:00
parent 3b154c6a35
commit 63cfc7c9c0
24 changed files with 2690 additions and 1881 deletions

View File

@@ -1,6 +1,6 @@
use azalea::blocks::{
Block as AzaleaBlock, BlockState,
properties::{ChestType, Facing, LightLevel},
use azalea::block::{
BlockState, BlockTrait,
properties::{ChestKind, Facing, LightLevel},
};
use mlua::{Function, Lua, Result, Table};
@@ -21,7 +21,7 @@ pub fn get_block_from_state(lua: &Lua, state: u32) -> Result<Option<Table>> {
let Ok(state) = BlockState::try_from(state) else {
return Ok(None);
};
let block: Box<dyn AzaleaBlock> = state.into();
let block: Box<dyn BlockTrait> = state.into();
let behavior = block.behavior();
let table = lua.create_table()?;
@@ -46,10 +46,10 @@ pub async fn get_block_states(
for block in
(u32::MIN..u32::MAX).map_while(|possible_id| BlockState::try_from(possible_id).ok())
{
if block_name == Into::<Box<dyn AzaleaBlock>>::into(block).id()
if block_name == Into::<Box<dyn BlockTrait>>::into(block).id()
&& (if let Some(filter_fn) = &filter_fn {
let table = lua.create_table()?;
table.set("chest_type", block.property::<ChestType>().map(|v| v as u8))?;
table.set("chest_kind", block.property::<ChestKind>().map(|v| v as u8))?;
table.set("facing", block.property::<Facing>().map(|v| v as u8))?;
table.set(
"light_level",
@@ -60,7 +60,7 @@ pub async fn get_block_states(
true
})
{
matched.push(block.id);
matched.push(block.id());
}
}
}