Commit graph

122 commits

Author SHA1 Message Date
Robin Lambertz
9eeea84e92 Merge pull request #208 from rom1504/better_error_and_fix_from_1.9
Better error and fix from 1.9
2015-08-08 14:53:23 +02:00
Robin Lambertz
ebf9d431a5 Merge pull request #207 from rom1504/use-minecraft-data
use protocol.json from minecraft-data
2015-08-06 14:29:02 +02:00
Romain Beaumont
5743cd8b64 Revert "Add some debug information (useful to update to an updated protocol)"
This reverts commit d2435c8dcd.
2015-08-05 23:30:04 +02:00
roblabla
ff95752e45 Store yggdrasil login results, some use-cases need it 2015-08-05 21:19:01 +00:00
Romain Beaumont
d2435c8dcd Add some debug information (useful to update to an updated protocol) 2015-08-02 18:14:58 +02:00
Romain Beaumont
f625cd8e8b Remove some console.log 2015-08-02 18:14:58 +02:00
Romain Beaumont
4466bedac9 Fix entityMetadata : container is ambiguous 2015-08-02 18:14:58 +02:00
Romain Beaumont
6b6303b853 use protocol.json from minecraft-data
fix #163
2015-08-01 20:13:32 +02:00
Romain Beaumont
1226f0f520 split index.js into mainly createClient.js and createServer.js
also create a few other files containing common information and functions :
* mcHexDigest.js which contain the function of the same name used in both createClient.js and createServer.js
* ursa.js which handle the abstraction on top of ursa and ursa-purejs : used in both createClient.js and createServer.js
* version.js used in index.js, createClient.js and createServer.js
2015-07-27 02:26:36 +02:00
roblabla
452be2b196 Bump MINOR, UUIDs are now represented as dashed string 2015-07-18 17:48:26 +00:00
Robin Lambertz
c9a740f989 Merge pull request #178 from roblabla/feature-remove-ustring
Remove ustring
2015-05-23 15:27:26 +02:00
roblabla
3815201792 Remove ustring 2015-05-23 10:27:35 +00:00
Romain Beaumont
1a9e08cbd8 move createPacketBuffer and parsePacketData functions to serializer, also move protocol's exports to serializer 2015-05-23 03:31:47 +02:00
roblabla
2b1a0f86cd Improved error handling 2015-05-22 23:43:32 +00:00
Robin Lambertz
84079bb0a8 Merge pull request #173 from rom1504/refactor_numeric
refactor numeric.js : all the functions were the same
2015-05-23 01:16:30 +02:00
Romain Beaumont
3c61f24991 remove write callback
knowing when the packet has been sent is not an useful information : the fact that it's sent doesn't mean it is received and what we usually want is that the packets are in the proper order no when they are sent
2015-05-23 01:10:58 +02:00
roblabla
f6a16bfdff Reintroduce packetsToParse 2015-05-22 22:25:12 +00:00
roblabla
64f24858dd Fix writing packets by name or [state,id] 2015-05-22 22:24:47 +00:00
roblabla
f5192ba8b7 remove debug in serializer transform 2015-05-22 21:32:10 +00:00
roblabla
3c0a8eee8f Remove now unused functions 2015-05-22 19:24:09 +00:00
roblabla
f5dda55f81 Reintroduce writeRaw 2015-05-22 19:22:21 +00:00
roblabla
6e6b51ca10 Better node compatibility : Use readable-stream 2015-05-22 19:00:01 +00:00
roblabla
17dea74357 Rewrite of the internal serializer using transform streams 2015-05-21 20:35:03 +00:00
Romain Beaumont
9866ee41fb refactor numeric.js : all the functions were the same 2015-05-21 16:56:38 +02:00
roblabla
fb6641b374 Fix node-mc-proto disconnecting players from the notchian client 2015-05-19 13:08:09 +00:00
Romain Beaumont
6446b205f0 add callback to write (socket.write *is* async) fix #168 2015-05-18 19:01:23 +02:00
Romain Beaumont
8a6a9c00e9 fix compressPacketBuffer : it was not compressing anything until now, also fix a problem in newStylePacket to handle the correct dataSize 2015-05-18 18:24:10 +02:00
roblabla
3cab629259 Oops, remove source-map-support 2015-05-16 01:11:50 +00:00
radare-travis
02d09e377b Properly handle this frame in nested structures 2015-05-16 01:07:52 +00:00
radare-travis
aad5ba0fd9 Properly handle multiple set_compression requests during PLAY state 2015-05-16 01:07:10 +00:00
Romain Beaumont
1dec8ccffd fix indentation and a few other stuff webstorm felt like fixing (for example if (condition) -> if(condition) since that was the more frequent style in node-minecraft-protocol) 2015-05-14 22:08:49 +02:00
Romain Beaumont
77a2eb95dd fix a missing require in structures.js 2015-05-14 20:07:18 +02:00
Romain Beaumont
f87dd9595d remove unneeded assert require 2015-05-14 12:58:05 +02:00
Romain Beaumont
778752f097 move packets reading to packets.js, remove some dead code 2015-05-13 15:15:16 +02:00
Romain Beaumont
78e70dad8e reorganize code a bit : debug code going to debug.js, put packets reading code in a function, add types using a addTypes function 2015-05-13 14:47:28 +02:00
Romain Beaumont
fe443e84ff move entity metadata type to minecraft.js 2015-05-13 04:06:14 +02:00
Romain Beaumont
877ede063d move condition type to conditional.js 2015-05-13 04:02:46 +02:00
Romain Beaumont
fe04239090 create structure.js file with array, container and count 2015-05-13 03:56:51 +02:00
Romain Beaumont
17d0aa1a22 move rest buffer to minecraft.js 2015-05-13 03:08:05 +02:00
Romain Beaumont
3b7ae54b88 add minecraft datatype file for minecraft specific packets 2015-05-13 02:58:07 +02:00
Romain Beaumont
6f460e1626 move varint, bool, string, ustring and buffer to utils.js 2015-05-13 02:43:52 +02:00
Romain Beaumont
355a3cb1cd more numeric types move 2015-05-13 02:19:56 +02:00
Romain Beaumont
6660a3aa39 put getField in a utils.js file, create a datatypes dir in src/ make it compile by gulp, move byte to numeric.js 2015-05-13 02:04:26 +02:00
Romain Beaumont
04a3f72130 readCondition now return value==null when the condition is not met instead of returning null (when read returns null it means there was an error), check if value is null in readContainer and parsePacketData and don't include it if so, improve "field x missing" error message in test.js a bit 2015-05-09 16:08:54 +02:00
Romain Beaumont
63b332ce38 remove condition property checks, also remove that property from the schema 2015-05-09 06:21:39 +02:00
Romain Beaumont
faed176631 add new condition type :
* protocol.js : new read, write and sizeOf methods and add check for condition type inside read
* update protocol.json
* update protocol_schema.json
* some fixes in test.js to handle the new condition type
2015-05-09 05:58:12 +02:00
Romain Beaumont
ffa11996c4 remove function test in evalCondition : a condition is now never a function 2015-05-08 04:05:46 +02:00
Romain Beaumont
a1ec6138b7 convert protocol_def.js to protocol.js 2015-05-08 03:52:57 +02:00
Romain Beaumont
b350229160 hexa to hexa string from json convertion 2015-05-08 03:37:42 +02:00
Romain Beaumont
ea2e97d59f removing comments before transformation to json : they'll have to go somewhere else 2015-05-08 03:25:40 +02:00
Romain Beaumont
9abe799715 transform typeArgs function into object 2015-05-08 03:22:37 +02:00
Romain Beaumont
bf8a7899ae transform condition functions into objects 2015-05-08 03:08:30 +02:00
Romain Beaumont
e47feb1cf6 encapsulate condition evaluation 2015-05-08 02:26:45 +02:00
Romain Beaumont
d37d801e01 move protocol definition in separate file 2015-05-08 02:13:07 +02:00
roblabla
c034373da7 Revert "Fix stackoverflow in recursion"
This reverts commit 29302ad683.
2015-04-26 13:44:03 +00:00
roblabla
c2acd84f4c Revert "Let's use process.nextTick to avoid multiple gigs of ram usage :D"
This reverts commit 4601abb333.
2015-04-26 13:43:56 +00:00
roblabla
4601abb333 Let's use process.nextTick to avoid multiple gigs of ram usage :D 2015-04-26 13:14:53 +00:00
roblabla
29302ad683 Fix stackoverflow in recursion 2015-04-26 13:03:28 +00:00
roblabla
5806bd5a7d Avoid crashing when decrypting fails 2015-04-14 12:38:16 +00:00
roblabla
37e2f10cd7 Silence debug message, and make it much more useful 2015-04-10 21:45:03 +00:00
deathcap
bbbd022f33 Move network-specific code out of client.js 2015-03-28 23:24:23 -07:00
Josh Wolfe
23945f54c3 slightly cleaner readPosition 2015-03-26 18:47:46 -07:00
Brian Schlenker
a773bb13e7 added hook for before client receives ping
createServer takes additional option 'beforePing' which is a function
receiving the response to send back to the client and the client object,
and returning a modified response to send back.
The client now has the serverHost, serverPort, and protocolVersion
pulled from the handshake packet. This can be used to proxy
the client to different backend servers depending on the domain name.
2015-03-26 01:50:57 -07:00
Romain Beaumont
88b8653b4d fix indentation 2015-03-25 04:12:58 +01:00
Romain Beaumont
456331b952 fix readPosition (see http://wiki.vg/index.php?title=Data_Types&diff=6529&oldid=6491) thanks Fenhl 2015-03-25 04:09:36 +01:00
roblabla
254223d9c7 Wrong context when grabbing username 2015-03-23 16:20:50 +00:00
roblabla
ea62fdc670 Fix particle packet 2015-03-23 12:45:06 +00:00
Romain Beaumont
f48b0ed159 Fix animation (see http://wiki.vg/Protocol#Animation) 2015-03-22 02:43:50 +01:00
Romain Beaumont
478140364a Fix bed package (see http://wiki.vg/Protocol#Use_Bed) 2015-03-22 02:11:52 +01:00
Will Franzen
06cd5f5441 Fix require statements 2015-03-06 23:00:32 -06:00
Will Franzen
4e32c12bfd Merge branch 'master' of https://github.com/PrismarineJS/node-minecraft-protocol into es6
Conflicts:
	.gitignore
	index.js
	package.json
2015-03-06 22:50:28 -06:00
Will Franzen
423305a19d Set up gulpp 2015-02-22 10:27:46 -06:00