Repository navigation
feat: bind the debug-utilities script module - #216
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Binds
@minecraft/debug-utilities(beta) for behavior packs.DebugShapeand its ten shapes (DebugLine,DebugArrow,DebugBox,DebugSphere,DebugCircle,DebugText,DebugCylinder,DebugCone,DebugEllipsoid,DebugPyramid) anddebugDrawer. Added shapes stream to players throughPrimitiveShapesPacketonce per tick: a snapshot when a player starts seeing a shape or the shape changes, the id alone when it goes away.visibleTo,hiddenFromanddefaultVisibleToAllpick the recipients;timeLeftcounts down in seconds and removes the shape at zero.sub_14B8D88B0and the per-type ones): scale 1, white, arrow head length 1, radius 0.5 and 4 segments, box bound 1, sphere and circle 20 segments, cylinder, cone and ellipsoid radii 1, height 1 and 20 segments, pyramid width and height 1. Segment counts are bounded to [3, 128] andmaximumRenderDistanceto 0 and up, withArgumentOutOfBoundsError. ARawMessagetext goes out as its JSON, likesub_14B8E1D00.DiagnosticsErrormessages and reasons (tabName must be non-empty,Tab with the name '...' already exists!,statName must be non-empty,Stats have already been pushed this frame!). Falcon has no script debugger, so pushed stats are kept but nothing displays them.collectRuntimeStatsreads QuickJS's memory usage, field for field.collectPluginStatslists every scripted pack with its uuid, module uuid and live handles by class, counted when native objects are made and finalized.disableWatchdogTimingWarningsstores the flag per pack. Falcon's watchdog only stops runaway scripts and emits no slow or spike warnings, so there is nothing else to turn off yet.debug:module;ScriptEngine::getApis;ScriptApikeeps its pack uuid.Depends on Falcon-MC/Protocol#9 (cylinders carry one radii pair in 26.60), already merged.
How it is verified
New
script-api-debugtest: shapes reach the player in one packet with the expected fields, unchanged shapes are not resent, an expired box, a removed arrow and a recolored text go out on the right tick; diagnostics errors, bounds errors, constructor errors and early execution; runtime and plugin stats. Fullctestpasses.AI disclosure
Written by Claude Opus 5.5 (claude-opus-5-5); game values were read from the 26.60 client in IDA.