Commit Graph
16 Commits
Author SHA1 Message Date
DaniD3v fe56d32463 Renamed block_size to block_bit_size for readability 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 03fcdc2e32 Imported serde::Deserialize to avoid spelling it out frequently. 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
lukas0008 0d05e5ef36 Add .set_block on ChunkData 2024-08-21 17:31:43 +02:00
Alexander Medvedev 222b40c8bd Add World struct
We also check now if world exits
2024-08-19 21:14:48 +01:00
Alexander Medvedev de7b3aa2ea Fix: all clippy warns 2024-08-19 20:08:02 +01:00
Snowiiii 40fe40355f Add BlockFace 2024-08-17 11:14:38 +02:00
Snowiiii bf92fe22a0 Add Particles 2024-08-16 12:45:58 +02:00
lukas0008 03f9b377d5 Optimize chunk loading
- Chunk loading now is done in a more simple manner. Instead of splitting it into regions and having one file handle for all chunks in the same region, now all chunks make their own file handle for the region, the previous overhead was not worth it, since this seemed to increase performance.
- Speed up of ~15%
- Now the `.read_chunks` function does not return anything, instead it sends event to an mpsc channel.
- Dramatically decreased memory footprint.
2024-08-13 23:30:20 +02:00
Snowiiii 9fc86e260b Add: Basic Combat 2024-08-13 09:16:00 +02:00
lukas0008 435cd3b365 Remove development things 2024-08-12 20:43:15 +02:00
lukas0008 eaf806a928 NOW IT FULLY WORKS 2024-08-12 20:23:15 +02:00
lukas0008 a991ce214b CHUNK LOADING KINDA WORKS 2024-08-12 20:22:59 +02:00
Snowiiii 19af3618cb fix: all clippy warns 2024-08-04 00:40:27 +02:00
Snowiiii ae69bbc7f1 Add pumpkin-world
also refactor player
2024-08-04 00:29:20 +02:00