Add common data API endpoint#21
Conversation
|
I'm fine with this approach, can you add a quick example to |
This fixes SpockBotMC#20
|
Sure! I've added a really simple version with a basic While writing the example I realized that the instantiated version of minecraft_data (e.g. |
|
I recognized that it isn't part of the instantiated import minecraft_data
mcd_common = minecraft_data("common")or your current version import minecraft_data
mcd_common = minecraft_data.common()And decided your version is better, since common data is schematically distinct from the rest of the data. The common data has enough useful stuff in it that it's worth including, and in any case this project is supposed to be a thin wrapper around those JSON files so excluding some isn't keeping with that goal. I'm merging this, it will be pushed to PyPI in a few hours along with updating the Minecraft Data submodule. Thanks for the contribution. |
|
Thank you too for maintaining this and your quick and helpful response. |
With this change it is now possible to access the data inside the "commons" folder. By default it accesses the PC version but it fully supports PE too. It supports all files inside the common folder dynamically (With 2.84.0 comes a new file). I tried to closely follow the existing API but let me know if I should change something :)
Thanks for the project!
This fixes #20