Commit graph

17 commits

Author SHA1 Message Date
AviiNL 491e3a61d7
Packet inspector gui (#238)
Fixes #235

## Description

A GUI Project for the packet inspector

## Test Plan

Steps:
1. Start (any) server
2. Start the proxy `cargo r -r -p packet_inspector_gui --
127.0.0.1:25560 127.0.0.1:25565`
3. Join server (127.0.0.1:25560)
4. Magic
2023-03-09 03:09:53 -08:00
AviiNL 4c0f070d27
Add caching layer to CI (#277)
Added a caching layer to the CI

This creates a cache on first run (should exist because of this pr now)
The hash is calculated from the Cargo.toml files (recursively if i've
done it correctly)
So whenever a Cargo.toml file changes, it invalidates the cache.

Local crates are _not_ cached, so they get recompiled regardless, but it
already shaves off like half the total time from the action runners.
2023-03-08 11:51:47 -05:00
Ryan Johnson 4a541a907a
Tweak templates (#273)
## Description

Change the issue and pull request templates.

- Remove HTML comments from the markdown because it's often not deleted
and takes up space in the final commit description.
- Remove the "related" section in the PR template because links to other
issues will naturally end up in the "description" section.
- Remove some placeholder text in the feature request template.
- Remove the check boxes from the bug report template to avoid creating
"tasks".
- The number of sections in the bug report template was a bit daunting
IMO so I trimmed it down a bit.

Co-authored-by: Carson McManus <dyc3@users.noreply.github.com>
2023-03-07 08:01:30 -05:00
Ryan Johnson 6e8ebbe000
Fix CI (#259)
Gets CI working again by switching to `macos-11` from `macos-latest`.

No idea why it works. We should switch back to `macos-latest`
eventually.
2023-02-24 18:26:26 -08:00
Ryan Johnson 286e6aa0d0
Fix CI (#245)
## Description

Attempting to fix the CI failures in #32 by switching to the stable
toolchain.
2023-02-16 19:48:55 -08:00
Ryan Johnson cb9230ec34
ECS Rewrite (#184)
This PR redesigns Valence's architecture around the Bevy Entity
Component System framework (`bevy_ecs` and `bevy_app`). Along the way, a
large number of changes and improvements have been made.
- Valence is now a Bevy plugin. This allows Valence to integrate with
the wider Bevy ecosystem.
- The `Config` trait has been replaced with the plugin struct which is
much easier to configure. Async callbacks are grouped into their own
trait.
- `World` has been renamed to `Instance` to avoid confusion with
`bevy_ecs::world::World`.
- Entities, clients, player list, and inventories are all just ECS
components/resources. There is no need for us to have our own
generational arena/slotmap/etc for each one.
- Client events use Bevy's event system. Users can read events with the
`EventReader` system parameter. This also means that events are
dispatched at an earlier stage of the program where access to the full
server is available. There is a special "event loop" stage which is used
primarily to avoid the loss of ordering information between events.
- Chunks have been completely overhauled to be simpler and faster. The
distinction between loaded and unloaded chunks has been mostly
eliminated. The per-section bitset that tracked changes has been
removed, which should further reduce memory usage. More operations on
chunks are available such as removal and cloning.
- The full client's game profile is accessible rather than just the
textures.
- Replaced `vek` with `glam` for parity with Bevy.
- Basic inventory support has been added.
- Various small changes to `valence_protocol`.
- New Examples
- The terrain and anvil examples are now fully asynchronous and will not
block the main tick loop while chunks are loading.

# TODOs
- [x] Implement and dispatch client events.
- ~~[ ] Finish implementing the new entity/chunk update algorithm.~~ New
approach ended up being slower. And also broken.
- [x] [Update rust-mc-bot to
1.19.3](https://github.com/Eoghanmc22/rust-mc-bot/pull/3).
- [x] Use rust-mc-bot to test for and fix any performance regressions.
Revert to old entity/chunk update algorithm if the new one turns out to
be slower for some reason.
- [x] Make inventories an ECS component.
- [x] Make player lists an ECS ~~component~~ resource.
- [x] Expose all properties of the client's game profile.
- [x] Update the examples.
- [x] Update `valence_anvil`.
- ~~[ ] Update `valence_spatial_index` to use `glam` instead of `vek`.~~
Maybe later
- [x] Make entity events use a bitset.
- [x] Update docs.

Closes #69
Closes #179
Closes #53

---------

Co-authored-by: Carson McManus <dyc3@users.noreply.github.com>
Co-authored-by: AviiNL <me@avii.nl>
Co-authored-by: Danik Vitek <x3665107@gmail.com>
Co-authored-by: Snowiiii <71594357+Snowiiii@users.noreply.github.com>
2023-02-11 09:51:53 -08:00
Ryan Johnson 85cc3a28ea
Add --workspace flag to commands in CI (#101) 2022-10-04 02:12:32 -07:00
Ryan Johnson 9c62bc1b90
Move valence_nbt to main Valence repo. (#97)
This also adds another check in CI
2022-10-01 14:18:42 -07:00
Ryan Johnson ca89140ebe rustdoc checks to github actions 2022-09-26 22:30:42 -07:00
Ryan 7f22e709cb Add GitHub sponsors 2022-09-19 21:08:14 -07:00
Ryan Johnson 70ef63aae3
Fail checks when warnings occur 2022-09-17 23:56:40 -07:00
Ryan Johnson c73df2c09a
Update rust.yml 2022-09-14 05:23:08 -07:00
Ryan 49fdeb6be4 Tweak actions 2022-09-10 02:40:58 -07:00
Ryan 5c9a6c973c Add --all-targets to actions 2022-09-09 22:35:24 -07:00
Ryan Johnson fdedf74d29
Add clippy lints and format checks (#46)
The nightly rust toolchain is used because we are currently using unstable rustfmt settings.
2022-09-09 21:59:10 -07:00
Ryan Johnson 63f49ad5c0
Github actions for main branch
Hope this works
2022-09-04 01:43:52 -07:00
Ryan d3a71bd70a Add FUNDING.yml 2022-09-03 06:52:56 -07:00