The feces library exports three functions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NeonD00m/feces/llms.txt
Use this file to discover all available pages before exploring further.
new() initializes a feces instance bound to a jecs world. combine() merges delta changes into per-player packets. reserve() creates an entity group for namespace isolation.
feces.new(jecs, world, group?, debugPrints?)
Creates a new Feces instance that watches the supplied world for component changes and exposes apply, delta, full, and other helpers.
The jecs module itself — pass the result of
require(path.to.jecs).A
jecs.World extended with observer methods (added, changed, removed, deleted, monitor). All component tracking observers are registered on this world.If provided, this feces instance uses the given group’s
lookups and refs tables instead of creating its own. Useful for creating a client-side instance that mirrors a server-side reserved group.If
true, feces prints internal debug messages via print(). Sets instance._debug.Feces — the new feces instance.
feces.new() creates two internal components on the world — replicated and grouped — and registers world:added, world:changed, and world:removed observers for every component that already exists at call time. It also hooks world.component_index.__newindex so that any component created after new() is called is automatically tracked. A world:removed(replicated, ...) observer is installed to capture entity deletions for replication.For best results, create all your components before calling feces.new().feces.combine(changes, deleted?)
Translates Changes and Deletes objects returned by instance:delta() into one Applyable packet per affected player, ready to be sent over a remote.
The changes table returned by
feces:delta().The deletes table returned by
feces:delta(). If omitted, no entity deletions are included in the resulting packets.{ [TestPlayer]: Applyable } — a table mapping each affected player (a Player instance or string identifier) to their per-player packet.
Each Applyable contains all component changes and deletes for that player in one table, ready to send over a remote. Pass each value directly to remote:FireClient.
feces.reserve(size, debugLocation?)
Creates a new Group — a separate entity lookup namespace. Groups are used to isolate replication to a bounded set of entities, and enable packing lookup IDs into a smaller number of bits.
The maximum number of entities this group should hold. A warning is emitted if this limit is exceeded.
When
true, uses debug.info to record the exact script and line where reserve() was called. This information is stored in group.origin and appears in warning messages. Useful for diagnosing which group overflowed.Group — a new group table with empty lookups and refs tables and a recorded origin location for diagnostic messages.
Groups are used with
instance:setGroup(), instance:delta(group), instance:full(group), and instance:apply(delta, group). See the Groups guide for a full walkthrough.feces.new() to create an instance whose default namespace is that group: