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

add as_property_list method for Block #147

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

urisinger
Copy link
Contributor

this method is supposed to make it easier to query block properties in a generic non block specific way

Copy link
Collaborator

@mat-1 mat-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the struct name should be parsed and used for this since it has a bunch of special cases and is only meant for humans.
The property.name field is the one that's chosen by Minecraft and used for things like setblock commands.
Previously (like before the commit I just made a minute ago) the names weren't guaranteed to be unique per-block (so brewing stands had has_bottle thrice) but now they should actually be suitable for this.

Oh also, maybe rename as_property_list to as_property_map since it's technically more of a map than a list

@urisinger
Copy link
Contributor Author

urisinger commented May 26, 2024

ill work on that soon, i think there should also be a way to also set properties, a map might not be the optimal solution, a set_property and get_property method could also work

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.

2 participants