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 CropBlock API #10166

Closed
wants to merge 1 commit into from
Closed

Add CropBlock API #10166

wants to merge 1 commit into from

Conversation

Leguan16
Copy link
Contributor

This pull request exposes the getBaseSeedId methods from crop blocks.
This makes it possible to get the corresponding seed to its block representation.
E.g. Material.POTATO for minecraft:potatoes

I don't know about the name getBaseSeedId. I named it like that cause its the same as the name from the server. Maybe there is a better name for it tho.

@Leguan16 Leguan16 requested a review from a team as a code owner January 14, 2024 22:46
@Machine-Maker
Copy link
Member

I'm not a fan of this. This type of API should wait until Material is split up into ItemType and BlockType, and then a subtype of BlockType can be made for CropBlockType that has such a method.

Putting it on BlockData just seems like a hack to work around that. No nms BlockState or API BLockData is required to make the mapping.

@Leguan16
Copy link
Contributor Author

I mean I totally agree with you on that. I didn't like putting it on BlockData either but the CraftCropBlock extends it so it just made sense as it was the easiest way to do it.

@Warriorrrr Warriorrrr added for: future Issue scheduled for resolution at some point in the future. has rough edges labels Jan 19, 2024
@Owen1212055
Copy link
Member

In general, we are waiting for the BlockType API. This would allow us to better expose API for stuff like this rather than hacking it into the current API we already have.

Feel free to reopen it once that API has gone through. Thank you for your contribution!

@Owen1212055 Owen1212055 closed this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: future Issue scheduled for resolution at some point in the future.
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

4 participants