Commit Graph

143 Commits

Author SHA1 Message Date
joo
f492adfeff Add support for Minecraft snapshots 17w43a-18w02a (protocol 341-353).
Add support declaration for Minecraft version 1.8.9 (protocol 47).
2018-01-13 01:12:28 +00:00
joo
da7c13076f Fix: client.handshake.get_packets returns a dict instead of a set. 2018-01-13 01:02:00 +00:00
joo
1766b30983 Remove duplicates from SUPPORTED_PROTOCOL_VERSIONS. 2018-01-07 23:56:31 +00:00
TheSnoozer
821dad72ca Merge remote-tracking branch 'upstream/testing' 2018-01-03 23:53:58 -05:00
TheSnoozer
860628f64b the main hand attribute for ClientSettingsPacket was added in 15w31a [Protocol Version is now 49] and causes the client to send more data than the server expects which result in a instant disconnect while connecting to a 1.8.8 server 2017-11-19 23:22:00 -05:00
joo
af559e181a Remove limits on number of packets read/written per tick.
This addresses possible memory leaks or crashes caused by overflowing packet backlogs.
2017-10-10 04:47:50 +01:00
joo
88a5fdc637 Merge branch 'master' into testing 2017-09-24 06:36:52 +01:00
TheSnoozer
61d9695226 support 1.12.2 2017-09-19 18:30:51 -04:00
joo
e9f095de42 Add ClientSettingsPacket and PluginMessagePacket.
Improve Packet string representation.
2017-08-24 05:49:32 +01:00
joo
b79e7b5f28 Add tests for early and outgoing packet listeners. 2017-08-22 17:50:16 +01:00
joo
9497aae8fa Make FakeServer class more reusable, and extract it into its own module. 2017-08-22 14:22:12 +01:00
joo
593c98f168 Add support for early and outgoing packet listeners. 2017-08-21 21:06:28 +01:00
joo
9765e936c9 Fix incorrect packet IDs for PlayerPositionAndLookPacket for old protocol versions. 2017-08-20 07:35:14 +01:00
joo
46e058dd08 Update all tests, docs and code to use new packet names. 2017-08-09 20:53:54 +01:00
joo
f1ae765458 Add docstring about legacy packet names to packets module. 2017-08-09 19:32:07 +01:00
TheSnoozer
61b07f52f2 better packet names to match new packet structure 2017-08-09 16:33:41 +01:00
TheSnoozer
64cf23436b the class 'Type' needs to have '__slots__ = ()', otherwise every instance of 'Position' will have an unnecessary empty '__dict__' allocated 2017-08-09 16:33:41 +01:00
TheSnoozer
2f0dbf5cbb fix flake error as suggested 2017-08-09 16:33:41 +01:00
TheSnoozer
7eef61bfde use 'zlib.decompressobj' to handle the 'faulty' compression correctly as suggested in https://github.com/ammaraskar/pyCraft/pull/68 2017-08-09 16:33:41 +01:00
TheSnoozer
ab71aeeb7d Revert "deal with faulty compression's"
This reverts commit 357340e6dc.
2017-08-09 16:33:41 +01:00
TheSnoozer
346b3081ec fix broken tests 2017-08-09 16:33:41 +01:00
TheSnoozer
4a508f935b use namedtuple for position type and use it as subclass for ClientExplosion.Record 2017-08-09 16:33:41 +01:00
TheSnoozer
8552c6efe5 regorganize packet structure as outlined in https://github.com/ammaraskar/pyCraft/pull/68 2017-08-09 16:33:41 +01:00
TheSnoozer
f8781c19c8 The packet IDs of Entity Velocity (0x3E), Update Health (0x41), Combat Event (0x2D), and Client Status (0x03) changed in [protocol 336 (snapshot 17w31a)](http://wiki.vg/index.php?title=Pre-release_protocol&oldid=13265) 2017-08-09 16:33:41 +01:00
TheSnoozer
6137436d03 feedback: add write method 2017-08-09 16:33:41 +01:00
TheSnoozer
5349ff2730 feedback: we can use enum since subclass packets do no vary depending on the type id 2017-08-09 16:33:41 +01:00
TheSnoozer
d8fc742862 feedback: pass x, y, z as arguments since types classes are supposed to abstract away the python types and sending them over the network and calling an encode method before sending breaks that a little. 2017-08-09 16:33:41 +01:00
TheSnoozer
9ab2e1ae69 fix tox -e pylint-errors 2017-08-09 16:33:41 +01:00
TheSnoozer
fdb5a0bb72 fix tox -e flake 2017-08-09 16:33:41 +01:00
TheSnoozer
cc466bb0ea fixed an issue with mc 1.8.8 where velocity is not being sent and self.data is negative 2017-08-09 16:33:41 +01:00
TheSnoozer
6fbf75203c add Multi Block Change (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
93227e26fa add Block Change Packet (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
ca30ff2e74 add spawn object (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
3ad5d1abd5 add Explosion Packet (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
81f2ae4070 add Combat Event Packet (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
fecb1d10e9 add Client Status Packet and allow client to respawn when issuing '/respawn' 2017-08-09 16:33:41 +01:00
TheSnoozer
0dc333237b add Update Health Packet (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
6f52ceac0d add Entity Velocity Packet (client bound) 2017-08-09 16:33:41 +01:00
TheSnoozer
9caff502ca add ClientSpawnPlayer packet 2017-08-09 16:33:41 +01:00
TheSnoozer
42ede3f83d deal with faulty compression's 2017-08-09 16:33:41 +01:00
joo
9e7e75f9a7 Increment package version to 0.5.0. 2017-08-03 19:08:36 +01:00
joo
33cd42848e Add version data for Minecraft 1.12.1 (protocol 338). 2017-08-03 18:48:36 +01:00
joo
5aa2d3df59 Add support for Minecraft 17w31a and 1.12.1-pre1 (protocols 336 and 337). 2017-08-03 18:31:00 +01:00
joo
cab8d56746 Revert "Remove unnecessary fileno method from FileObjectWrapper"
This partially addresses issue #65.

This reverts commit c87d7bc6f3.
2017-07-18 13:39:56 +01:00
Ammar Askar
f450ef5ff4
Add test for reactors 2017-07-16 20:02:50 -07:00
Ammar Askar
d686b6487f
Add testing for MapPacket 2017-07-16 15:18:09 -07:00
Ammar Askar
5b261b840e
Refactor out the action of writing out the packet header.
This allows subclasses of Packet to just call the new
method instead of having to duplicate the header writing
and compression code.
2017-07-16 13:40:00 -07:00
Ammar Askar
da967a4e56
Minor coverage improvement for packets 2017-07-16 01:20:08 -07:00
Ammar Askar
c87d7bc6f3
Remove unnecessary fileno method from FileObjectWrapper 2017-07-16 01:03:47 -07:00
Ammar Askar
d8226d266f
Improve tests of types.py 2017-07-16 01:00:14 -07:00