Appearance
twine / consolidateTick
Function: consolidateTick()
consolidateTick(
dp):void
Defined in: factory.ts:145
Collapse minecraft:tick to the single framework-owned <ns>:tick entry.
helix auto-tags every function created with the tick tag straight into vanilla minecraft:tick - spool plugins (grapple/tick), defineItem item ticks, the scoreboard clock, etc. That's the right un-opinionated default for a plain-helix pack, but under the framework the per-tick surface should be one thing you own: a single tag member whose body lists every per-tick function, so the whole pack's tick cost is traceable in one place and gateable as a unit.
So reparent: untag every other tick member from minecraft:tick and append a function call to it onto the root tick body (after the module tree-walk). Same work runs each tick, now dispatched from - and visible in - <ns>:tick.
DatapackFactory.create runs this once over the module tree. It's also idempotent and exported, so a consumer that adds more tick-tagged functions imperatively after create (raw helix/spool calls) can re-run it just before writeDatapack to sweep those too - already-reparented members are no longer in the tag, so a re-run only collapses the new ones.
Parameters
dp
Datapack
Returns
void