-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Initial 1.20.2 support #1264
Initial 1.20.2 support #1264
Conversation
…to the version.js and add the Configuration state to states.
…used for 1.20.2 offline clients in the login state.
…20.2 and up, also handle login acknowledged and shift to configuration state
# Conflicts: # src/client/play.js # src/states.js # src/version.js
There is no need to make changes to the NBT like this. There are no changes to the NBT format minus a small special case inside the root compound. Instead, this can be fixed by adding a new parameter to the existing UUID type inside minecraft-data specifying the expected root type, and then implementing that inside nmp here. Inside prismarine-nbt, for the new root type, simply omit the name field in nbt.json. |
@crux153 can you please
|
Also to elaborate on how to do the change to minecraft-data, see how "string" is a "pstring" with a lengthType prop on it. Just like that you can do
anonymousCompound would be alternative to "compound" in nbt.json, but without a name. |
@extremeheat I'm looking at minecraft-data and prismarine-nbt and trying to follow your instruction. But I'm quite confused since it seems like the compound type is actually defined using the nbt type in prismarine-nbt. Also, according to my understanding, adding a parameter like pstring's countType would require defining parametrizable type. I guess your intention is to avoid feature detection in prismarine-nbt and node-minecraft-protocol's protocol handling part, making it configurable in minecraft-data's protocol.json. So in order to achieve something like "nbt": [
"nbt",
{
"tagType": "anonymousCompound"
}
] in minecraft-data/data/pc/1.20.2/protocol.json, it would require defining an additional anonymousCompound under prismarine-nbt's nbt.json without name "nbt": [
"container",
[
{
"name": "type",
"type": "nbtMapper"
},
{
"name": "name",
"type": "nbtTagName"
},
{
"name": "value",
"type": ["nbtSwitch",{"type":"type"}]
}
]
],
"anonymousCompound": [
"container",
[
{
"name": "type",
"type": "nbtMapper"
},
{
"name": "value",
"type": ["nbtSwitch",{"type":"type"}]
}
]
] like this, and then define a parametrizable Please correct me if I'm approaching this entirely wrong. |
thanks for the initial work here, we included information you found here and improved on it at #1265 |
Credits to @xZarex and @wgaylord.
This PR adds preliminary support for version 1.20.2 or later, including support for the configuration stage.
Before merging this PR, we need PrismarineJS/prismarine-nbt#78 to be merged and released.
I have tested that a bot can successfully log in to a server and interact with chunks using this patch. However, please note that I haven't tested all changes introduced in version 1.20.2.