Commit Graph

185 Commits

Author SHA1 Message Date
Edvin Bryntesson
cda86fd59e add keep alive packets 2024-09-22 18:01:27 +02:00
StripedMonkey
c13261ba20 standardize use of compact serialization for UUIDs. 2024-09-12 18:02:55 -04:00
StripedMonkey
c4dc376bc9 extract server status publishing into its own file 2024-09-12 18:02:32 -04:00
Snowiiii
f9bf750b65 Add Clientbound Entity Status 2024-09-12 15:42:26 +02:00
Asurar0
df07029671 Merge remote-tracking branch 'Snowiiii/master' into sync_primitives_improvements 2024-09-12 14:23:07 +02:00
Snowiiii
0bebc6fc31 Better doc 2024-09-12 12:33:33 +02:00
Asurar0
c6043189d3 Improved synchronization primitives
- Replaced all `std::sync::Mutex` by `parking_lot::Mutex` and refactored implementation accordingly
- Replaced all `Mutex<T> where T: Copy` by `crossbeam::AtomicCell<T>` and refactored implementation accordingly
2024-09-11 22:39:53 +02:00
Snowiiii
e5bfbce2ce Fix dead locks 2024-09-09 23:22:55 +02:00
Snowiiii
c8fee9b23c Try to solve Pumpkin's locking problem 2024-09-09 21:12:49 +02:00
Edvin Bryntesson
33a5a10f34 Merge branch 'master' into master 2024-09-07 20:42:52 +02:00
Snowiiii
2ee9710f93 Refactor Entity 2024-09-07 19:33:01 +02:00
Alexander Medvedev
cd25387a4b Merge pull request #79 from kralverde/more_packet_hardening
Buffer check for varint decoding
2024-09-07 15:15:40 +01:00
kralverde
e4106c3546 add buffer checks for varint decoding 2024-09-06 16:55:31 -04:00
Edvin Bryntesson
72d95cd416 Merge branch 'master' into master 2024-09-06 21:55:47 +02:00
Edvin Bryntesson
2acd1ed02a refactored state_id to PlayerInventory 2024-09-06 17:53:23 +02:00
Alexander Medvedev
91d190c212 Remove unused deps
to mention is the take_mut dep i removed. Its heavily outdated and uses unsafe combined with pointer magic.
2024-09-06 13:30:57 +01:00
Alexander Medvedev
dad4798844 Update deps 2024-09-06 11:34:59 +01:00
DaniD3v
12e3732765 Replaced #[allow()]'s with #[expect()] 2024-09-06 11:20:53 +02:00
DaniD3v
e08309aacd Removed unused #[allow()]'s 2024-09-06 11:19:52 +02:00
Edvin Bryntesson
d07eec2245 fix so that it actually always updates both clients 2024-09-05 23:34:11 +02:00
kralverde
af878ff549 fix check 2024-09-05 15:29:27 -04:00
kralverde
2993d6bfb6 add checks for everything else 2024-09-05 15:21:33 -04:00
kralverde
fac5436a2b get_string_len extra validity check 2024-09-05 14:28:09 -04:00
Edvin Bryntesson
c98c0ec6bf Merge branch 'master' into master 2024-09-02 10:37:04 +02:00
we sell insurance
047f5a4efc Merge branch 'master' of https://github.com/Snowiiii/Pumpkin into event-api
Resolve merge conflicts
2024-09-01 12:31:09 -05:00
we sell insurance
0a02c28b26 Move serde into workspace 2024-09-01 12:26:48 -05:00
Snowiiii
5c0dffbf9d Dynamic chunk loading 2024-09-01 18:04:27 +02:00
Edvin Bryntesson
b6a6320a1c Merge branch 'master' into master 2024-08-30 11:43:23 +02:00
Snowiiii
7ed46e25a0 Add EntityPose 2024-08-29 17:35:49 +02:00
DaniD3v
e2d2b53f41 Fixed bug where whole chunk can break in one mined block 2024-08-28 17:34:56 +02:00
DaniD3v
cf283323fc BlockId refactor.
Moved `BlockId` to it's own file.
Prefixed all of the `block_registry` types with Registry to avoid confusion.
Made stuff that should not be public private.
2024-08-28 12:52:19 +02:00
DaniD3v
52c34caaa6 Added ChunkBlocks abstraction for ChunkData
ChunkBlocks makes it easy & safer to access blocks of a chunk.
It also makes it possible to consistently handle the heightmap updates in 1 place.
2024-08-28 12:52:07 +02:00
DaniD3v
43164ee4f1 Added abstraction for BlockId
`i32` is really ambiguous and it is not immediately obvious what it is supposed to represent.
`BlockId` is much more readable.

Changed internal type to u16 because we currently have ~30k/64k block states.
(and i32 doesn't make a lot of sense for an Id, except when replicating mojang behavior)
2024-08-28 12:52:07 +02:00
DaniD3v
be98a730b0 Added abstraction for coordinates.
These ensure that there aren't any out of bound values
and make the code significantly more readable
2024-08-28 12:38:22 +02:00
Snowiiii
3b438872a8 Add pumpkin-plugin
mhh, Whats that?
2024-08-27 22:47:21 +02:00
Snowiiii
80ffaff777 Update deps 2024-08-26 17:06:15 +02:00
Edvin Bryntesson
e0a20c1194 Add all functionality of mode zero for packet SClickContainer 2024-08-26 12:58:12 +02:00
Edvin Bryntesson
7b05ded0b3 fix deserialization of SClickContainer 2024-08-26 08:46:57 +02:00
Alexander Medvedev
52ffec0dd3 Merge pull request #61 from neeleshpoli/master
Implement Use Item (packet id 0x39) packet
2024-08-25 21:48:23 +01:00
Snowiiii
9d6c8dc524 Check block distance 2024-08-25 19:16:38 +02:00
we sell insurance
98b983676e Run cargo fmt 2024-08-25 08:36:34 -05:00
we sell insurance
1849dacfc6 Merge branch 'master' of https://github.com/Snowiiii/Pumpkin
Resolve merge conflicts
Update Use Item (SUseItem) to return Ok
2024-08-25 08:27:09 -05:00
Snowiiii
83aad86005 Made everything thread safe
- Also improved gamemode command
- We now can use Server in commands
2024-08-25 13:20:49 +02:00
Snowiiii
ddd3f1e781 Add Serverbound Set Player On Ground 2024-08-25 12:06:09 +02:00
Edvin Bryntesson
c968131e04 make packet public and more abstraction thing 2024-08-25 11:48:24 +02:00
Snowiiii
0ce03c0497 Support Transfer 2024-08-25 09:37:58 +02:00
we sell insurance
6e8a598bab Merge branch 'Snowiiii:master' into master 2024-08-24 18:22:25 -05:00
Snowiiii
d69f6c5fc1 Add Clientbound Teleport Entity
usually used when Player moves more than 8 blocks
2024-08-24 23:07:12 +02:00
Edvin Bryntesson
c408244b37 pass CI 2024-08-24 20:05:49 +02:00
Edvin Bryntesson
507b521340 add packet SClickContainer 2024-08-24 19:15:03 +02:00