valence-rs / valence

A Rust framework for building Minecraft servers.
http://valence.rs/
MIT License
2.81k stars 145 forks source link

Enchantment handler and improving ItemStack #413

Open justmangoou opened 1 year ago

justmangoou commented 1 year ago

Describe the problem related to your feature request.

I believe that valence used to have enchantment parser around a year ago. However, I'm unable to find this or anything that similar to it now.

What solution would you like?

I think a valenece_enchant module would be a great solution. But, considering moving ItemStack and ItemKind out of the valence_core package and place enchantment handler inside.

What alternative(s) have you considered?

Reading NBT from ItemStack manually, but it didn't end up well.

Additional context

Nothing

Bafbi commented 1 year ago

I think it would be preferable to create the valence_item crate and to create a parser for the nbt.

justmangoou commented 1 year ago

I think I can make a PR for this