Skip to content

Commit 43538c6

Browse files
committed
Merge origin/main
1 parent 144f9f1 commit 43538c6

File tree

49 files changed

+1042
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1042
-221
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
world/
1010
/config.toml
11+
plugins/
1112

1213
# Python cache files (libcraft)
1314
**/__pycache__/

Cargo.lock

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ members = [
1515
"quill/sys",
1616
"quill/common",
1717
"quill/api",
18+
"quill/api/plugin-macro",
1819
"quill/plugin-format",
1920
"quill/cargo-quill",
2021

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ In the long term, Feather could be used on larger, more survival-like servers, w
2727
### Ecosystem
2828

2929
The Feather ecosystem consists of several repositories:
30-
* [`libcraft`](https://github.com/feather-rs/libcraft), a set of Rust crates providing Minecraft functionality.
31-
* [`quill`](https://github.com/feather-rs/quill), our work-in-progress plugin API. Quill plugins are written in Rust and compiled to WebAssembly. Feather runs them in a sandboxed WebAssembly VM.
30+
* [`libcraft`](https://github.com/feather-rs/feather/tree/main/libcraft), a set of Rust crates providing Minecraft functionality.
31+
* [`quill`](https://github.com/feather-rs/feather/tree/main/quill), our work-in-progress plugin API. Quill plugins are written in Rust and compiled to WebAssembly. Feather runs them in a sandboxed WebAssembly VM.
3232
* `feather`, the server software built on top of `libcraft` and `quill`.
3333

3434
### Performance

feather/common/src/chunk/entities.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
use ahash::AHashMap;
22
use base::{ChunkPosition, Position};
33
use ecs::{Entity, SysResult, SystemExecutor};
4+
use quill_common::events::{EntityCreateEvent, EntityRemoveEvent};
45
use utils::vec_remove_item;
56

6-
use crate::{
7-
events::{ChunkCrossEvent, EntityCreateEvent, EntityRemoveEvent},
8-
Game,
9-
};
7+
use crate::{events::ChunkCrossEvent, Game};
108

119
pub fn register(systems: &mut SystemExecutor<Game>) {
1210
systems.add_system(update_chunk_entities);

feather/common/src/chunk/loading.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ use std::{
99
use ahash::AHashMap;
1010
use base::ChunkPosition;
1111
use ecs::{Entity, SysResult, SystemExecutor};
12+
use quill_common::events::EntityRemoveEvent;
1213
use utils::vec_remove_item;
1314

14-
use crate::{
15-
chunk::worker::LoadRequest,
16-
events::{EntityRemoveEvent, ViewUpdateEvent},
17-
Game,
18-
};
15+
use crate::{chunk::worker::LoadRequest, events::ViewUpdateEvent, Game};
1916

2017
pub fn register(game: &mut Game, systems: &mut SystemExecutor<Game>) {
2118
game.insert_resource(ChunkLoadState::default());

feather/common/src/events.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ mod plugin_message;
88
pub use block_change::BlockChangeEvent;
99
pub use plugin_message::PluginMessageEvent;
1010

11-
/// Triggered when a player joins the `Game`.
12-
#[derive(Debug)]
13-
pub struct PlayerJoinEvent;
14-
1511
/// Event triggered when a player changes their `View`,
1612
/// meaning they crossed into a new chunk.
1713
#[derive(Debug)]
@@ -62,14 +58,3 @@ pub struct ChunkLoadEvent {
6258
pub struct ChunkLoadFailEvent {
6359
pub position: ChunkPosition,
6460
}
65-
66-
/// Triggered when an entity is removed from the world.
67-
///
68-
/// The entity will remain alive for one tick after it is
69-
/// destroyed to allow systems to observe this event.
70-
#[derive(Debug)]
71-
pub struct EntityRemoveEvent;
72-
73-
/// Triggered when an entity is added into the world.
74-
#[derive(Debug)]
75-
pub struct EntityCreateEvent;

feather/common/src/game.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ use ecs::{
55
Ecs, Entity, EntityBuilder, HasEcs, HasResources, NoSuchEntity, Resources, SysResult,
66
SystemExecutor,
77
};
8+
use quill_common::events::{EntityCreateEvent, EntityRemoveEvent, PlayerJoinEvent};
89
use quill_common::{entities::Player, entity_init::EntityInit};
910

1011
use crate::{
1112
chat::{ChatKind, ChatMessage},
1213
chunk::entities::ChunkEntities,
13-
events::{BlockChangeEvent, EntityCreateEvent, EntityRemoveEvent, PlayerJoinEvent},
14+
events::BlockChangeEvent,
1415
ChatBox, World,
1516
};
1617

feather/common/src/view.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ use base::{ChunkPosition, Position};
33
use ecs::{SysResult, SystemExecutor};
44
use itertools::Either;
55
use quill_common::components::Name;
6+
use quill_common::events::PlayerJoinEvent;
67

7-
use crate::{
8-
events::{PlayerJoinEvent, ViewUpdateEvent},
9-
Game,
10-
};
8+
use crate::{events::ViewUpdateEvent, Game};
119

1210
/// Registers systems to update the `View` of a player.
1311
pub fn register(_game: &mut Game, systems: &mut SystemExecutor<Game>) {

feather/plugin-host/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ tempfile = "3"
2525
vec-arena = "1"
2626
wasmer = { version = "2", default-features = false, features = [ "jit" ] }
2727
wasmer-wasi = { version = "2", default-features = false, features = [ "host-fs", "sys" ] }
28+
serde_json = "1"
2829

2930
[features]
3031
llvm = [ "wasmer/llvm" ]

0 commit comments

Comments
 (0)