feat(client): add menu field

This commit is contained in:
2025-02-23 17:19:26 -05:00
parent 543f0af741
commit 9b0f8ec406
4 changed files with 48 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ impl UserData for Container {
f.add_field_method_get("contents", |_, this| {
Ok(this.inner.contents().map(|v| {
v.iter()
.map(|i| ItemStack { inner: i.clone() })
.map(|i| ItemStack::from(i.to_owned()))
.collect::<Vec<_>>()
}))
});
@@ -58,7 +58,7 @@ impl UserData for ContainerRef {
f.add_field_method_get("contents", |_, this| {
Ok(this.inner.contents().map(|v| {
v.iter()
.map(|i| ItemStack { inner: i.clone() })
.map(|i| ItemStack::from(i.to_owned()))
.collect::<Vec<_>>()
}))
});