Commit graph

577 commits

Author SHA1 Message Date
Steven Smith
d4d8db1f0c 14w29b 2014-07-16 12:46:41 -07:00
Steven Smith
640e5b30fa Initialize lastPingTime to current time before starting KeepAliveThread loop. Probably fixes #41 2014-06-26 10:43:21 -07:00
Steven Smith
670d471a34 Update for PacketLib changes. 2014-06-21 19:50:58 -07:00
Steven Smith
6d29ff07f8 Update for PacketLib changes. 2014-06-20 14:21:53 -07:00
Steven Smith
861a234a09 Add MobType.GUARDIAN. 2014-06-18 12:06:18 -07:00
Steven Smith
eb23b84e11 14w25a 2014-06-18 11:59:33 -07:00
Steven Smith
96c0c4bdda Merge recent pull request changes into snapshot branch 2014-06-09 08:35:45 -07:00
Steveice10
1440d8955f Remove unneeded Face.UNKNOWN to -1 mapping 2014-05-21 16:34:14 -07:00
Steveice10
843d77b6b6 Merge changes from @MylesIsCool 2014-05-21 16:09:02 -07:00
Steveice10
1ea9b9bea9 14w17a 2014-04-24 17:01:49 -07:00
Steveice10
bfbca651ba Read ServerMapDataPacket data as unsigned bytes. 2014-03-30 16:11:21 -07:00
Steveice10
91d8f0f57c Move authentication code to MCAuthLib 2014-03-30 10:48:44 -07:00
Steveice10
fdbb8168c5 Bump OpenNBT version to 1.4 2014-03-25 20:18:25 -07:00
Steveice10
09eb9f3cfe Add endermite to MobType 2014-03-22 20:46:45 -07:00
Steveice10
1e3461659e Fix PlayerState number values 2014-03-22 19:53:18 -07:00
Steveice10
ad61ce285e Move KeepAliveThread initialization to after calling the login handler, fix ServerNotifyClientPacket, remove full column requirement in ServerMultiChunkDataPacket, properly create visibleParts list in ClientSettingsPacket. 2014-03-22 14:16:55 -07:00
Steveice10
5ff93b6826 Make verify users flag optional 2014-03-22 12:51:10 -07:00
Steveice10
0f11929962 14w11b 2014-03-22 12:11:55 -07:00
Steveice10
3dc42e72a8 Rename ClientEntityInteractPacket to ClientPlayerInteractEntityPacket 2014-03-22 09:41:46 -07:00
Steveice10
f5780c24a2 Rename ClientAnimationPacket to ClientSwingArmPacket 2014-03-21 23:10:44 -07:00
Steveice10
8416c30e10 Add session to server status handlers 2014-03-21 22:51:54 -07:00
Steveice10
f508352d2a Add spectator gamemode 2014-03-21 22:14:09 -07:00
Steveice10
22da13c001 Create skylight array when sky = true 2014-03-17 18:51:01 -07:00
Steveice10
3bff6611bd Refactored ch.spacebase to org.spacehq, reformatted code and line endings. 2014-03-01 16:47:32 -08:00
Steveice10
f2a3bad452 Add @Override to toString 2014-02-22 12:45:40 -08:00
Steveice10
4abc1e4302 14w08a 2014-02-19 10:55:32 -08:00
Steveice10
0eaf5dc774 14w07a 2014-02-19 10:33:43 -08:00
Steveice10
92995ca245 Add getEntityId() to ServerEntityStatusPacket 2014-02-14 18:09:17 -08:00
Steveice10
11c69de21b 14w06b 2014-02-08 19:11:51 -08:00
Steveice10
9a12fe9596 Formatting 2014-01-30 20:29:35 -08:00
Steveice10
3f3c360e91 14w05a 2014-01-30 20:27:52 -08:00
Steveice10
d7a5ec25c6 Moved test out of source folder to example folder 2014-01-30 20:22:03 -08:00
Steveice10
ecc108b2e7 MagicValues fixes, removed the need for NetUtil.hasSky 2014-01-29 17:40:19 -08:00
Steveice10
57f377cdd1 Finish adding new MagicValues system. 2014-01-29 16:59:36 -08:00
Steveice10
5e4b0fa53e Unlike NibbleArray3d, size should not be shifted in ByteArray3d 2014-01-28 21:34:13 -08:00
Steveice10
a9d7bb8019 Add ByteArray3d for easier block access in chunks, renamed NibbleArray to NibbleArray3d 2014-01-28 06:27:47 -08:00
Steveice10
973cb8a790 Fixed ServerSpawnParticlePacket reading offsetZ twice 2014-01-27 16:08:22 -08:00
Steveice10
415903dd33 Most of work moving enums into their own files and adding MagicValues system, apply recent fixes from other branches 2014-01-26 21:52:02 -08:00
Steveice10
4f57237070 Added enum constants for skin flags 2014-01-24 20:34:36 -08:00
Steveice10
30c7b5af27 Remove auth debug messages, throw exceptions instead of printing out error messages 2014-01-24 18:38:17 -08:00
Steveice10
b4d03d2308 14w04b 2014-01-24 18:27:27 -08:00
Steveice10
416f8b0ebe 14w03b 2014-01-22 17:33:12 -08:00
Steveice10
5c81211588 Update to 14w02b 2014-01-11 21:02:29 -08:00
Steveice10
a73654861f Actually implement ServerSetExperiencePacket. 2014-01-11 20:18:38 -08:00
Steveice10
f9f730e19e Reordered ChatColor values, added ChatColor.RESET 2014-01-11 16:16:51 -08:00
Steveice10
cc85d31821 Switched from identifier strings in Message enums to name().toLowerCase(), added HoverAction.SHOW_ENTITY for the future (1.8 action) 2014-01-11 16:07:26 -08:00
Steveice10
6b95b635c7 Changed translation params to a Message array 2014-01-11 15:58:26 -08:00
Steveice10
e0e791d66e fromJsonString -> fromString 2014-01-11 15:53:45 -08:00
Steveice10
23cb077ddb Rewrote most of Message API to be easier to understand and use. 2014-01-11 15:48:12 -08:00
Steven Smith
3a58aa99e0 Update logIn and logOut references in UserAuthentication. 2014-01-11 11:45:11 -08:00
Steven Smith
625c0403dc Update usage of MinecraftProtocol constructor in Test. 2014-01-11 11:43:50 -08:00
Steven Smith
e1c98301ca Allow creating MinecraftProtocol instances with an accessToken instead of a password. 2014-01-11 11:43:03 -08:00
Steven Smith
4517e838ca Update usage of logIn to be lowercase. 2014-01-11 11:40:33 -08:00
Steven Smith
9223f8aaad Change logIn/logOut methods to be all lowercase. 2014-01-11 11:39:57 -08:00
Steven Smith
7949aef02f Add ability to set access token for logging in. 2014-01-11 10:20:58 -08:00
Steven Smith
f5f4075aea Fix reading/writing global entity spawn values. 2014-01-11 09:30:50 -08:00
Steveice10
4a75af8fa9 Use ProtocolConstants in server ping test 2014-01-07 18:58:10 -08:00
Steveice10
a5d007b432 Change packet reading constructors to be private 2014-01-07 18:45:49 -08:00
Steveice10
4764d3a7ee Fix NPE when writing ServerChunkDataPacket if the chunk array is empty. Fixes further issues with #16 2014-01-07 18:33:02 -08:00
Steveice10
3d1915c196 Add convenience constructor to ServerChunkDataPacket for unloading chunks 2014-01-07 18:29:28 -08:00
Steveice10
b0958f9c0c Corrected chunk data full flag behavior to allow less than a full column of chunks to be sent. Closes #16 2014-01-07 16:52:56 -08:00
Steveice10
ee8c53c881 Unknown values in ServerBlockBreakAnimPacket = Stage.RESET 2014-01-03 17:31:51 -08:00
Steveice10
01306f1b94 Somehow this was missed; add keep alive sending 2014-01-03 16:27:20 -08:00
Steveice10
a1a3b749b4 Read message as text if json is null in constructor. 2014-01-03 13:08:05 -08:00
Steveice10
74a9a442be Add Stage.RESET to ServerBlockBreakAnimPacket 2014-01-03 11:50:53 -08:00
Steveice10
30e62ec9e2 ServerAnimationPacket should have a varint entity id 2014-01-03 10:35:35 -08:00
Steveice10
471a15bf8d Added Generic value to ServerBlockValuePacket to fix cases where a server might send the wrong block id 2014-01-03 10:10:46 -08:00
Steveice10
0ba777f18d Changed yaw/pitch in ClientPlayerMovementPacket to floats. Thanks to @hardtoe for pointing out the problems addressed in recent commits 2014-01-03 09:15:51 -08:00
Steveice10
aa5c48558c Implement INVALID Face values in ClientPlayerDigPacket for received values such as 255 2014-01-03 09:14:00 -08:00
Steveice10
8230753d68 Correct reading/writing of ClientAnimationPacket. 2014-01-03 09:10:20 -08:00
Steveice10
5bf933881c Correct reading/writing of ClientEntityActionPacket. Closes #12 2014-01-03 09:06:54 -08:00
Steveice10
cb39f01614 Added DefaultAttribute constructors to Attribute 2014-01-01 09:15:08 -08:00
Steveice10
df043e6271 Improve toString methods in auth package, remove AuthenticationService 2014-01-01 09:12:13 -08:00
Steveice10
c2e238ab8c Moved request methods from AuthenticationService to URLUtils 2014-01-01 09:04:50 -08:00
Steveice10
77a7610f32 Bumped version up to 1.7.4 and improved Message API 2014-01-01 08:43:57 -08:00
Steveice10
e90d9d8031 Added support for translate messages 2013-12-14 17:22:18 -08:00
Steveice10
4088aacd0a Rewrite of library for 1.7.2. Javadocs coming soon 2013-12-14 16:40:30 -08:00
Steveice10
7112e67607 Pre-1.7 misc. fixes (Waiting for 1.7.2 MCP update) 2013-11-01 17:43:53 -07:00
Desmond Connor
b88f30079f Added Visitor Pattern 2013-09-15 12:29:39 +01:00
Steveice10
36b8747461 Fix writing field in PacketBlockAction. Thanks to Cr0s for the heads up with problems fixed in this commit and the previous one. 2013-08-18 10:17:49 -07:00
Steveice10
f65f0f59e5 Fixed some packets, added forge dimension field compatibility to PacketLogin (set PacketLogin.FORGE = true) 2013-08-18 10:14:14 -07:00
Steveice10
3f0ad4b462 Fix writing length in PacketMapChunk 2013-08-06 08:18:58 -07:00
Steveice10
9f7e7302a5 Ignore reading in closing socket 2013-07-25 18:58:45 -07:00
Steveice10
e2f325a3f1 Added particle name constants 2013-07-25 11:16:20 -07:00
Steveice10
eed5957621 Added missing spawn particle packet 2013-07-25 11:10:31 -07:00
Steveice10
332d179a15 Initial names for operations based on source code analyzation. 2013-07-15 12:45:03 -07:00
Steveice10
fa3ced180a Rename EntityProperty related classes and almost complete namings (remaining: entity attribute operation ids) 2013-07-15 12:31:45 -07:00
Steveice10
4f5986cd41 Added more complete support for PacketEntityProperties, still need to name 1.6.2 addition 2013-07-15 12:06:03 -07:00
Steveice10
f21d07e4e1 Fixed StandardInput.readBytes 2013-07-11 20:46:41 -07:00
Steveice10
f709c115df Replaced protocol enum with packet registry abstract class. Allows for easier implementation of multiple protocols, both internally and externally. 2013-07-10 10:06:18 -07:00
Steveice10
daffd83b24 Changed Y values in PacketPlayerDigging and PacketUseBed to unsigned bytes 2013-07-10 10:00:22 -07:00
Steveice10
0d63243fb7 Don't send packet if the connection isn't connected. Also, set connected to false in CloseThread for good measure 2013-07-09 18:31:30 -07:00
Steveice10
8c9a593204 Clear packet queue on disconnect. Also, make sure writing/reading are set to false on error 2013-07-09 17:44:35 -07:00
Steveice10
c049d00fdf Tweaked disconnect methods 2013-07-09 17:41:22 -07:00
Steveice10
be83d60f7c Refactored PacketServerPing a bit 2013-07-09 12:18:51 -07:00
Steveice10
a50085a595 Updated to 1.6.2 protocol (PacketEntityProperties not fully complete) 2013-07-09 08:50:11 -07:00
Steveice10
4da575f615 Rewrote most of connection/protocol API 2013-07-04 23:21:47 -07:00
Steveice10
d467df8f02 Updated to 1.6.1, performed cleanup and javadoc-ing 2013-07-04 21:32:15 -07:00
Steveice10
fe0896efe5 Ensure socket is properly closed 2013-05-20 21:33:50 -07:00
Steveice10
dd80f74776 Fixed packet reading/writing for PacketItemData 2013-05-20 15:34:16 -07:00
Steveice10
44ea6d654a Lower CPU usage of threads 2013-05-18 19:19:49 -07:00
Steveice10
35969b1c32 Added event for debugging packet sending 2013-05-18 16:27:21 -07:00
Steveice10
e74681587f Fix PacketRespawn field types 2013-05-14 19:43:29 -07:00
Steveice10
07fd400335 Added reason to DisconnectEvent 2013-05-13 16:08:08 -07:00
Steveice10
fd72886ead Merge pull request #2 from btilm305/master
Fix packet read/write info for Packet207SetScoreboardScore
2013-05-13 16:01:42 -07:00
Steveice10
2b6be50840 Added DisconnectEvent 2013-05-13 15:49:21 -07:00
btilm305
0e191e0f1c Fix packet error
Fixes "BAD PACKET ID" from being thrown whenever this.action == 1 as per [mc-dev](https://github.com/Bukkit/mc-dev/blob/master/net/minecraft/server/Packet207SetScoreboardScore.java#L32-L35).
2013-05-13 16:26:31 -04:00
Steveice10
0e9fce910a Added utility constant classes for different byte constants 2013-04-02 17:02:04 -07:00
Steveice10
ba8b47f9e3 Updated for 1.5 2013-04-02 16:16:52 -07:00
Steveice10
1cc95973c6 Call onConnect when a connection is made to a server, add documentation and utilities for responding to a server list ping. 2013-03-05 06:59:38 -08:00
Steveice10
69429e52a9 Updated to 1.4.6 2012-12-22 20:36:04 -08:00
Steveice10
c4ccc2b749 Added server slistener and fixed connecting to servers 2012-11-28 07:06:38 -08:00
Steveice10
f506a7eb5f Fixed writing ItemStack as metadata 2012-11-27 18:36:00 -08:00
Steveice10
4b6cd21d98 Formatting 2012-11-27 18:34:09 -08:00
Steveice10
6b3768fe57 Updated protocol version. 2012-11-21 21:47:34 -08:00
Steveice10
2a51a06742 Added pocket edition magic constant 2012-10-29 20:04:01 -07:00
Steveice10
15e7e10d94 Updated for 1.4 protocol 2012-10-29 19:51:24 -07:00
Steveice10
888ddb036d Restructuring and abstraction 2012-10-29 19:36:03 -07:00
Steveice10
33adbca643 Formatting and readme update 2012-09-08 21:48:49 -07:00
Steveice10
5e3286b98e Merge pull request #1 from rapodaca/master
Example and minor tweaks
2012-09-08 21:44:52 -07:00
Rich Apodaca
615de16960 Fix minor typos 2012-09-08 21:40:33 -07:00
Rich Apodaca
c09f3fabd7 Added ChatBot example, updated README. 2012-09-08 21:35:29 -07:00
Rich Apodaca
ac1196a5f4 Fix annotation error. Added username-only method Client#setUser. 2012-09-08 20:52:35 -07:00
Steveice10
7607ba30be Don't use multi-catch try 2012-09-02 23:18:13 -07:00
Steveice10
9680f15d09 Server keep alive 2012-09-02 23:16:15 -07:00
Steveice10
02d3442182 Added Connection.isConnected() 2012-08-12 19:27:43 -07:00
Steveice10
450095417e Initial commit 2012-08-12 18:56:36 -07:00