You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is to track all item-related code implemented in the feather repo that should be migrated to libcraft.
If I'm not wrong that would be the code under the core/items crate and the definition of Item in definitions. This would also require the migration of the code generator under feather/definitions.
It would also be great to add the Enchantments to the ItemStack struct and other related ItemStack data.
The text was updated successfully, but these errors were encountered:
has_same_type no longer checks for the item damage.
remove will return Result<u32, ()> instead of a bool being the Ok variant the current count of the ItemStack.
take returns Result<ItemStack, ()> as the take might fail if there are not enough items to be taken.
take_half uses the take function to take half the stack. It returns ItemStack by unwrapping the result as the take function will never fail if we call it with an amount of (self.count as f64 / 2 as f64).ceil() as u32
merge_with returns a bool instead of ()
Replaced &mut ItemStack with &mut Self
Added functions:
has_same_damage: Checks if two ItemStack structs have the same damage value.
has_same_count: Checks if two ItemStack structs have the same count.
has_same_type_and_count: Checks if two ItemStack structs have the same type and count.
has_same_type_and_damage: The old has_same_type. Checks if two ItemStack structs have the same type and damage.
TODO:
Add the codegen for Item. For now, I am using a dummy Item struct.
Create a separate crate for items in core.
Add enchantments and other item data such as title, lore, etc., and its functions.
I will continue with these missing features tomorrow.
This issue is to track all item-related code implemented in the
feather
repo that should be migrated tolibcraft
.If I'm not wrong that would be the code under the
core/items
crate and the definition ofItem
in definitions. This would also require the migration of the code generator underfeather/definitions
.It would also be great to add the
Enchantments
to theItemStack
struct and other relatedItemStack
data.The text was updated successfully, but these errors were encountered: