You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#307 introduces a preliminary draft of Feather's plugin API, quill. This is tracking issue for features needed in the plugin API to achieve the goals laid out in our mid-term roadmap.
Foundational features:
Plugin state struct
Access to Copy components from the host
Mutating Copy components from the host
Defining, accessing, and mutating custom components
Creating and removing entities
Access to opaque, non-Copy components from the host
Name
Inventory
Window
Features needed for a hub plugin implemented with Quill:
Support all vanilla entities in Feather: armor stands, mobs
Particles
Entities
Custom GUIs for server selection
Sending plugin messages (needed for BungeeCord server transfer)
Potion effects
Others?
Features needed for minigames implemented with Quill:
Block access, ideally with bulk operation support ("fill this chunk section with the given block")
Custom WorldSources defined in plugins for custom world loading/saving logic
I'd like to tackle the particle system if that's possible :)
Sure thing, thanks!
We'll probably want a Particle type in libcraft that defines all possible particles, plus their associated metadata.
The steps for implementing this are:
Add support for spawning particles in quill. That means a particle_spawn method in the quill-sys crate, plus a method on quill::Game that invokes the raw quill_sys::particle_spawn.
Implement the particle_spawn host call in Feather. This involves adding the function to crates/plugin-host/src/host_calls.rs.
Add whatever is needed to send particles to clients.
Let me know if you have any questions, either here or on Discord.
@caelunshun I have a question on the design.
Are you planning on making it possible to spawn generic ecs-entities into the ecs system directly through quill.
Or is it going to stay like the way it's done for the minecraft-entity builder is, where we just pass a struct containing all the required data back from the client (the plugin/quill) to the host (feather) and create the ecs-entity there.
Are you planning on making it possible to spawn generic ecs-entities into the ecs system directly through quill.
Or is it going to stay like the way it's done for the minecraft-entity builder is, where we just pass a struct containing all the required data back from the client (the plugin/quill) to the host (feather) and create the ecs-entity there.
Spawning raw entities without any default components is probably necessary, yes. The simplest way to do this would be to add a new entity_builder_new_empty function in quill-sys that creates an empty EntityBuilder. (The current entity_builder_new function adds default components to the builder for vanilla entities).
Activity
oxkitsune commentedon Feb 22, 2021
@caelunshun I'd like to tackle the particle system if that's possible :)
caelunshun commentedon Feb 23, 2021
Sure thing, thanks!
We'll probably want a
Particletype in libcraft that defines all possible particles, plus their associated metadata.The steps for implementing this are:
quill. That means aparticle_spawnmethod in thequill-syscrate, plus a method onquill::Gamethat invokes the rawquill_sys::particle_spawn.particle_spawnhost call in Feather. This involves adding the function tocrates/plugin-host/src/host_calls.rs.Let me know if you have any questions, either here or on Discord.
oxkitsune commentedon Feb 23, 2021
@caelunshun I have a question on the design.
Are you planning on making it possible to spawn generic ecs-entities into the ecs system directly through quill.
Or is it going to stay like the way it's done for the minecraft-entity builder is, where we just pass a struct containing all the required data back from the client (the plugin/quill) to the host (feather) and create the ecs-entity there.
caelunshun commentedon Feb 24, 2021
Spawning raw entities without any default components is probably necessary, yes. The simplest way to do this would be to add a new
entity_builder_new_emptyfunction inquill-systhat creates an emptyEntityBuilder. (The currententity_builder_newfunction adds default components to the builder for vanilla entities).caelunshun commentedon Mar 3, 2021
Quick summary of recent progress:
Next up: