-
Notifications
You must be signed in to change notification settings - Fork 10
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
Explore Interactive Scenes #39
Comments
Taking a look to the API: https://www.stuffaboutcode.com/p/minecraft-api-reference.html
So the interactivity is easy: you need a sword? and when you hit a block, you get the block data that was hit. The block could be a button for example, or a lever. The already interactive blocks in minecraft are: https://minecraft.fandom.com/wiki/Category:Interactive_blocks But we can do addiitonal things when collecting the events. |
Next steps:
|
In the extended API in the Rasperry Juice version, there is an API call to collect the chat messages. With it, you can implement a bot that read the chat messages and do things based on them. It could be pretty interesting also. But I am not sure that this endpoint is implemented in the Forge mod or in Minetest:
https://github.com/arpruss/raspberryjammod ... it seems it takes the chat events also And in Minetest: https://github.com/arpruss/raspberryjammod-minetest it is also implemented |
After thinking a bit about what can be done here. I have decided to build an interactive scene showing the capabilities of McThings:
This is just an stating point from which to evolve. The basic scene will have two Things to play with them. Let's call the Scene the interactive scene. Let's use two pyramids. Let's take a look to the official blocks in the API: https://www.stuffaboutcode.com/p/minecraft-api-reference.html There are not interactive blocks. Ideally. I would like to have the lever and the button and *pressure plates. https://minecraft.gamepedia.com/Button None of them are available in the API, but let's see if we can create them just using Block(block_id). |
Let's take a look to the available blocks using the BlockGallery Thing in 1.12.2 .... https://www.minecraftinfo.com/idlist.htm
Let's confirm we have all of them available.
|
Ok, to generate hits you need to have a sword and right click on a block (left click hits with the sword to do damage, right click is the one generating events). And and event is something like:
Each hit generates 3 events (Up, down, up): And if you leave the button pressed, you get lots of events: |
Ok, so the path is clear to start buiding interactive scenes. In my next session I will implement it! |
The idea is evolving. The scene will have a platform in the sky from which you can see the full scene. And from it, you can build and unbuild things, and change the block used in the construction. Let's see if it is possible to implement in a reasonable way. |
For the future:
|
Development completed! Next step is to merge the branch and to create the video for showing it in action. If you right click with the sword the blocks, this block will be used to build the Thing. If you right click in the glass the default block for the Thing will be used. If you unbuilt a Thing, the next time the default block will be used if you right click the glass. |
I will add a new glass block at the center to hit it also. And move the tower further to see better the Scene. Little effort and much better result! |
All done including a video: https://github.com/juntosdesdecasa/mcthings/releases/tag/v0.30.0 Time to do the tweet! |
Events in Minecrafts, like hitting a block, can be collected from the Python API. So when the player hits a block (for example a button), the scene could change and show/hide Things, for example.
The text was updated successfully, but these errors were encountered: