Commit graph

29 commits

Author SHA1 Message Date
Ryan Johnson
056b4ebd32
Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
Ryan Johnson
153cde1a04
Chunk Rewrite With Paletted Containers (#91)
The current approach to managing chunk data is misconceived. This new approach uses genuine paletted containers and does not suffer from complexities caused by caching. As a result, memory usage (according to htop) in the terrain example with render distance = 32 has gone from 785 megs to 137 megs. That's 17.4% of the memory it used to use. Terrain generation speed was not affected.
2022-10-07 15:52:55 -07:00
Terminator
ef64296159
Implement prevent-proxy-connections
This adds the `prevent-proxy-connections` server property and implements it into valence.

Note that if the server is in offline mode, this changes nothing.

By default, proxy connections are allowed.

Fixes #95
2022-10-01 10:42:43 -07:00
Ryan
28b26b2aae Reorganize registry codec stuff and fix some bugs 2022-09-23 04:51:26 -07:00
dani162
77ad1dfdd1
Listen on any network interfaces #77 (#79) 2022-09-21 15:11:45 -07:00
Tim Satke
d9b7008827
Add methods to Config to use a custom session server (#72)
* Add methods to Config to use a custom session server

Added new methods to the Config trait, that enables
implementors to use a custom session server host
or even a fully custom URL.

* Fix error in documentation

* Make format_session_server_url return a String
2022-09-19 20:23:39 -07:00
Ryan Johnson
ca4f47c768
Implement the player sample (#47)
Verify that it works by hovering your mouse over the player count in the
cow_sphere example.
2022-09-10 16:02:12 -07:00
Ryan Johnson
20546e2fb8
Split Chunk into loaded and unloaded types (#37)
These changes will pave the way for nonblocking terrain generation in `terrain.rs`.
2022-09-08 19:33:24 -07:00
Ryan
c955ab8799 Resolve remaining clippy warnings 2022-09-07 11:36:12 -07:00
Ryan
f7a35f356e Update rust docs 2022-09-02 00:06:45 -07:00
Ryan
793a795732 Check protocol version during login 2022-08-14 15:18:22 -07:00
Ryan
b2310db7b7 Fix chunks loading multiple times
The default chunk view distance has also been lowered to 2 since that is the most conservative guess.
2022-08-10 10:27:25 -07:00
Ryan
a5a560220c New player list implementation 2022-08-09 14:44:04 -07:00
Ryan
49d63a39c0 Clean up client and fix names 2022-08-05 12:36:34 -07:00
Ryan
35c697ff93 Rename *Data to *State 2022-07-27 19:21:11 -07:00
Ryan
b604dafe73 Add combat example 2022-07-17 21:29:44 -07:00
Ryan
865ab76699 Add custom data 2022-07-15 20:40:39 -07:00
Ryan
4b83801066 Clean up docs and fix clippy issues 2022-07-14 23:18:20 -07:00
Ryan
3f150b4c8a Document most items 2022-07-11 05:08:02 -07:00
Ryan
24cf864ed1 Don't export items arbitrarily at the crate root 2022-07-06 18:27:59 -07:00
Ryan
79cb4c159a Store entities and clients per server rather than per world 2022-07-03 15:31:24 -07:00
Ryan
806ffa4f42 Remove &mut wrappers
The mutable reference wappers were causing more problems than they were
solving. We will document the dangers of mem::swap later.
2022-06-29 11:09:00 -07:00
Ryan
8ad9c8587a Upgrade the chunk example 2022-06-19 08:40:37 -07:00
Ryan
efc2873908 Reorganize modules 2022-06-09 20:26:21 -07:00
Ryan
f875ed07ce Complete the cow sphere™ 2022-05-18 03:05:10 -07:00
Ryan
adc8a4faae Give World ownership over entities, clients, and chunks.
This change was made to make it easier for invariants to be upheld. When
the spatial partition is added, we can ensure that changes to entities
are immediately reflected in the partition. Additionally, chunks being
shared between worlds was a leaky abstraction to begin with and is now
removed. A method in `Config` is now necessary to determine what world a
client should join.

Along with this, most mutable references have been wrapped in a newtype
to ensure that `mem::swap` cannot be used on them, which would break
invariants. This is analogous to `Pin<&mut T>`. The reason we can't use
Pin directly is because it would require unnecessary unsafe code
within the library.
2022-05-16 02:36:14 -07:00
Ryan
27e818d6cd Change update_duration to tick_rate and tweak favicon_png. 2022-04-30 18:01:59 -07:00
Ryan
a0892faa72 Put all config options in a single trait 2022-04-30 05:06:20 -07:00
Ryan
5bbbb258d1 move from private repo 2022-04-14 14:55:45 -07:00