reimplement 1.13 or 1.14 for real
rom1504 opened this issue ยท 35 comments
use bit-buffer, it works well
serious example of use at https://github.com/MephisTools/diablo2-protocol/blob/master/lib/utils/itemParser.js
i really want to help, but its all a bit confusing
what exactly needs to be done? i consider myself a pretty good programmer so i don't think ill have trouble once i get started, but i just dont understand what needs to be done (I also have no experience with the minecraft protocol, so... that might be an issue.)
implement reading and writing that format https://wiki.vg/Chunk_Format for this API https://github.com/PrismarineJS/prismarine-chunk#api
the main skill to have here is bit manipulation
the main skill is especially reverse engineering ๐ฌ
Not really, the format is fully described on wiki.vg
also check https://www.npmjs.com/package/bitfield
one day a mighty soul will fix this problem, just before mojang break everything again in the next version
So.. Let me understand this. What you are looking is that the Prismarine API recognize the compacted data array descripted in this link, right?
Working on a solution myself, just wanted to leave a note/link if anybody else is working on it too.
https://github.com/GlowstoneMC/Glowstone/tree/dev/src/main/java/net/glowstone/chunk
And
https://github.com/GlowstoneMC/Glowstone/blob/dev/src/main/java/net/glowstone/util/NibbleArray.java
GlowStone's solution looks "readable". Haven't tested if it works, but it's in their dev branch. ๐
Is there any progress yet? Do you need some help?
I'm building a project on top of prismarine so i will definitely bring support, right now i had to stop the project for financial reason but will work on the issue as soon as i'm able to get back to the project, don't know tho if it's matter of weeks or months..
are there any progress? what else needs to be done and how much of the https://wiki.vg/Chunk_Format is done?where are the files for 1.13 support?
im a developer but i don't do JS so after i understand the problem i may be able to help...either in code or otherways...
No progress, everything is left to be done.
You have some 1.13 chunk test files in test folder.
Feel free to understand the problem.
Some work is being done on this at
https://github.com/starrynightspy/prismarine-chunk
by @starrynightspy
it still lags behind minecraft releases. Now we have 1.14
Yes but that doesn't matter.
1.14 and 1.13 chunks are pretty similar, if 1.13 gets implemented it will be easy to have 1.14 (and reverse)
If you're interested to contribute, come to discord, @starrynightspy is currently working on it
I've implemented 1.14 chunk reading into my own protocol library in Kotlin.
I'll leave this here as a reference, however I'm not sure how progress on this has changed and if a Kotlin reference is even useful at all.
In the code, there's a test script for 1.13.2 chunks that seems to run correctly. Has 13.2 been implemented?
It was implemented and indeed it passes the tests.
There are several issues :
- We only have internal consistency test (ie load into A, save A, load into B check B = A), which do not check we are actually loading properly nor saving properly => we would need an external consistency test, for example take an other implementation (quarry has one), save to a simple format, also save to that format with the prismarine implementation then check if it's the same
- The 1.13 current implementation is way overcomplex so it's hard to know what could be wrong => hence this issue about creating a good implementation
- I know for a fact the current 1.13 implementation is broken because it didn't work when trying to integrate it in mineflayer
1 and 2 are two tasks that would be useful to work on to move on on this topic
futur is bright, mojang gonna release all obfuscation map :O no more struggle ?
https://github.com/barneygale/quarry/blob/master/quarry/types/chunk.py#L54 is a nice approach
20:38 <barneygale> It took me a while to realise this, but when dealing with chunk data, if you treat the whole packed long array as a bitstring and do a bitwise reverse of
64-bit chunks, then getting/setting values becomes trivial as they're never split up!
20:40 <barneygale> The entry is in `bitstring[idx*bitsPerBlock:(idx+1)*bitsPerBlock`. The kinks are the perf cost on serialize/deserialize, and that you also need to
reverse an entry's bits on set/get.
So does it work?
I think quarry has a working implementation yes. Does that answer your question ?
@andrewpaulino I'm working on an implementation for 1.13. Going to need help with verifying it against quarry though.
Bumping, and also wondering that if people have gotten this working in Python, Java or Go why can't Prismarine wrap those blocks of code, ie. through a child_process?
So, is there any update? Will that PR be able to solve this soon?
Also, what about support for 1.15 and (upcoming) 1.16?
this is done. Look at the open PR.
The blocker is just to make the last fixes in mineflayer. See PrismarineJS/mineflayer#712 (comment)
Nobody cares to do it, so it doesn't get done.
I'm going to take on 1.14 chunks