Commit graph

150 commits

Author SHA1 Message Date
deathcap
0b2550e206 Add forgeMods option, set to array of Forge modifications installed on client 2016-01-23 18:17:18 -08:00
deathcap
6e50863eaa Append \0\FML\0 to hostname in set_protocol packet if Forge enabled
http://wiki.vg/User:Pokechu22/Forge#Connection_to_a_forge_server
2016-01-23 13:04:50 -08:00
deathcap
162a8abb34 Add debug logging for received packet data 2016-01-23 12:10:26 -08:00
Romain Beaumont
eefb113b4c use uuid-1345 instead of 3 uuid packages, fix #297 2016-01-22 12:42:04 +01:00
deathcap
91a404333e Remove non-ES6 class field declarations (ES7 stage 1 proposal)
ES6 does not have support for class field declarations, although it is
an experimental ES7 proposal:
https://github.com/jeffmo/es-class-fields-and-static-properties
For ES6, move the field/property declarations to the constructors.
2016-01-18 18:17:12 -08:00
deathcap
f5e521e9cd Update browser.js, sync with index.js excluding createClient/createServer 2016-01-13 11:07:08 -08:00
Romain Beaumont
dd06a7075e fix small bug that made the latency be NaN sometimes 2016-01-04 20:44:28 +01:00
Romain Beaumont
48565248a1 initialize latency to 0 2015-12-22 00:15:26 +01:00
Maarten
1ffdd8bd4f Added client.latency 2015-12-21 23:53:09 +01:00
Romain Beaumont
b30522188e don't write after end and unpipe everything when ending. fix #110 2015-12-11 14:55:52 +01:00
Romain Beaumont
b2b53c9343 a few small changes to make the code better 2015-11-30 22:19:56 +01:00
Romain Beaumont
fabff6d8ab remove useless variables in readEntityMetadata 2015-11-20 00:59:05 +01:00
roblabla
df8cfa5c4c Add checkTimeoutInterval 2015-11-19 20:53:18 +01:00
Romain Beaumont
d25c4a2017 add optionalNbt, use it directly in protocol.json in packets and for defining slot 2015-11-15 17:48:25 +01:00
Romain Beaumont
c9290e664b properly use protodef nbt inside prismarine-nbt 2015-11-15 03:25:14 +01:00
Romain Beaumont
9a6e7f8f42 fix nbt type, fix #294 2015-11-15 02:37:31 +01:00
Romain Beaumont
d86a59c393 use protodef utils, fix #295 2015-11-09 15:40:04 +01:00
Romain Beaumont
787f8d3423 fix gamemode3 in proxy : fix #146
* correctly generate the same uuidv3 than the vanilla server does in offline mode : fix #282
* remove "one player online mode" in the proxy : it doesn't make sense to identify all players as the user/passwd given in the cli. Now both servers in offline mode.
2015-11-08 23:34:15 +01:00
Romain Beaumont
f45c6dff49 use protodef:
* move general datatypes to protodef along with their tests
* move states to states.js file
* use one protodef serializer by state and direction instead of one big serializer for everything (same thing for the deserializer)
* define a packet as a protodef type using a switch and a container, and adding each minecraft packet as a type (packet_ + name)
* use mapper type from protodef to convert id to name in packet definition
* use general string type : pstring
* divide by 10 the number of iteration in the benchmark to get back to a reasonable test execution time
2015-11-08 23:29:51 +01:00
Romain Beaumont
4e3a4a0efc Trying to enable nmp server compression 2015-10-12 14:17:45 +02:00
Rob Blanckaert
1efc14be78 Fix createServer 2015-10-07 20:50:38 -04:00
Robin Lambertz
d7e74f7f9e Merge pull request #259 from basicer/thenable-before-ping
Allow beforePing to receive a callback.
2015-10-04 22:13:40 +02:00
Rob Blanckaert
16452d4a4c Allow beforePing to receive a callback to call with its result when
it accepts three arguements. Allows async processing while
calculating response.
2015-10-04 13:46:07 -04:00
Robin Lambertz
a37560eb50 Merge pull request #268 from rom1504/remove_readPackets_dep_in_client
remove dependency to readPackets from client.js : fix #267
2015-10-02 01:35:47 +02:00
roblabla
c889f2c5f7 Use node-yggdrasil. Fix validation problem 2015-10-02 01:19:41 +02:00
Romain Beaumont
5962c259a0 remove dependency to readPackets from client.js : fix #267 2015-10-01 15:06:33 +02:00
Romain Beaumont
c9c537e393 remove some stuff I forgot in browser.js 2015-09-30 12:45:38 +02:00
Romain Beaumont
7871ac446a fix proxy relatively to the unexposing of createPacketBuffer
also fix a small bug in serializer.js
2015-09-30 00:03:42 +02:00
Romain Beaumont
917b6adda1 enable cross version with an option in createClient and createServer :
* put parsePacketData in deserializer and createPacketBuffer in serializer
* remove packets from the index and expose readPacket instead
* load packets when needed in various files
* make tests test every supported version
static cross version of #234, fix #65, fix #240
2015-09-29 22:44:28 +02:00
mhsjlw
b4eac8c1c5 Colons are supposed to be next to the closest char
At least, in English
2015-09-24 19:19:26 -04:00
Romain Beaumont
fdc24cbeed Kick client when he is using the wrong version of the client, fix #209 2015-09-24 00:04:13 +02:00
Robin Lambertz
9d9287d64c Merge pull request #248 from rom1504/es6-classes
more es6 classes
2015-09-23 23:07:07 +02:00
Robin Lambertz
7e7d5da2ba Merge pull request #246 from rom1504/fix_protocol_version_in_ping
fix ping.js protocol version
2015-09-23 21:30:24 +02:00
Romain Beaumont
8aa0d786f0 use es6 properties in protocol.js 2015-09-23 21:06:34 +02:00
Romain Beaumont
5aee0000e4 use es6 properties in server.js 2015-09-23 21:04:54 +02:00
Romain Beaumont
68c589a3b0 move getter and setter after the constructor in client.js 2015-09-23 21:03:07 +02:00
Romain Beaumont
bbde23bb02 use es6 properties for client.js
see https://github.com/jeffmo/es-class-properties and http://odetocode.com/blogs/scott/archive/2014/10/14/features-of-es6-part-9-classes.aspx
2015-09-23 21:01:38 +02:00
roblabla
f9484d9444 Implement new context syntax 2015-09-23 15:22:02 +02:00
Romain Beaumont
6e399122bf transform server.js into an es6 class 2015-09-20 21:36:59 +02:00
Romain Beaumont
78ff667c1f transform protocol.js into an es6 class 2015-09-20 21:32:50 +02:00
Romain Beaumont
4e9d8e06c9 transform client.js into an es6 class 2015-09-20 21:12:56 +02:00
Romain Beaumont
6137ffceeb fix ping protocol version 2015-09-20 19:52:49 +02:00
Robin Lambertz
3bbb1eae6a Merge pull request #236 from roblabla/feature-cleanup
Clean up the mess in create/parse Packet. Deprecate ID and [state; ID]
2015-09-20 00:58:15 +02:00
Romain Beaumont
537a99562a use forEach for better speed for containers 2015-09-20 00:55:29 +02:00
roblabla
b85fa944d7 Remove on(id), on([state;id]) and onRaw 2015-09-20 00:55:29 +02:00
roblabla
b1441098f9 Only allow writing by packetName. Refactor whole internals to use packetNames 2015-09-20 00:55:29 +02:00
roblabla
56c9f3ed9a Index packetFields by name. Use packet names in test.js 2015-09-20 00:41:03 +02:00
Robin Lambertz
3a7fad0f2d Merge pull request #242 from rom1504/use_mcdata_version
use minecraft-data version
2015-09-15 17:45:54 +02:00
roblabla
d490134492 Fix server.js 2015-09-15 14:31:06 +00:00
roblabla
cf4048d655 Fix createServer 2015-09-15 14:30:53 +00:00