-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make count more general #35
Comments
Concerning padding, I'm thinking of adding a min/max datatype. Something like |
handling "count":64 is indeed useful. (need it for node-raknet) |
can't see how that would eliminate countType. countType means "add the length before the array", count doesn't do that |
The idea is that in places where we can accept both a static number or a protocol-defined number (or anything else for that matter), we should have a standardized way to do it. A "selector".
This pattern comes up quite often in datatypes (array, the fixed data-type I talk about in #57, a few other datatypes I wrote myself in other projects) so having a standardized way to do it with tools to easily operate with that would be good. |
Ah, this would allow compareTo:"value". |
useful for https://github.com/mhsjlw/minecraft-classic-protocol/blob/master/src/datatypes/minecraft.js http://wiki.vg/Classic_Protocol#Protocol_Data_Types
(+ what about padding ?)
The text was updated successfully, but these errors were encountered: