-
Notifications
You must be signed in to change notification settings - Fork 11
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
Analyze the impact of the Flattening in McPython ecosystem #58
Comments
The Spigot support for legacy material is inside Craftbuckit in the file: We should analyze it to understand how the numeric ids are supported in new versions of MC. It seems that the key is in: import net.minecraft.server.DataConverterFlattenData; But this is a class from the vanilla server. And the mapping is ... huge! |
But, is it possible to just have a new mcpi.blocks mapping the names to the new format? https://www.stuffaboutcode.com/p/minecraft-api-reference.html
With that, all the code using the named blocks won't break. |
After thinking about it, probably the first step is to release a mcpi2 lib supporting materials instead of blocks. Creating a map from raspbi block to materials is easy: just use the blocks gallery to fill the blocks in a new MC post 1.13 and after that, get the blocks definition. And you have the map. With this map, it is easy to add the materials support to mcpi2. Also, the support for the extended API as for example, spawnEntity, must be analyzed. |
The first step is to check that if we send using mcpi (modified) a material using the setBlock API, it is received correctly and created in MC 1.15.2. And after that, we can continue with the plan! As the plugin is configured in legacy mode, using the Python API we can not create blocks using the new materials definition. So for using it, we need a plugin version that works without the legacy material support. |
So the next step is to start the plugin but modifying the version to 1.15
Time to get the last version: https://www.spigotmc.org/resources/raspberryjuice.22724/ |
It seems that the best approach is to test this PR: zhuowei/RaspberryJuice@cec5f99 So we have the plugin for 1.14 and start testing with it. It is pretty easy to package the plugin (mvn package). And I have created a package with the above PR and it works using string for the blocks instead of integers. For example:
I needed also to modify mcpi so I can send strings:
|
And, what about Minetest? All the schematics using Materials can not be created in Minetest. In Minetest the blocks are: https://wiki.minetest.net/Nodes They are using the namespaced blocks ids (itemstrings): https://wiki.minetest.net/Itemstrings How are blocks compatible between MC and MT in our examples? Probably because of the Raspi plugin for MT: https://github.com/arpruss/raspberryjammod-minetest Yes, it is here: https://github.com/arpruss/raspberryjammod-minetest/blob/master/raspberryjammod/block.lua#L211 So to support the new naming in MC, this translation mapping must be updated. |
After thinking about it and doing some PoCs the best strategy seems to be:
In this scenario, we can not use the new blocks (materials) after 1.15.2, but it is good enough for McThings. And my impression is that the creative community (for example for schematics) was more active sometime ago, so having support fot those creations (schematics) is the best approach. And the idea is to continue analyzing the support for Flattening. So the strategy now is to live in the pre-Flattening era. |
From the experience in:
#50
#52
understand the impact of https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening and how it is managed in Spigot with the Legacy Material support.
The text was updated successfully, but these errors were encountered: