You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f01605f added protocolVersions support with the versions array and versionsByMinecraftVersion index, but looking up the version data by a protocol version would be useful in some situations. Note that since protocol version has two namespaces (usesNetty: true and usesNetty: false), there is protocol version overlap, but this could be solved by using negative integers for usesNetty: false and usesNetty: true.
Proposed use case: related ot PrismarineJS/node-minecraft-protocol#330 Intra-release multi-protocol support. In node-minecraft-protocol, could allow the version options to be either:
typeof version === 'integer': use a version by protocol version integer (versionsByProtocolVersion index)
typeof version === 'string': use a version by minecraft release version string (versionsByMinecraftVersion index)
Both indexes would allow looking up majorVersion to map to the minecraft-data 'dataset' (1.8, 1.9...). The Minecraft release version string is more human-readable, suitable for custom client/app development, and the protocol version integer is more programmatically useful for automatically passing from the ping packet for PrismarineJS/node-minecraft-protocol#331 dynamic cross-protocol support.
This index could be used in #13 Update to use minecraft-data for toMajor(), so these would be equivalent:
I actually did that before commiting f01605f but then I noticed that there are multiple versions for a single protocol version (for example 47 has lot of versions), which one should we return ? all of them ?
About pre/post netty, I was thinking about just separating that index in two (preNettyVersionsByProtocolVersion and postNettyVersionsByProtocolVersion), a bit like what's been done for mobs and objects.
I'm going to return all corresponding versions. For toMajor, I guess I'll just pick the first one. Currently the mapping protocolVersion -> majorVersion is unique anyway.
f01605f added protocolVersions support with the
versions
array andversionsByMinecraftVersion
index, but looking up the version data by a protocol version would be useful in some situations. Note that since protocol version has two namespaces (usesNetty: true and usesNetty: false), there is protocol version overlap, but this could be solved by using negative integers for usesNetty: false and usesNetty: true.Proposed use case: related ot PrismarineJS/node-minecraft-protocol#330 Intra-release multi-protocol support. In node-minecraft-protocol, could allow the
version
options to be either:Both indexes would allow looking up majorVersion to map to the minecraft-data 'dataset' (1.8, 1.9...). The Minecraft release version string is more human-readable, suitable for custom client/app development, and the protocol version integer is more programmatically useful for automatically passing from the ping packet for PrismarineJS/node-minecraft-protocol#331 dynamic cross-protocol support.
This index could be used in #13 Update to use minecraft-data for toMajor(), so these would be equivalent:
(but accessing these indexes may require #14 Lookup protocol data at top-level of module?)
The text was updated successfully, but these errors were encountered: