Commit Graph

161 Commits

Author SHA1 Message Date
DankParrot b286899237 Remove Chunk::heightmaps for now 2020-08-12 20:54:13 -07:00
DankParrot dc6677672a Begin implementation of chunk loading 2020-08-12 20:15:51 -07:00
DankParrot 9689e7996f Implement global palette loading 2020-08-12 20:14:06 -07:00
DankParrot 144c980355 Placeholder: BlockState 2020-08-12 20:05:25 -07:00
DankParrot d38f673c63 NBT: Only call free() if we allocated it 2020-08-12 20:00:17 -07:00
DankParrot 4569c1429d NBT: Indexing operator for ArrayTag 2020-08-12 19:59:56 -07:00
DankParrot 35f91c17a1 NBT: Allow parsing from compressed data 2020-08-12 19:36:40 -07:00
DankParrot 935d29a30d NBT: Bool operator 2020-08-12 18:50:49 -07:00
DankParrot a46ad28499 NBT: Add CompoundTag::GetCompound 2020-08-12 18:17:47 -07:00
DankParrot 017fa39adc Fix ChunkPos cast warning 2020-08-12 18:00:24 -07:00
DankParrot 17c77dc57c Fix annoying Property.h warning 2020-08-12 17:58:24 -07:00
DankParrot a11ad5ba47 Fix FEATHER_LOG_COLUMNS :) 2020-08-07 20:01:58 -07:00
DankParrot 383f3122cf Fix region file loading 2020-08-07 19:45:04 -07:00
Joshua Ashton 799f0f2552 Implement basic chat functionality 2020-08-08 01:25:32 +01:00
Joshua Ashton a5a79e2d38 Add steal to lockable 2020-08-08 01:24:46 +01:00
Joshua Ashton 81e71dd452 Add logging comments 2020-08-07 06:55:17 +01:00
Joshua Ashton 1a32bae941 Update new world code for logging 2020-08-07 06:25:10 +01:00
Joshua Ashton 79c277a440 Refactor logging :) 2020-08-07 06:23:22 +01:00
DankParrot 68a8c22c03 Make Property cast operator inline 2020-08-06 21:49:29 -07:00
DankParrot d4256e9e32 Basic layout for world loading 2020-08-06 21:48:54 -07:00
Joshua Ashton f0043ded2a Merge branch 'master' of https://git.froggi.es/frogcraft/FeatherMC into master 2020-08-07 04:12:21 +01:00
Joshua Ashton 5b44d39e9e Static assert sizes in ReverseBytesBitcast 2020-08-07 04:12:10 +01:00
Joshua Ashton f7c6f7ad97 Implement ReverseBytes for float 2020-08-07 04:11:52 +01:00
Joshua Ashton 68a2852043 Implement ReverseBytes for double properly 2020-08-07 04:09:15 +01:00
DankParrot cc597c3240 NBT: Fix reading primitives from compound tag 2020-08-06 19:02:04 -07:00
Joshua Ashton 7b7b0e4941 Use nbt_payload type instead of decltype hack 2020-08-07 01:30:48 +01:00
DankParrot 9c87657e2c Add basic unconditional KeepAlive 2020-08-05 18:25:36 -07:00
DankParrot a5f37c33a6 Add stub handler for unknown packets 2020-08-05 18:16:28 -07:00
DankParrot 54f346b096 Add enums and local aliases supprot to protocol 2020-08-03 19:14:26 -07:00
DankParrot 1ead4a1590 Spawn the player!!!! 2020-08-03 18:40:15 -07:00
DankParrot 483d1f2e39 Add 'byte' alias for uint8 2020-08-03 18:39:29 -07:00
DankParrot 7c5beda081 Add BlockPos type and Math.h 2020-08-03 18:39:09 -07:00
DankParrot 5e425e402f Add placeholder ReverseBytes for double 2020-08-03 18:38:08 -07:00
DankParrot 880374f98e Fix wrong return type for ReverseBytes 2020-08-03 18:26:45 -07:00
DankParrot 5f29e9cc28 Fix GCC not recognizing template call 2020-08-03 16:52:38 -07:00
DankParrot ecf8a1dd0b Add NBT::Tag::GetData() and NBT::DataBuffer 2020-08-03 16:08:00 -07:00
DankParrot a616c4ce80 Make ListTag iterable 2020-08-02 23:49:16 -07:00
DankParrot 7a03afcad9 Improve core NBT types 2020-08-02 23:49:16 -07:00
Joshua Ashton 5f1af9226a Use 1.15.2 for now 2020-08-03 07:31:33 +01:00
DankParrot 4b6646d8a0 Attempted NBT library with templates
This was a bad idea lol
2020-08-02 22:54:44 -07:00
Joshua Ashton fb0738b37e Add ostream overload to ServerProperties 2020-08-03 06:23:09 +01:00
Joshua Ashton e8244a3359 Add packet generation + handling automagically 2020-08-03 06:07:32 +01:00
DankParrot 8ac6ddfde2 Add zlib subproject 2020-08-01 20:47:53 -07:00
DankParrot 14e416b909 Have meson specify output file to generate_protocol.py 2020-08-01 20:06:45 -07:00
Joshua Ashton 47430c68d2 Hook up protocol generator for now 2020-08-02 02:44:35 +01:00
Joshua Ashton 31e9a181a3 Move generated protocol -> protocol 2020-08-02 01:37:16 +01:00
Joshua Ashton 818c1f55bd Add validity check to TCPListener 2020-08-02 00:55:21 +01:00
Joshua Ashton 5015bfc5c9 Split up networking components to their own files 2020-08-02 00:55:21 +01:00
Joshua Ashton bee6fde1a7 Log connection/disconnect properly 2020-08-02 00:55:21 +01:00
Joshua Ashton 2d64680804 Initial work on Protocol generation 2020-08-01 22:53:12 +01:00
Joshua Ashton 70d41ab577 Misc protocol cleanup 2020-08-01 22:53:02 +01:00
Joshua Ashton 3fbb7f0691 Logging to TCPListener 2020-08-01 07:35:22 +01:00
Joshua Ashton 50da8c2508 Misc socket cleaning 2020-08-01 07:35:22 +01:00
DankParrot 5c0333a192 Sucessfully send Login Success!!! 2020-07-31 22:58:33 -07:00
DankParrot 2e8ed73cc8 Fix NetworkMessage OBOE 2020-07-31 22:58:16 -07:00
Joshua Ashton e8cfc0c1f8 Read all the packets!!!! 2020-08-01 05:53:22 +01:00
DankParrot 06a192a4b0 Hack for legacy server list ping 2020-07-31 21:45:39 -07:00
Joshua Ashton dacb7396be Append to buffer in ReadCallback 2020-08-01 05:19:23 +01:00
Joshua Ashton 9ec90e9083 Use input buffer directly 2020-08-01 05:17:27 +01:00
Joshua Ashton cc03c321f3 Implement socket shutdown/closing 2020-08-01 04:54:31 +01:00
Joshua Ashton 134fd77247 Fix logging in files with Windows includes 2020-08-01 04:53:21 +01:00
Joshua Ashton d4b8842c92 Eliminate needless indirection from TCP stack 2020-08-01 04:38:59 +01:00
DankParrot cb72973db2 Add static cast to WriteVarInt 2020-07-31 18:55:41 -07:00
DankParrot c19b051bee Add clientbound status packet types 2020-07-31 18:52:24 -07:00
DankParrot 8563f6c96f Make WriteVarInt generic like ReadVarInt 2020-07-31 18:51:47 -07:00
DankParrot 4f810153e6 Implement Status Response using ServerStatus 2020-07-31 18:37:30 -07:00
DankParrot bd1febbbf0 Fix rapidjson include dirs 2020-07-31 18:37:19 -07:00
DankParrot 3df02252f7 One Protocol per DedicatedServer 2020-07-31 18:36:29 -07:00
DankParrot 1667740c23 Implement NetworkMessage endianness 2020-07-31 18:10:43 -07:00
DankParrot a53140890d Implement ServerStatus with rapidjson 2020-07-31 17:56:35 -07:00
DankParrot 89a8121e60 Implement PacketReader endianness 2020-07-31 17:53:19 -07:00
Joshua Ashton 9eaef8630f Refactor NetworkMessage 2020-08-01 01:49:42 +01:00
Joshua Ashton 392688ad2c Add newline to end of files 2020-08-01 00:57:33 +01:00
Joshua Ashton 553b9e72f8 Fix libevent building on Linux 2020-08-01 00:55:47 +01:00
Joshua Ashton 0e0a8d89ed Big network rewrites
Hook up protocol, lots of cleaning 🧹
2020-07-31 02:53:45 +01:00
DankParrot aaf6abaf07 Improve Properties system 2020-07-30 17:48:48 -07:00
DankParrot d3d941eb67 Use logging system in more places 2020-07-30 16:43:44 -07:00
DankParrot 09bf4ba110 Further improve logging system
Complain when too many channels
2020-07-30 16:35:18 -07:00
Joshua Ashton c2b100428d Use list instead of vector for clients 2020-07-29 15:34:10 +01:00
DankParrot 5abdafc614 Logging system cleanup 2020-07-28 21:37:22 -07:00
DankParrot 174af32355 Further implement logging system 2020-07-28 21:32:35 -07:00
DankParrot b67d8a11e8 Test of logging system 2020-07-28 18:43:59 -07:00
Joshua Ashton 8423980536 Work on refactoring networking system 2020-07-29 01:46:31 +01:00
Joshua Ashton 118bceb592 Ensure m_offset gets initialized 2020-07-28 05:59:53 +01:00
Joshua Ashton 3a46a59a96 Fix format argument in DispatchQueuedPackets 2020-07-28 05:53:49 +01:00
Joshua Ashton ecf93ddede Fix narrowing error in PrependVarIntSize 2020-07-28 05:53:09 +01:00
Joshua Ashton 6bef4cb4dc Use a generic template read for PacketReader 2020-07-28 05:51:42 +01:00
DankParrot 8dabf013ef Add Protocol, ClientHandle, PacketTypes 2020-07-27 21:45:03 -07:00
DankParrot fb6d99409e Fix PacketReader const pointer 2020-07-27 21:40:47 -07:00
Joshua Ashton 620ee6ade9 Remove superfluous initializations from PacketReader 2020-07-28 05:33:54 +01:00
Joshua Ashton 5401701aca Mark PacketReader functions as inline
If we define this class in multiple objects, this avoids duplicate symbols
2020-07-28 05:32:55 +01:00
Joshua Ashton b23dce8ac9 Use const stuff for PacketReader 2020-07-28 05:29:02 +01:00
DankParrot 051a574aa7 Fix PacketReader segfault 2020-07-27 17:26:46 -07:00
DankParrot 28f64a58e1 Implement PacketReader handling just one buffer 2020-07-27 16:07:18 -07:00
DankParrot a923dd07a2 Add Common.h for general stuff 2020-07-27 16:06:35 -07:00
DankParrot 6e86728d89 Add DynamicNetworkMessage 2020-07-25 20:24:33 -07:00
DankParrot 33896730a8 Remove usage of deleted Buffer.cpp 2020-07-25 17:33:00 -07:00
Joshua Ashton 651da100d3 More work on network messages/buffers 2020-07-25 19:32:13 +01:00
DankParrot 987cc5fc7d Fix missing cstring include 2020-07-24 23:00:05 -07:00
DankParrot 4946a5fa56 Add basic Buffer class 2020-07-24 22:51:59 -07:00