Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let encode_nbt has a target type. and add a function for NBT type probing #1838

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

17183248569
Copy link
Contributor

@17183248569 17183248569 commented Oct 31, 2023

this is a small pr, and it is to add this 2 function:

nbt_type(nbt_value [, nbt_path] ) -> return the nbt type of a NBT value.
get_as_nbt(nbt_value , nbt_path ) -> same as nbt_value:nbt_path , but will not try to cast it to scarpet value.

and allows encode_nbt s second argument be 'short' / 'byte' / 'byte_array'...... as the target type.
图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant