Convert Current JSON-UI to new TS-UI Source Files#674
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds many TypeScript-driven UI modules (PHUD, Pokémon, Rotom Phone, attack/PC/pokedex UIs), replaces several static JSON manifests with generated outputs under ui/generated, updates server-form routing and HUD layout, and adds tooling ignores for generated code. (50 words) Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // Jeb icon - special animated icon | ||
| ns.addRaw("jeb_icon", { | ||
| type: "image", | ||
| texture: "('textures/ui/phud/maple_' + $name))", |
There was a problem hiding this comment.
Bug: Extra closing parenthesis in texture expression
The texture property has an extra closing parenthesis: "('textures/ui/phud/maple_' + $name))" should be "('textures/ui/phud/maple_' + $name)". This malformed expression will cause the texture binding to fail, preventing the jeb icon animation from displaying correctly.
There was a problem hiding this comment.
Actionable comments posted: 12
🧹 Nitpick comments (22)
scripts/ui/pokemon/pokedex.ts (2)
12-12: Remove unused imports.
label,panel,stackPanel, andgridare imported but not used. OnlyimageanddefineUIare utilized via the fluent API.-import { defineUI, image, label, panel, stackPanel, grid } from "mcbe-ts-ui"; +import { defineUI, image } from "mcbe-ts-ui";
17-35: Consider extracting shared button utilities.The
button_stackfactory pattern is duplicated acrosspokedex.tsandpokemon.ts. Extracting this to a shared module (e.g.,_helpers.ts) would reduce duplication and ease maintenance.scripts/ui/pokemon/pokemon.ts (2)
11-11: Remove unused imports.
label,panel,stackPanel, andgridare imported but not used.-import { defineUI, image, label, panel, stackPanel, grid } from "mcbe-ts-ui"; +import { defineUI, image } from "mcbe-ts-ui";
313-327: Consider enabling localization for user-facing text.The button text "Start adventure !" is hardcoded with
localize: false. If internationalization is planned, consider using a localization key instead.type: "label", font_type: "MinecraftTen", - localize: false, - text: "Start adventure !", + text: "pokebedrock.ui.start_adventure",scripts/ui/pokemon/pc.ts (2)
69-73: Consider documenting the magic number in the enabled binding.The expression
((%.1s * #form_button_text) = 't')checks the first character for 't' (likely "true"). A brief inline comment explaining the expected format of#form_button_textwould help maintainability.
98-102: Magic number 25 for text offset could use documentation.The
skip(25, "#form_button_text")suggests a specific data format where the first 25 characters are metadata. Consider adding a comment or extracting to a named constant for clarity.scripts/ui/pokemon/attack.ts (4)
54-60: Complex dynamic format specifier - consider documenting.The expression dynamically builds a printf-style format specifier using
$hover_text_index. A brief comment explaining this technique would help future maintainers understand how hover text extraction works.
150-155: Enabled state derived from texture path prefix.The expression checks if the texture path starts with 'f' (presumably for "false" or a disabled state marker). This coupling between texture naming and button state could be fragile. Consider documenting this convention.
446-454: Complex localization key construction with multiple magic numbers.The expression
(('showdown.moves' + ${first(30, skip(36, "#form_button_text"))}) + '.name')extracts a substring to build a localization key. The offsets (36, 30) represent a specific data format. Consider documenting the expected structure of#form_button_textfor move buttons.
784-786: Potentially confusing default for ally actor button template.The
ally_actor_details_button_check_idtemplate has a default$button_idof"b:opponent_1_"which is misleading. While it's overridden in actual usage (lines 841-844), consider changing the default to something like"b:ally_1_"for clarity.scripts/ui/phud/loadingScreen.ts (1)
12-27: Consider usingphudTexthelper for consistency with other PHUD elements.Looking at
playerPing.ts, it uses thephudTexthelper directly. Here, you're manually creating similar bindings withphudReadplus an additional view binding. ThephudTexthelper would simplify this.+import { phudVisibility, phudText } from "./_helpers"; + // Loading screen text label -const loadingText = label("text") +const loadingText = phudText( + label("text") .anchor("center") - .text("#text") .layer(1002) .localize(true) .fontSize("normal") - .textAlignment("center") - .bindings( - phudRead("#loadingScreen", "#loadingScreenText"), - { - binding_name: "#null", - binding_type: "view", - source_property_name: "(#loadingScreenText)", - target_property_name: "#text", - } - ); + .textAlignment("center"), + "#loadingScreen" +);scripts/ui/phud/currency.ts (1)
1-66: Well-structured PHUD currency component.The implementation cleanly separates quest and currency parsing using the helper functions. The UI composition is clear and follows the established PHUD patterns.
One minor suggestion: consider extracting the magic number
80to a named constant for clarity and easier maintenance.+// Number of characters allocated for quest text before currency begins +const QUEST_TEXT_LENGTH = 80; + // Quest label - displays first 80 characters (quest info) const questLabel = label("quest_label") ... - .bindings(phudRead("#level_number", "#text", firstStripped(80, "${prop}"))); + .bindings(phudRead("#level_number", "#text", firstStripped(QUEST_TEXT_LENGTH, "${prop}")));scripts/ui/searchServerForm.ts (1)
147-153: Consider using thecontainshelper for consistency.The inline contains check could use the existing
containshelper from_string_parser.tsfor consistency with other files (e.g.,rotomPhone/first.ts). This would improve readability and maintainability.+import { notPrefix, contains } from "./phud/_string_parser"; -import { notPrefix } from "./phud/_string_parser";The visibility expression could reference a helper, though the current inline expression is functionally correct.
scripts/ui/rotomPhone/first.ts (2)
139-355: Consider a factory function for button panel definitions.The button panel definitions follow a consistent pattern with variations in flags, sizes, and offsets. While the current implementation is readable, a factory function could reduce the ~200 lines to ~50 lines.
Example approach (optional):
const createButtonPanelPair = (name: string, flag: string, config: ButtonConfig) => { ns.addRaw(`${name}_panel`, { type: "panel", $flag: flag, ...config.panel }); ns.addRaw(name, { type: "stack_panel", factory: { name: "buttons", control_name: `rotom_phone_first.${name}_panel` }, ...config.stack }); };
366-375: Hardcoded label strings may need localization.The "Nickname" and "Original Trainer" labels are hardcoded. If localization is needed in the future, these should use binding expressions or localization keys.
scripts/ui/rotomPhone/third.ts (1)
8-8: Remove unused imports.
image,label, andstackPanelare imported but never used in this file. OnlydefineUIandpanelare used (along withcontainsfrom the string parser).-import { defineUI, image, label, panel, stackPanel } from "mcbe-ts-ui"; +import { defineUI, panel } from "mcbe-ts-ui";scripts/ui/rotomPhone/second.ts (1)
8-8: Remove unused imports.Same as in
third.ts,image,label, andstackPanelare imported but never used.-import { defineUI, image, label, panel, stackPanel } from "mcbe-ts-ui"; +import { defineUI, panel } from "mcbe-ts-ui";scripts/ui/chestServerForm.ts (1)
647-648: Inconsistent flag variable naming.
pokebuilder_grid_image(line 647) andbackpack_grid(line 705) use$quest_chest_flagwhilepokebuilder_grid_large_image(line 676) uses$pokebuilder_chest_flag. Consider using$pokebuilder_flagand$backpack_flagrespectively for clarity.Also applies to: 705-706
scripts/ui/phud/sidebar.ts (2)
14-14: Remove unused imports.
labelandpanelare imported but not used. OnlydefineUI,image, andstackPanelare used.-import { defineUI, image, label, panel, stackPanel } from "mcbe-ts-ui"; +import { defineUI, image, stackPanel } from "mcbe-ts-ui";
220-223: Consider a dedicated helper for "not null" checks.Using
notEmpty(...).replace("''", "'null'")is fragile as it depends on the exact string format ofnotEmpty. Consider adding anotNullhelper in_string_parser.ts:// In _string_parser.ts export function notNull(prop: string): string { return `(not (${prop} = 'null'))`; }Then use
notNull("#pokemon_icon")here for clarity.scripts/ui/phud/_string_parser.ts (2)
115-225: Consider input validation for values containing single quotes.The functions
literal,equals,notEquals,contains,prefix, andnotPrefixembed values directly into expressions using single-quote delimiters without escaping. If any user-controlled input reaches these functions, it could result in malformed expressions.For example:
literal("test'value")produces'test'value'which breaks the expression syntax.While the current usage may not expose this risk, consider adding a helper to escape single quotes in values for defense-in-depth.
Example escaping helper:
function escapeValue(value: string): string { return value.replace(/'/g, "\\'"); } export function literal(value: string): string { return `'${escapeValue(value)}'`; }
288-348: LGTM! Compound helpers effectively compose basic operations.The compound helper functions (
firstStripped,skipStripped,texturePath) provide convenient shortcuts for common patterns. The conditional logic intexturePathfor theskipCharsparameter is well-implemented.Optional enhancement: Consider adding parameter validation for edge cases (e.g., negative lengths, negative skipChars) to fail fast with clear error messages during development:
export function first(length: number, prop: string): string { if (length < 0) throw new Error(`first: length must be non-negative, got ${length}`); return `%.${length}s * ${prop}`; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (20)
ui/__generated__/chestServerForm.jsonis excluded by!**/__generated__/**ui/__generated__/hud_screen.jsonis excluded by!**/__generated__/**ui/__generated__/phud/actionbar.jsonis excluded by!**/__generated__/**ui/__generated__/phud/battleWait.jsonis excluded by!**/__generated__/**ui/__generated__/phud/currency.jsonis excluded by!**/__generated__/**ui/__generated__/phud/evolutionWait.jsonis excluded by!**/__generated__/**ui/__generated__/phud/loadingScreen.jsonis excluded by!**/__generated__/**ui/__generated__/phud/phone.jsonis excluded by!**/__generated__/**ui/__generated__/phud/phud.jsonis excluded by!**/__generated__/**ui/__generated__/phud/playerPing.jsonis excluded by!**/__generated__/**ui/__generated__/phud/sidebar.jsonis excluded by!**/__generated__/**ui/__generated__/pokemon/attack.jsonis excluded by!**/__generated__/**ui/__generated__/pokemon/pc.jsonis excluded by!**/__generated__/**ui/__generated__/pokemon/pokedex.jsonis excluded by!**/__generated__/**ui/__generated__/pokemon/pokemon.jsonis excluded by!**/__generated__/**ui/__generated__/rotomPhone/first.jsonis excluded by!**/__generated__/**ui/__generated__/rotomPhone/second.jsonis excluded by!**/__generated__/**ui/__generated__/rotomPhone/third.jsonis excluded by!**/__generated__/**ui/__generated__/searchServerForm.jsonis excluded by!**/__generated__/**ui/__generated__/serverForm.jsonis excluded by!**/__generated__/**
📒 Files selected for processing (28)
.vscode/settings.json(1 hunks)package.json(1 hunks)scripts/ui/README.md(1 hunks)scripts/ui/chestServerForm.ts(1 hunks)scripts/ui/hud_screen.ts(1 hunks)scripts/ui/phud/_helpers.ts(1 hunks)scripts/ui/phud/_string_parser.ts(1 hunks)scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/battleWait.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/evolutionWait.ts(1 hunks)scripts/ui/phud/loadingScreen.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/phud.ts(1 hunks)scripts/ui/phud/playerPing.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)scripts/ui/pokemon/attack.ts(1 hunks)scripts/ui/pokemon/pc.ts(1 hunks)scripts/ui/pokemon/pokedex.ts(1 hunks)scripts/ui/pokemon/pokemon.ts(1 hunks)scripts/ui/rotomPhone/first.ts(1 hunks)scripts/ui/rotomPhone/second.ts(1 hunks)scripts/ui/rotomPhone/third.ts(1 hunks)scripts/ui/searchServerForm.ts(1 hunks)scripts/ui/serverForm.ts(1 hunks)ui/_ui_defs.json(1 hunks)ui/chest_server_form.json(0 hunks)ui/phud/phud.json(0 hunks)
💤 Files with no reviewable changes (2)
- ui/chest_server_form.json
- ui/phud/phud.json
🧰 Additional context used
🧬 Code graph analysis (17)
scripts/ui/searchServerForm.ts (1)
scripts/ui/phud/_string_parser.ts (1)
notPrefix(111-113)
scripts/ui/phud/evolutionWait.ts (1)
scripts/ui/phud/_helpers.ts (2)
phudRead(69-85)phudVisibility(30-53)
scripts/ui/phud/playerPing.ts (1)
scripts/ui/phud/_helpers.ts (2)
phudText(131-136)phudVisibility(30-53)
scripts/ui/phud/currency.ts (2)
scripts/ui/phud/_helpers.ts (2)
phudRead(69-85)phudVisibility(30-53)scripts/ui/phud/_string_parser.ts (2)
firstStripped(304-306)skipStripped(320-322)
scripts/ui/pokemon/pokemon.ts (1)
scripts/ui/phud/_string_parser.ts (2)
contains(223-225)equals(191-193)
scripts/ui/phud/battleWait.ts (1)
scripts/ui/phud/_helpers.ts (2)
phudRead(69-85)phudVisibility(30-53)
scripts/ui/rotomPhone/first.ts (1)
scripts/ui/phud/_string_parser.ts (1)
contains(223-225)
scripts/ui/pokemon/pc.ts (1)
scripts/ui/phud/_string_parser.ts (4)
strip(128-130)skip(56-58)contains(223-225)first(37-39)
scripts/ui/phud/_helpers.ts (1)
scripts/ui/phud/_string_parser.ts (2)
notEmpty(175-177)strip(128-130)
scripts/ui/pokemon/attack.ts (1)
scripts/ui/phud/_string_parser.ts (4)
contains(223-225)skip(56-58)strip(128-130)first(37-39)
scripts/ui/phud/sidebar.ts (2)
scripts/ui/phud/_string_parser.ts (2)
texturePath(341-348)notEmpty(175-177)scripts/ui/phud/_helpers.ts (1)
phudVisibility(30-53)
scripts/ui/rotomPhone/third.ts (1)
scripts/ui/phud/_string_parser.ts (1)
contains(223-225)
scripts/ui/rotomPhone/second.ts (1)
scripts/ui/phud/_string_parser.ts (1)
contains(223-225)
scripts/ui/phud/loadingScreen.ts (1)
scripts/ui/phud/_helpers.ts (2)
phudRead(69-85)phudVisibility(30-53)
scripts/ui/pokemon/pokedex.ts (1)
scripts/ui/phud/_string_parser.ts (4)
strip(128-130)skip(56-58)contains(223-225)first(37-39)
scripts/ui/serverForm.ts (1)
scripts/ui/phud/_string_parser.ts (1)
contains(223-225)
scripts/ui/chestServerForm.ts (1)
scripts/ui/phud/_string_parser.ts (1)
contains(223-225)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (49)
.vscode/settings.json (1)
32-32: LGTM!Adding "mcbe" to the spell check dictionary aligns with the new
mcbe-ts-uilibrary usage.scripts/ui/pokemon/pokedex.ts (1)
324-410: LGTM!The
main_gridview is well-structured with proper use of the fluent API and MCBE binding patterns. The grid configuration and control hierarchy are correctly defined.scripts/ui/pokemon/pokemon.ts (1)
469-536: LGTM!The
main_panelcomposition is well-structured with proper layering, anchoring, and control hierarchy. The fluent API usage is clean and consistent.ui/_ui_defs.json (1)
3-22: Generated UI files are properly configured and exist; however, the build script does not generate them—it only archives existing files.All 20 referenced UI files in
ui/_ui_defs.json(lines 3-22) exist and are correctly placed inui/__generated__/with the proper directory structure. The files are committed to the repository (not gitignored) and include:
- 2 root-level JSON files (chestServerForm.json, serverForm.json, etc.)
- 9 phud components
- 4 pokemon components
- 3 rotomPhone pages
However,
scripts/build.tsdoes not generate these UI files—it only compresses and archives existing files. The TypeScript UI source files (e.g.,chestServerForm.ts,hud_screen.ts) suggest these JSON outputs are generated elsewhere or pre-generated. Since the.gitignoredoes not exclude the__generated__directory, these files are intentionally versioned in the repository.scripts/ui/pokemon/pc.ts (6)
1-13: LGTM - Clear module structure with appropriate imports.The file header clearly documents the UI's purpose and the imports are minimal and focused on what's needed.
16-34: LGTM - Standard button stack factory pattern.The factory setup for dynamic button rendering follows the expected mcbe-ts-ui collection pattern.
131-177: LGTM - Arrow button definitions are consistent and well-structured.Both left and right arrow buttons follow the same pattern with appropriate texture paths and visibility bindings.
179-202: LGTM - Icon button configuration is appropriate.The icon button uses the same texture for all states, which is suitable for displaying a Pokémon icon rather than acting as an interactive button.
232-438: LGTM - Main UI composition is well-structured.The three-region layout with appropriate spacing and controls follows good UI composition practices. The use of the fluent API methods (
.horizontal(),.fullSize(), etc.) is clean.
379-390: I'll help you verify whether thechest_ui.chest_itemtemplate exists and is compatible with theform_buttonscollection. Let me search the codebase for the template definition and its configuration.
<function_calls>
#!/bin/bashSearch for chest_item definition in TypeScript files
rg -n "chest_item" --type ts -B 3 -A 5
</function_calls>
<function_calls>
#!/bin/bashSearch more broadly for chest UI related files and templates
fd "chest" --type ts | head -20
</function_calls>
<function_calls>
#!/bin/bashLook for the pc.ts file and understand the structure
find . -name "pc.ts" -type f | head -5
</function_calls>scripts/ui/pokemon/attack.ts (3)
1-13: LGTM - Clear module documentation and focused imports.The file header documents the battle UI components and imports are appropriately scoped.
385-392: LGTM - PP bar variant generation is clean and efficient.The loop dynamically generates 21 PP bar variants (0-20) with proportional widths. The formula produces consistent sizing, and adding the null variant handles edge cases.
848-981: LGTM - Main battle UI composition is well-organized.The panel structure with battle menu at bottom and actor details at top provides a clean layout. The use of button_stack for dynamic content and proper layering is appropriate.
scripts/ui/README.md (1)
1-57: LGTM - Excellent documentation for the PHUD helpers.The README provides clear usage examples for visibility bindings, phudText, and string parsing utilities. The printf-style format specifier explanation is helpful for understanding the underlying mechanics.
scripts/ui/phud/loadingScreen.ts (1)
30-42: LGTM - Main loading screen container is well-defined.The use of
rawPropfor image-specific properties (texture, tiled, tiled_scale) and the high layer value (1000) appropriately positions this as a modal overlay.scripts/ui/phud/playerPing.ts (2)
12-20: LGTM - Clean usage of the phudText helper.The
phudTextwrapper cleanly binds the label to#player_ping_textwhile allowing the label to be styled with anchor, layer, color, and shadow properties.
22-32: LGTM - Well-structured player ping container.The semi-transparent background with content-sized dimensions and appropriate padding creates a clean tooltip appearance. The visibility binding correctly shows/hides based on content presence.
scripts/ui/phud/evolutionWait.ts (1)
26-35: Verify the offset positioning.The main container is anchored to
bottom_middlewith size"70%", "100%"and offset(0, "32%"). With a 100% height and positive Y offset from the bottom anchor, this may push the element partially off-screen or produce unintended positioning.Please verify this is the intended behavior for the evolution wait overlay.
scripts/ui/phud/phone.ts (1)
13-199: LGTM otherwise - well-structured animation system.The phone HUD implementation handles multiple animation states elegantly with flip-book animations and conditional visibility. The use of
defineUIwith raw additions for complex animation definitions is appropriate for this use case.scripts/ui/phud/actionbar.ts (1)
1-39: LGTM!Clean implementation following the established PHUD patterns. The actionbar component properly uses
phudTextfor text binding andphudVisibilityfor conditional display.scripts/ui/hud_screen.ts (3)
23-57: Visibility binding logic looks correct.The expression
(not ((%.1s * #hud_title_text_string ) = '&_'))correctly checks if the title text starts with "&_" and hides the element if so. This is a common pattern for conditional UI hiding based on special prefix markers.
85-145: Well-structured HUD element positioning.The centered GUI panel correctly aggregates multiple vanilla renderers (heart, armor, hunger, bubbles, experience) with appropriate offsets and visibility bindings for riding states. The
#hud_visible_centeredbinding provides proper visibility control.
63-83: External namespace references are properly exported and accessible.Both
phud.mainandplayer_ping.mainare correctly defined and exported:
phud.tsexports a "phud" namespace with a "main" panel element (line 210)playerPing.tsexports a "player_ping" namespace with a "main" image element (line 25)The references in hud_screen.ts (lines 69 and 80) follow the established pattern used throughout the PHUD system and will resolve correctly at runtime.
scripts/ui/searchServerForm.ts (2)
1-10: Well-structured module with clear documentation.The file header and imports are clean. The use of
notPrefixfrom the shared string parser module promotes code reuse across the UI system.
98-117: LGTM - Factory pattern correctly implemented.The dynamic buttons panel correctly uses a factory with the
form_buttonscollection and properly binds the collection length.scripts/ui/rotomPhone/first.ts (4)
15-25: Good use of centralized constants.The
FLAGSobject withas constassertion provides type safety and centralizes the button flag prefixes, making maintenance easier.
27-48: Well-designed helper functions.The
buttonFactoryBindingandbuttonVisibilityBindingshelpers effectively reduce duplication across the numerous button panel definitions. Good use of thecontainshelper from the shared module.
50-137: Comprehensive button template with proper visibility handling.The base button template correctly handles image visibility based on texture state and includes proper collection bindings for the form buttons. The separation between image panel and form button components is clean.
413-427: Clean main panel assembly.The main panel correctly embeds the close button and content image with the button controller. Good use of the fluent API with
panel().controls().scripts/ui/serverForm.ts (4)
11-27: Good organization of UI flags.The centralized
FLAGSobject and computedALL_FLAGSprovide a maintainable approach for managing UI routing. UsingObject.values()ensures consistency.
68-97: TheflagBindingshelper is well-designed.The helper correctly handles both modes (contains check and exclusion check) and properly escapes special characters in the regex. The pattern of binding both
#visibleand#enabledto the same expression ensures consistent UI state.
205-258: Verify the#enabledbinding for Rotom Phone pages.Both
rotom_phone_secondandrotom_phone_thirdhave their#enabledproperty bound toFLAGS.rotomPhoneFirst(Lines 225-228 and 251-255), while their#visibleis bound to their respective flags. This appears inconsistent with other panels that bind both properties to the same flag.Is this intentional? If the first page should control enablement of subsequent pages, this is correct. Otherwise, each page should likely bind
#enabledto its own flag:{ binding_name: "#null", - source_property_name: contains("#title_text", FLAGS.rotomPhoneFirst), + source_property_name: contains("#title_text", FLAGS.rotomPhoneSecond), binding_type: "view", target_property_name: "#enabled", },
262-364: Well-structured dynamic button with loading state.The dynamic button correctly handles image visibility, loading progress bar, and button enabled state based on the first character of the button text. The pattern is consistent with
searchServerForm.ts.scripts/ui/phud/battleWait.ts (3)
1-28: Clean component definition with proper helper usage.Good use of the
phudReadandphudVisibilityhelpers from_helpers.ts. The battleLogText label correctly chains bindings for reading from the PHUD system and displaying the text.
29-56: LGTM - Proper component setup.The
menuExtraandinfoLabelcomponents are well-defined. Settinglocalize(false)oninfoLabelis correct since it displays dynamically bound text that shouldn't be localized.
65-79: Properly exported PHUD component.The
defineMainexport withsubdir: "phud"correctly organizes the output. The red-tinted overlay matches the documented behavior, andphudVisibilityensures the component only appears when#battleLoghas content.scripts/ui/phud/phud.ts (5)
11-21: Clear update string prefixes.The
UPDATE_STRINGSobject withas constprovides type-safe prefixes for the server-to-client data channel. This is a creative and effective approach for Minecraft Bedrock's HUD system.
26-41: Clever data persistence pattern.The
data_controltemplate usesbinding_condition: "visibility_changed"to preserve the last update value in#preserved_text. The visibility expression correctly filters updates to only process relevant data strings. This is an effective pattern for server-to-client data persistence in MCBE UI.
43-85: Complete renderer coverage.All eight data controls are properly instantiated with their corresponding update strings. The template pattern with
$update_stringsubstitution is clean and maintainable.
87-165: Proper cross-component data binding.The elements panel correctly uses
resolve_sibling_scope: trueto read from sibling data controls. The string subtraction pattern(#preserved_text - '${UPDATE_STRINGS.xxx}')effectively strips the prefix to extract the data payload.
206-213: Correct namespace assembly.The dataControl is properly added to the namespace for reference by child elements. The main panel correctly composes renderers and elements, and the
subdir: "phud"option organizes the output appropriately.scripts/ui/rotomPhone/third.ts (1)
382-394: Replace placeholder text with actual values or bindings.The labels contain placeholder text like
"§fValue 1"through"§fValue 4"and"§fIDKKKK". If these are meant to be dynamic, they should use bindings. If they are static labels, replace them with appropriate display text.scripts/ui/phud/_helpers.ts (1)
1-136: LGTM!Well-structured utility module with clear documentation. The helper functions provide a consistent pattern for PHUD visibility bindings and text extraction. The use of template replacement in
phudReadwith${prop}is a clean approach for composable transforms.scripts/ui/rotomPhone/second.ts (1)
106-108: Verify button texture paths are intentional.The button textures here use
"textures/ui/form_btn_background"whilethird.tsuses"textures/ui/gui/rotom_phone/form_btn_background". Confirm whether the second page should use the generic or Rotom Phone-specific textures.scripts/ui/chestServerForm.ts (1)
250-260: Multiple bindings target#visible- verify behavior.Two consecutive view bindings both set
target_property_name: "#visible". In most binding systems, later bindings override earlier ones. Verify this is the intended behavior and not causing the first visibility check to be ignored.scripts/ui/phud/sidebar.ts (1)
256-279: LGTM - Clean slot generation pattern.The loop-based approach for generating 6 Pokemon slots with proper index bindings is well-implemented and avoids repetitive code. The padding insertion logic is correct.
scripts/ui/phud/_string_parser.ts (3)
1-20: LGTM! Clear and comprehensive documentation.The header provides excellent context about Bedrock UI expression syntax and format specifiers, with helpful examples that will aid developers using these utilities.
22-78: LGTM! Core string manipulation functions are well-implemented.The
first,skip, andslicefunctions correctly implement substring operations using Bedrock's printf-style format specifiers. The composition insliceis particularly elegant.
227-286: LGTM! Logical and arithmetic functions are correctly implemented.The
not,and,or, andmultiplyfunctions provide clean wrappers for combining and manipulating expressions.
| "fs-extra": "^11.2.0", | ||
| "inquirer": "^10.1.7", | ||
| "lodash": "^4.17.21", | ||
| "mcbe-ts-ui": "^1.0.1", |
There was a problem hiding this comment.
🧩 Analysis chain
Script executed:
# Check the mcbe-ts-ui package on npm registry
curl -s https://registry.npmjs.org/mcbe-ts-ui | jq '{latest: .["dist-tags"].latest, published: .time.modified, description: .description, versions: (.versions | keys[-5:] | reverse)}'Repository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
{
"latest": "1.0.2",
"published": "2025-11-25T21:31:20.590Z",
"description": "A TypeScript library for generating Minecraft Bedrock JSON UI files with a fluent builder API.",
"versions": [
"1.0.2",
"1.0.1",
"1.0.0"
]
}
</shell_result>
Update mcbe-ts-ui to the latest available version (1.0.2).
The package exists and is actively maintained, but version 1.0.2 was released more recently than the specified 1.0.1. While the caret range (^1.0.1) will automatically fetch 1.0.2 on install, explicitly update to "mcbe-ts-ui": "^1.0.2" to track the latest minor version.
🤖 Prompt for AI Agents
In package.json around line 45, the dependency "mcbe-ts-ui" is pinned to
"^1.0.1" but a newer patch/minor release 1.0.2 is available; update the version
string to "^1.0.2" to explicitly track the latest minor/patch release and commit
the change so package managers and lockfiles resolve the newer version.
| { | ||
| quest_chest_grid: { | ||
| type: "grid", | ||
| grid_dimensions: [9, 10], | ||
| size: ["100% - 83px", "100% - 36px"], | ||
| offset: [33, 41], | ||
| anchor_from: "top_left", | ||
| anchor_to: "top_left", | ||
| grid_item_template: "chest_ui.chest_item", | ||
| collection_name: "form_buttons", | ||
| layer: 1, | ||
| }, |
There was a problem hiding this comment.
Incorrect grid name - copy-paste error.
The grid inside backpack_grid is named quest_chest_grid which appears to be a copy-paste error. Consider renaming to backpack_chest_grid for consistency.
{
- quest_chest_grid: {
+ backpack_chest_grid: {
type: "grid",
grid_dimensions: [9, 10],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| quest_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 10], | |
| size: ["100% - 83px", "100% - 36px"], | |
| offset: [33, 41], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, | |
| { | |
| backpack_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 10], | |
| size: ["100% - 83px", "100% - 36px"], | |
| offset: [33, 41], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, |
🤖 Prompt for AI Agents
In scripts/ui/chestServerForm.ts around lines 711 to 722 the grid key is
incorrectly named "quest_chest_grid" (copy‑paste error); rename it to
"backpack_chest_grid" wherever defined and referenced in this block (and update
any corresponding references elsewhere if present) so the grid name matches the
surrounding "backpack_grid" context and maintains consistency.
| { | ||
| quest_chest_grid: { | ||
| type: "grid", | ||
| grid_dimensions: [9, 6], | ||
| size: ["100% - 47px", "100% - 78px"], | ||
| offset: [20, 58], | ||
| anchor_from: "top_left", | ||
| anchor_to: "top_left", | ||
| grid_item_template: "chest_ui.chest_item", | ||
| collection_name: "form_buttons", | ||
| layer: 1, | ||
| }, |
There was a problem hiding this comment.
Incorrect grid name - copy-paste error.
Similar to backpack_grid, this grid is named quest_chest_grid instead of a more appropriate name like auction_house_chest_grid.
{
- quest_chest_grid: {
+ auction_house_chest_grid: {
type: "grid",
grid_dimensions: [9, 6],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| quest_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 6], | |
| size: ["100% - 47px", "100% - 78px"], | |
| offset: [20, 58], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, | |
| { | |
| auction_house_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 6], | |
| size: ["100% - 47px", "100% - 78px"], | |
| offset: [20, 58], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, |
🤖 Prompt for AI Agents
In scripts/ui/chestServerForm.ts around lines 740 to 751 the grid key is
incorrectly named quest_chest_grid (copy-paste); rename the key to
auction_house_chest_grid and update any in-file or project-wide references to
this grid name (e.g., templates, event handlers, collection consumers) so they
match the new name; preserve all other properties unchanged.
| /** | ||
| * Check if the first N characters equal a specific value. | ||
| * | ||
| * @param length - Number of characters to check | ||
| * @param prop - The property reference | ||
| * @param value - The expected prefix value | ||
| * @returns Expression string for prefix check (boolean result) | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * prefix(4, "#text", "cht:") // "(('%.4s' * #text) = 'cht:')" | ||
| * prefix(1, "#text", "t") // "(('%.1s' * #text) = 't')" | ||
| * ``` | ||
| */ | ||
| export function prefix(length: number, prop: string, value: string): string { | ||
| return `((%.${length}s * ${prop}) = '${value}')`; | ||
| } | ||
|
|
||
| /** | ||
| * Check if the first N characters do NOT equal a specific value. | ||
| * | ||
| * @param length - Number of characters to check | ||
| * @param prop - The property reference | ||
| * @param value - The value to check against | ||
| * @returns Expression string for negative prefix check | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * notPrefix(1, "#text", " ") // "(not((%.1s * #text) = ' '))" | ||
| * ``` | ||
| */ | ||
| export function notPrefix(length: number, prop: string, value: string): string { | ||
| return `(not(${prefix(length, prop, value)}))`; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Script executed:
#!/bin/bash
# Search for usage of prefix and notPrefix functions
rg -n 'prefix\(' scripts/ui/phud/ -A 2 -B 2 --type ts
echo "---"
# Also search for notPrefix usage
rg -n 'notPrefix\(' scripts/ui/phud/ -A 2 -B 2 --type tsRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
scripts/ui/phud/phone.ts-121- type: "panel",
scripts/ui/phud/phone.ts-122- size: ["100%", "100%"],
scripts/ui/phud/phone.ts:123: $condition: prefix(4, "#value", "loop"),
scripts/ui/phud/phone.ts-124- controls: [
scripts/ui/phud/phone.ts-125- {
--
scripts/ui/phud/phone.ts-171- ns.addRaw("jeb_background@abstract_phone_conditional", {
scripts/ui/phud/phone.ts-172- type: "image",
scripts/ui/phud/phone.ts:173: $condition: prefix(4, "#value", "loop"),
scripts/ui/phud/phone.ts-174- size: ["100%", "100%"],
scripts/ui/phud/phone.ts-175- texture: "textures/ui/phud/box_wide",
--
scripts/ui/phud/_string_parser.ts-16- * skip(5, "#prop") // "(#prop - (%.5s * #prop))" - skip first 5
scripts/ui/phud/_string_parser.ts-17- * slice(5, 10, "#prop") // First take chars after 5, then take first 10
scripts/ui/phud/_string_parser.ts:18: * prefix(4, "#prop", "test") // Check if first 4 chars equal "test"
scripts/ui/phud/_string_parser.ts-19- * ```
scripts/ui/phud/_string_parser.ts-20- */
--
scripts/ui/phud/_string_parser.ts-88- * @example
scripts/ui/phud/_string_parser.ts-89- * ```typescript
scripts/ui/phud/_string_parser.ts:90: * prefix(4, "#text", "cht:") // "(('%.4s' * #text) = 'cht:')"
scripts/ui/phud/_string_parser.ts:91: * prefix(1, "#text", "t") // "(('%.1s' * #text) = 't')"
scripts/ui/phud/_string_parser.ts-92- * ```
scripts/ui/phud/_string_parser.ts-93- */
scripts/ui/phud/_string_parser.ts:94:export function prefix(length: number, prop: string, value: string): string {
scripts/ui/phud/_string_parser.ts-95- return `((%.${length}s * ${prop}) = '${value}')`;
scripts/ui/phud/_string_parser.ts-96-}
--
scripts/ui/phud/_string_parser.ts-110- */
scripts/ui/phud/_string_parser.ts-111-export function notPrefix(length: number, prop: string, value: string): string {
scripts/ui/phud/_string_parser.ts:112: return `(not(${prefix(length, prop, value)}))`;
scripts/ui/phud/_string_parser.ts-113-}
scripts/ui/phud/_string_parser.ts-114-
---
scripts/ui/phud/_string_parser.ts-106- * @example
scripts/ui/phud/_string_parser.ts-107- * ```typescript
scripts/ui/phud/_string_parser.ts:108: * notPrefix(1, "#text", " ") // "(not((%.1s * #text) = ' '))"
scripts/ui/phud/_string_parser.ts-109- * ```
scripts/ui/phud/_string_parser.ts-110- */
scripts/ui/phud/_string_parser.ts:111:export function notPrefix(length: number, prop: string, value: string): string {
scripts/ui/phud/_string_parser.ts-112- return `(not(${prefix(length, prop, value)}))`;
scripts/ui/phud/_string_parser.ts-113-}
</shell_result>
Script executed:
#!/bin/bash
# Read the entire _string_parser.ts file to see all expression functions
cat -n scripts/ui/phud/_string_parser.tsRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
1 /**
2 * String Parser Helpers for PHUD
3 *
4 * These helpers generate Bedrock UI expression strings for parsing/manipulating
5 * bound string values. Bedrock uses C printf-style format specifiers combined
6 * with string arithmetic operators.
7 *
8 * Format specifier syntax: `%.Ns` where N is the max character count
9 * - `%.Ns * string` - Get first N characters (truncate)
10 * - `string - (%.Ns * string)` - Get characters after position N (skip N)
11 * - String subtraction: `a - b` removes substring b from string a
12 *
13 * @example Common patterns
14 * ```typescript
15 * first(5, "#prop") // "%.5s * #prop" - first 5 chars
16 * skip(5, "#prop") // "(#prop - (%.5s * #prop))" - skip first 5
17 * slice(5, 10, "#prop") // First take chars after 5, then take first 10
18 * prefix(4, "#prop", "test") // Check if first 4 chars equal "test"
19 * ```
20 */
21
22 /**
23 * Get the first N characters of a string property.
24 *
25 * Equivalent to: `string.substring(0, n)` or `string.slice(0, n)`
26 *
27 * @param length - Number of characters to take from the start
28 * @param prop - The property reference (e.g., "#form_button_text")
29 * @returns Expression string for first N characters
30 *
31 * @example
32 * ```typescript
33 * first(80, "#level_number") // "%.80s * #level_number"
34 * first(1, "#text") // "%.1s * #text"
35 * ```
36 */
37 export function first(length: number, prop: string): string {
38 return `%.${length}s * ${prop}`;
39 }
40
41 /**
42 * Skip the first N characters and get the rest.
43 *
44 * Equivalent to: `string.substring(n)` or `string.slice(n)`
45 *
46 * @param length - Number of characters to skip
47 * @param prop - The property reference
48 * @returns Expression string for characters after position N
49 *
50 * @example
51 * ```typescript
52 * skip(80, "#level_number") // "(#level_number - (%.80s * #level_number))"
53 * skip(4, "#text") // "(#text - (%.4s * #text))"
54 * ```
55 */
56 export function skip(length: number, prop: string): string {
57 return `(${prop} - (%.${length}s * ${prop}))`;
58 }
59
60 /**
61 * Get a slice of characters: skip first `start` chars, then take `length` chars.
62 *
63 * Equivalent to: `string.substring(start, start + length)` or `string.slice(start, start + length)`
64 *
65 * @param start - Position to start from (characters to skip)
66 * @param length - Number of characters to take
67 * @param prop - The property reference
68 * @returns Expression string for the substring
69 *
70 * @example
71 * ```typescript
72 * slice(4, 8, "#text") // Get chars 4-12: "%.8s * (#text - (%.4s * #text))"
73 * slice(10, 2, "#data") // Get chars 10-12
74 * ```
75 */
76 export function slice(start: number, length: number, prop: string): string {
77 return `%.${length}s * ${skip(start, prop)}`;
78 }
79
80 /**
81 * Check if the first N characters equal a specific value.
82 *
83 * @param length - Number of characters to check
84 * @param prop - The property reference
85 * @param value - The expected prefix value
86 * @returns Expression string for prefix check (boolean result)
87 *
88 * @example
89 * ```typescript
90 * prefix(4, "#text", "cht:") // "(('%.4s' * #text) = 'cht:')"
91 * prefix(1, "#text", "t") // "(('%.1s' * #text) = 't')"
92 * ```
93 */
94 export function prefix(length: number, prop: string, value: string): string {
95 return `((%.${length}s * ${prop}) = '${value}')`;
96 }
97
98 /**
99 * Check if the first N characters do NOT equal a specific value.
100 *
101 * @param length - Number of characters to check
102 * @param prop - The property reference
103 * @param value - The value to check against
104 * @returns Expression string for negative prefix check
105 *
106 * @example
107 * ```typescript
108 * notPrefix(1, "#text", " ") // "(not((%.1s * #text) = ' '))"
109 * ```
110 */
111 export function notPrefix(length: number, prop: string, value: string): string {
112 return `(not(${prefix(length, prop, value)}))`;
113 }
114
115 /**
116 * Strip a character/substring from the result (usually underscore separator).
117 *
118 * @param expr - The expression to strip from
119 * @param char - The character to remove (default: "_")
120 * @returns Expression with character removed
121 *
122 * @example
123 * ```typescript
124 * strip(first(80, "#level")) // "((%.80s * #level) - '_')"
125 * strip(skip(4, "#text"), ":") // "((#text - (%.4s * #text)) - ':')"
126 * ```
127 */
128 export function strip(expr: string, char: string = "_"): string {
129 return `(${expr} - '${char}')`;
130 }
131
132 /**
133 * Concatenate strings together.
134 *
135 * @param parts - String parts to concatenate (literals should be quoted)
136 * @returns Expression for concatenated string
137 *
138 * @example
139 * ```typescript
140 * concat("'textures/ui/'", skip(4, "#path"))
141 * // "('textures/ui/' + (#path - (%.4s * #path)))"
142 * ```
143 */
144 export function concat(...parts: string[]): string {
145 return `(${parts.join(" + ")})`;
146 }
147
148 /**
149 * Wrap a value as a string literal for use in expressions.
150 *
151 * @param value - The string value
152 * @returns Quoted string for use in expressions
153 *
154 * @example
155 * ```typescript
156 * literal("textures/ui/") // "'textures/ui/'"
157 * concat(literal("prefix_"), "#value")
158 * ```
159 */
160 export function literal(value: string): string {
161 return `'${value}'`;
162 }
163
164 /**
165 * Check if a property is not empty.
166 *
167 * @param prop - The property reference
168 * @returns Expression that evaluates to true if not empty
169 *
170 * @example
171 * ```typescript
172 * notEmpty("#text") // "(not (#text = ''))"
173 * ```
174 */
175 export function notEmpty(prop: string): string {
176 return `(not (${prop} = ''))`;
177 }
178
179 /**
180 * Check if a property equals a value.
181 *
182 * @param prop - The property reference
183 * @param value - The value to compare against
184 * @returns Expression for equality check
185 *
186 * @example
187 * ```typescript
188 * equals("#type", "button") // "(#type = 'button')"
189 * ```
190 */
191 export function equals(prop: string, value: string): string {
192 return `(${prop} = '${value}')`;
193 }
194
195 /**
196 * Check if a property does not equal a value.
197 *
198 * @param prop - The property reference
199 * @param value - The value to compare against
200 * @returns Expression for inequality check
201 *
202 * @example
203 * ```typescript
204 * notEquals("#type", "hidden") // "(not (#type = 'hidden'))"
205 * ```
206 */
207 export function notEquals(prop: string, value: string): string {
208 return `(not ${equals(prop, value)})`;
209 }
210
211 /**
212 * Check if string contains a substring (by checking if removing it changes the string).
213 *
214 * @param prop - The property reference
215 * @param substring - The substring to search for
216 * @returns Expression that evaluates to true if substring exists
217 *
218 * @example
219 * ```typescript
220 * contains("#text", "search") // "(not ((#text - 'search') = #text))"
221 * ```
222 */
223 export function contains(prop: string, substring: string): string {
224 return `(not ((${prop} - '${substring}') = ${prop}))`;
225 }
226
227 /**
228 * Negate an expression.
229 *
230 * @param expr - The expression to negate
231 * @returns Negated expression
232 *
233 * @example
234 * ```typescript
235 * not(contains("#text", "hidden")) // "(not (not ((#text - 'hidden') = #text)))"
236 * ```
237 */
238 export function not(expr: string): string {
239 return `(not ${expr})`;
240 }
241
242 /**
243 * Combine expressions with AND.
244 *
245 * @param exprs - Expressions to AND together
246 * @returns Combined expression
247 *
248 * @example
249 * ```typescript
250 * and(notEmpty("#a"), notEmpty("#b")) // "((not (#a = '')) and (not (#b = '')))"
251 * ```
252 */
253 export function and(...exprs: string[]): string {
254 return `(${exprs.join(" and ")})`;
255 }
256
257 /**
258 * Combine expressions with OR.
259 *
260 * @param exprs - Expressions to OR together
261 * @returns Combined expression
262 *
263 * @example
264 * ```typescript
265 * or(equals("#type", "a"), equals("#type", "b"))
266 * ```
267 */
268 export function or(...exprs: string[]): string {
269 return `(${exprs.join(" or ")})`;
270 }
271
272 /**
273 * Multiply a numeric string by a number (for numeric parsing).
274 *
275 * @param prop - The property containing a numeric string
276 * @param multiplier - The multiplier
277 * @returns Expression for multiplication
278 *
279 * @example
280 * ```typescript
281 * multiply(first(3, "#value"), 1) // "( (%.3s * #value) * 1 )"
282 * ```
283 */
284 export function multiply(prop: string, multiplier: number): string {
285 return `( ${prop} * ${multiplier} )`;
286 }
287
288 // ============================================================================
289 // Common Compound Helpers
290 // ============================================================================
291
292 /**
293 * Get first N chars with underscore stripped (common PHUD pattern).
294 *
295 * @param length - Number of characters
296 * @param prop - The property reference
297 * @returns Expression for first N chars without underscore
298 *
299 * @example
300 * ```typescript
301 * firstStripped(80, "#level_number") // "((%.80s * #level_number) - '_')"
302 * ```
303 */
304 export function firstStripped(length: number, prop: string): string {
305 return strip(first(length, prop));
306 }
307
308 /**
309 * Skip first N chars with underscore stripped (common PHUD pattern).
310 *
311 * @param length - Number of characters to skip
312 * @param prop - The property reference
313 * @returns Expression for remainder without underscore
314 *
315 * @example
316 * ```typescript
317 * skipStripped(80, "#level_number") // "((#level_number - (%.80s * #level_number)) - '_')"
318 * ```
319 */
320 export function skipStripped(length: number, prop: string): string {
321 return strip(skip(length, prop));
322 }
323
324 /**
325 * Build a texture path by concatenating a base path with a parsed property.
326 *
327 * @param basePath - The base texture path
328 * @param prop - Property containing the texture name
329 * @param skipChars - Optional chars to skip from prop (default: 0)
330 * @returns Expression for full texture path
331 *
332 * @example
333 * ```typescript
334 * texturePath("textures/ui/sidebar/balls/", "#ball_type")
335 * // "('textures/ui/sidebar/balls/' + #ball_type)"
336 *
337 * texturePath("textures/sprites/", "#icon", 4)
338 * // "('textures/sprites/' + (#icon - (%.4s * #icon)))"
339 * ```
340 */
341 export function texturePath(
342 basePath: string,
343 prop: string,
344 skipChars: number = 0
345 ): string {
346 const propExpr = skipChars > 0 ? skip(skipChars, prop) : prop;
347 return concat(literal(basePath), propExpr);
348 }
</shell_result>
Fix JSDoc examples to match correct implementation output.
Verification confirms two documentation errors in the prefix and notPrefix JSDoc examples:
-
Lines 90-91 (
prefixexamples): The format specifiers are incorrectly quoted. Examples show(('%.4s' * ...)but the implementation produces((%.4s * ...)(no quotes around%.Ns). This matches the pattern infirst()andskip()functions throughout the file. -
Line 108 (
notPrefixexample): The example shows(not((%.1s * #text) = ' '))but sinceprefix()returns((%.1s * #text) = ' '), the actual output includes an extra set of parentheses:(not(((%.1s * #text) = ' '))).
Update the examples to:
prefix(4, "#text", "cht:") // "((%.4s * #text) = 'cht:')"prefix(1, "#text", "t") // "((%.1s * #text) = 't')"notPrefix(1, "#text", " ") // "(not(((%.1s * #text) = ' ')))"
🤖 Prompt for AI Agents
In scripts/ui/phud/_string_parser.ts around lines 80 to 113, the JSDoc examples
for prefix and notPrefix are incorrect: the prefix examples show quoted format
specifiers and notPrefix example misses the extra parentheses produced by
prefix(); update the example comment lines so prefix examples read exactly
"((%.4s * #text) = 'cht:')" and "((%.1s * #text) = 't')" and update the
notPrefix example to "(not(((%.1s * #text) = ' ')))" to match the actual
returned strings.
| bindings: [ | ||
| { | ||
| binding_type: "view", | ||
| source_control_name: "image", | ||
| resolve_sibling_scope: true, | ||
| source_property_name: "(not (#texture = ''))", | ||
| target_property_name: "#visible", | ||
| }, | ||
| ], |
There was a problem hiding this comment.
Missing binding_name field in view binding.
This binding is missing binding_name: "#null" which is present in the equivalent binding in third.ts (line 65). View bindings typically require this field.
bindings: [
{
+ binding_name: "#null",
binding_type: "view",
source_control_name: "image",
resolve_sibling_scope: true,
source_property_name: "(not (#texture = ''))",
target_property_name: "#visible",
},
],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| bindings: [ | |
| { | |
| binding_type: "view", | |
| source_control_name: "image", | |
| resolve_sibling_scope: true, | |
| source_property_name: "(not (#texture = ''))", | |
| target_property_name: "#visible", | |
| }, | |
| ], | |
| bindings: [ | |
| { | |
| binding_name: "#null", | |
| binding_type: "view", | |
| source_control_name: "image", | |
| resolve_sibling_scope: true, | |
| source_property_name: "(not (#texture = ''))", | |
| target_property_name: "#visible", | |
| }, | |
| ], |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/second.ts around lines 62 to 70, the view binding is
missing the required binding_name field; add binding_name: "#null" to the
binding object (same position as in third.ts) so the view binding has
binding_type, binding_name, source_control_name, resolve_sibling_scope,
source_property_name and target_property_name; ensure the field is a string
"#null" and placed alongside the other properties.
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (3)
scripts/ui/pokemon/pc.ts (1)
249-263: Bind the PC title label to#title_textso the box name updates correctly.The center title label uses
text: "#title_text"but has nobindingsblock, unlike other UIs (rotom phone, chest forms, pokemon UI) where#title_textis explicitly bound as a global. As written, this label won’t be driven by the global title value and is likely to render the literal string or stay static.To align with the rest of the UI system and ensure the PC box title updates, add a global binding here:
- text: { - type: "label", - text: "#title_text", - text_alignment: "center", - font_scale_factor: 0.95, - }, + text: { + type: "label", + text: "#title_text", + text_alignment: "center", + font_scale_factor: 0.95, + bindings: [ + { + binding_name: "#title_text", + binding_type: "global", + }, + ], + },scripts/ui/chestServerForm.ts (2)
638-664: Backpack grid inner key still namedquest_chest_gridInside
backpack_gridthe inner grid control is still namedquest_chest_grid(Line 650), which reads like a copy‑paste from the quest layouts rather than something backpack‑specific. Renaming this to a more appropriate key improves clarity and avoids confusion with the actual quest grids above.For example:
- { - quest_chest_grid: { + { + backpack_chest_grid: { type: "grid", grid_dimensions: [9, 10], size: ["100% - 83px", "100% - 36px"], offset: [33, 41], anchor_from: "top_left", anchor_to: "top_left", grid_item_template: "chest_ui.chest_item", collection_name: "form_buttons", layer: 1, }, },If there are any code paths referring to this grid by name, they should be updated accordingly.
666-692: Auction house grid inner key still namedquest_chest_gridSimilarly, the inner grid for
auction_house_grid(Line 678) is also keyed asquest_chest_grid, which is confusing in the context of an auction house layout. A more descriptive key (e.g.auction_house_chest_grid) would better reflect its purpose and avoid conflating it with the quest grids.Example rename:
- { - quest_chest_grid: { + { + auction_house_chest_grid: { type: "grid", grid_dimensions: [9, 6], size: ["100% - 47px", "100% - 78px"], offset: [20, 58], anchor_from: "top_left", anchor_to: "top_left", grid_item_template: "chest_ui.chest_item", collection_name: "form_buttons", layer: 1, }, },As above, update any references that rely on this key name.
🧹 Nitpick comments (13)
scripts/ui/phud/battleWait.ts (2)
19-31: Confirm intended localization behavior for battle log vs subtitle text
battleLogTextis marked.localize(true)while its content ultimately comes fromphudRead("#battleLog", "#log_text")→viewBinding("#log_text", "#text"), whereasinfoLabelis.localize(false)and driven byhudSubtitleBinding(). This is fine if the battle log data is a translation key and the HUD subtitle binding returns already-localized text, but it will misbehave if both sources are already-localized strings or both are keys.Please double-check:
- What format
#battleLog/#log_textcarries (keys vs final strings).- What
hudSubtitleBinding()provides.Adjust
.localize(true|false)for each label accordingly if the current assumptions don’t match.Also applies to: 43-56
32-42: Review layering and layout constants for consistency with other PHUD elementsYou’re mixing relatively small
layervalues on inner controls (menuExtraat 2,infoLabelat 3) with large values on the root and text (mainat 1000,battleLogTextat 1002). Depending on how the engine treats layers globally across the screen, this can lead to surprising z-ordering relative to other HUD pieces.Consider:
- Keeping related elements in a tighter, consistent layer range (e.g., 1000–1003) or
- Documenting these layer choices and aligning them with other
phud_*modules so the battle wait overlay behaves predictably amid other overlays.Also, verify that
mainHolder’s.size("100%", "95%")inside a 30%-tall root gives the intended vertical padding and doesn’t clip content on narrower or differently scaled UIs.Also applies to: 57-78
scripts/ui/phud/currency.ts (1)
67-74: Verify the magic number 80 is appropriate for all use cases.The hardcoded value
80for string splitting appears in multiple places. Consider extracting this as a named constant for maintainability and to ensure consistency if the format changes.+// Character limit for quest text portion +const QUEST_TEXT_LENGTH = 80; + // Quest label - displays first 80 characters (quest info) const questLabel = label("quest_label") // ... - .bindings(phudRead("#level_number", "#text", firstStripped(80, "${prop}"))); + .bindings(phudRead("#level_number", "#text", firstStripped(QUEST_TEXT_LENGTH, "${prop}")));scripts/ui/phud/playerPing.ts (2)
10-19: Consider renaming internal label for clarity.The label is named
player_position_textbut the component displays ping/latency information. Consider renaming toplayer_ping_labelor similar to match the component's purpose.
22-30: Naming inconsistency with other PHUD components.This component uses
"player_ping"as its name, while other PHUD components follow the pattern"phud_*"(e.g.,phud_actionbar,phud_currency,phud_sidebar). Consider using"phud_player_ping"for consistency.export default defineMain( - "player_ping", + "phud_player_ping", image("main")scripts/ui/phud/sidebar.ts (1)
200-214: Loop logic is correct but could be clearer.The loop correctly creates 6 slots with padding between them. The condition
if (slotIndex >= 5) continue;works but could be more readable asif (slotIndex < 5)with the padding logic inside.for (let slotIndex = 0; slotIndex < 6; slotIndex++) { pokemonHolder.controls( extend( `pokemon${slotIndex + 1}`, pokemonSlotTemplate.getName(), getPokemonSlotIndices(slotIndex) ) ); - // Add padding after each slot (except last) - if (slotIndex >= 5) continue; - pokemonHolder.controls( - extend(`padding_${slotIndex + 1}`, slotPaddingTemplate.getName()) - ); + // Add padding after each slot (except last) + if (slotIndex < 5) { + pokemonHolder.controls( + extend(`padding_${slotIndex + 1}`, slotPaddingTemplate.getName()) + ); + } }scripts/ui/pokemon/attack.ts (2)
255-270: Consider consistent color format (RGBA vs RGB).Line 259 uses
[0.1, 0.6, 1](RGB, 3 values) while progress bars elsewhere (lines 452, 458, 464) use RGBA with 4 values like[0.5, 1.0, 0.5, 1.0]. While Bedrock UI may accept both formats, consistent RGBA usage would improve maintainability.image("pp_bar") .texture("textures/ui/battle/white_shaded") - .color([0.1, 0.6, 1]) + .color([0.1, 0.6, 1, 1.0]) .layer(10)
386-420: Non-obvious grid layout offsets.The offset values for grid slots 3 and 4 use large negative Y percentages (
"-175%","-120%"), which is unconventional. While this may be intentional to achieve the desired visual layout in a content-sized panel, a brief comment explaining the positioning logic would improve maintainability.scripts/ui/serverForm.ts (1)
97-126: Confirm Rotom Phone enable conditions and consider reusingflagBindingsFor the Rotom Phone panels:
rotom_phone_firstusesflagBindings(FLAGS.rotomPhoneFirst), so both visibility and enabled state follow the same flag.rotom_phone_secondandrotom_phone_third(Lines 106‑124) set#visiblebased on their own flags but set#enabledbased onFLAGS.rotomPhoneFirst.If this is intentional (e.g. only allow interacting with later pages when the “first” flag is present), that’s fine, but it’s a non‑obvious contract. If you instead meant “enabled when their own flag is present”,
contains("#title_text", FLAGS.rotomPhoneSecond/Third)should likely be used for#enabledas well.Also, if this pattern is expected to grow, you could generalize
flagBindingsto accept an optionalenabledFlagparameter and reuse it here for consistency.scripts/ui/chestServerForm.ts (1)
50-59: AlignchestVisibilityBindingswith other global flag bindings
chestVisibilityBindingscurrently emits a first binding as just{ binding_name: "#title_text" }without an explicitbinding_typeorbinding_name_override. InserverForm.flagBindingsyou’re more explicit:{ binding_type: "global", binding_condition: "none", binding_name: "#title_text", binding_name_override: "#title_text" },For clarity and to avoid depending on implicit defaults, consider mirroring that pattern here so all visibility helpers behave the same and future readers immediately see that
#title_textcomes from a global binding.A possible refactor:
-const chestVisibilityBindings = (flag: string) => [ - { binding_name: "#title_text" }, - { - binding_name: "#null", - binding_type: "view" as const, - source_property_name: contains("#title_text", flag), - target_property_name: "#visible", - }, -]; +const chestVisibilityBindings = (flag: string) => [ + { + binding_type: "global", + binding_condition: "none", + binding_name: "#title_text", + binding_name_override: "#title_text", + }, + { + binding_name: "#null", + binding_type: "view" as const, + source_property_name: contains("#title_text", flag), + target_property_name: "#visible", + }, +];scripts/ui/rotomPhone/first.ts (1)
33-37: Clean helper function for visibility bindings.This
buttonVisibilityBindingshelper nicely encapsulates the binding logic. Note thatsecond.tsandthird.tsinline these bindings directly instead of using a helper—consider extracting this to a shared utility if the pattern is used across all three files.scripts/ui/rotomPhone/second.ts (2)
146-150: Placeholder labels detected.These labels (
Value 1,Value 2, etc.) appear to be placeholders. If these should display dynamic data, consider adding appropriate bindings. If they're intentional static labels, consider using more descriptive text.
1-198: Consider extracting shared UI components.The three Rotom Phone page files (
first.ts,second.ts,third.ts) share significant structural similarities—button templates, panel builders, stack configurations, and controller patterns. Consider extracting shared utilities (e.g.,createButtonTemplate,createButtonPanels,createButtonStacks) to a common module to reduce duplication and ease maintenance.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
scripts/ui/README.md(1 hunks)scripts/ui/chestServerForm.ts(1 hunks)scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/battleWait.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/evolutionWait.ts(1 hunks)scripts/ui/phud/loadingScreen.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/playerPing.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)scripts/ui/pokemon/attack.ts(1 hunks)scripts/ui/pokemon/pc.ts(1 hunks)scripts/ui/pokemon/pokedex.ts(1 hunks)scripts/ui/pokemon/pokemon.ts(1 hunks)scripts/ui/rotomPhone/first.ts(1 hunks)scripts/ui/rotomPhone/second.ts(1 hunks)scripts/ui/rotomPhone/third.ts(1 hunks)scripts/ui/searchServerForm.ts(1 hunks)scripts/ui/serverForm.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
- scripts/ui/phud/evolutionWait.ts
- scripts/ui/pokemon/pokemon.ts
- scripts/ui/README.md
- scripts/ui/pokemon/pokedex.ts
- scripts/ui/phud/loadingScreen.ts
- scripts/ui/phud/phone.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (23)
scripts/ui/phud/battleWait.ts (1)
1-18: Well-structured TS-UI migration for battle wait HUDThe overall structure (root
defineMaincontainer, inner holder panel, and clearly named controls) is clean and consistent with a fluent mcbe-ts-ui style. No syntax or obvious logic issues stand out.scripts/ui/phud/currency.ts (2)
1-18: LGTM! Clear documentation and appropriate imports.The docstring clearly explains the component purpose and data format. Imports are well-organized and specific to the needs of this component.
20-64: Well-structured component composition.The quest/currency split using
firstStripped(80)andskipStripped(80)is consistent with the documented format. The horizontal stack layout with a separator provides clean visual separation.scripts/ui/phud/actionbar.ts (1)
1-45: LGTM! Clean actionbar implementation.The component is well-structured with clear documentation. The
phudTexthelper simplifies the binding setup, and the visibility is correctly tied to#fake_actionbar.scripts/ui/phud/sidebar.ts (2)
128-139: Potential issue with empty string replacement.The
notEmptycheck uses.replace("''", "'null'")which replaces the literal string''with'null'. Verify this is the intended behavior for handling empty pokemon icon values in the binding expression.
58-66: Good use ofdefineUIfor complex component with templates.The use of
defineUIwith namespace allows proper template definitions that can be extended. ThevariableParsertemplate setup enables clean per-slot data parsing.scripts/ui/pokemon/attack.ts (8)
1-25: Clean imports and well-defined helper.The imports cover all necessary mcbe-ts-ui primitives, and the
visibilityForIdhelper provides a clean abstraction for button visibility bindings used throughout the file.
27-67: Factory-based button stack and hover control look correct.The button stack factory pattern with
factoryBindings()and the hover control's tooltip text extraction using modular string operations are appropriate for Bedrock UI collection-based rendering.
69-143: Well-structured multi-state button component.The simple_button base with four visual states (default, hover, pressed, locked) follows a clean pattern. The enabled binding on line 141 that checks the texture prefix appears to be an intentional encoding scheme for button state.
422-469: Clean HP bar implementation with color-coded variants.The dynamic progress bar pattern with an empty base and color-specific overlays (green/yellow/red) controlled by
$color_idvisibility bindings is a well-structured approach for HP display.
471-564: Actor icon and description panels are well-structured.The entity icon overlay with dual texture bindings (
#texture_file_systemand#texture) and the actor description stack with spacers follow standard Bedrock UI patterns for entity display.
566-629: Actor button layouts correctly mirror ally vs opponent positioning.The ally button shows description-then-icon (right-aligned Pokemon) while opponent shows icon-then-description (left-aligned Pokemon), which is the expected battle UI convention. Setting
enabled: falsemakes these display-only info panels.
631-688: Actor detail stacks with Minecraft formatting codes for IDs.Using section sign characters (
§) as button ID prefixes is a clever way to create a non-colliding namespace for actor identifiers. The symmetric offsets ("-50%"vs"50%") correctly position opponent and ally panels on opposite sides.
690-824: Well-composed main battle UI layout.The main UI effectively combines the bottom battle menu (action buttons, move grid, info area) with top actor details panels. The use of the
button_stackfactory with different$buttontemplates for each section provides clean separation of concerns.scripts/ui/searchServerForm.ts (1)
61-72: Verify search text binding and filter expressionThe search UX wiring looks coherent, but two details are worth double‑checking against vanilla JSON or
mcbe-ts-uidocs:
The
search_bar@common.text_edit_boxuses$text_edit_text_control: "search_buttons", and the template then binds fromsource_control_name: "search_buttons"/source_property_name: "#item_name"into#search_em(Line 109). Please confirm#item_nameis indeed the property that carries the current text for this control; if it’s a different property (e.g.#text), the filter will never react.The visibility condition for each button (Lines 111‑116) combines three sub‑conditions in a single expression string. It’s quite dense; if future tweaks are likely, consider extracting common pieces or adding a comment explaining that this means “visible when search is empty, or the button text starts with
Back, or the button text contains the search term”.Functionally it’s likely correct, but these are brittle spots that would be hard to debug if the runtime binding contract ever changes.
Also applies to: 106-118
scripts/ui/rotomPhone/first.ts (4)
54-70: Approve image panel with visibility binding.The use of
siblingImageVisibilityBinding()here is cleaner than the inlineviewBinding()used insecond.tsandthird.ts. Consider updating the other files to use this helper for consistency.
94-114: LGTM!The button panels configuration and iteration pattern is well-structured. Optional properties are handled correctly with conditional
rawPropcalls.
117-137: LGTM!Button stacks are well-configured with proper factory bindings and offset handling.
173-178: LGTM!Main panel structure is correct with close button and content image properly configured.
scripts/ui/rotomPhone/second.ts (2)
70-72: Inconsistent button texture paths.The texture paths here differ from
first.tsandthird.ts:
- second.ts:
"textures/ui/form_btn_background"- first.ts/third.ts:
"textures/ui/gui/rotom_phone/form_btn_background"If this is intentional for a different visual style on the second page, please add a comment explaining the difference. Otherwise, update to use the consistent path.
54-54: The original review comment appears to be incorrect.Based on my analysis of the codebase:
binding_nameis present: Line 54 insecond.tshasviewBinding("(not (#texture = ''))", "#visible", "image")where"#visible"is the binding_name (second argument). The concern about a missingbinding_name: "#null"is not supported by the code.
siblingImageVisibilityBinding()is a different function:first.tsusessiblingImageVisibilityBinding()(a dedicated helper with no arguments), whilesecond.tsandthird.tsuseviewBinding()with a third parameter"image". These are separate functions frommcbe-ts-ui.Undocumented third parameter: The actual issue is that
viewBinding()is being called with 3 arguments throughout the codebase (e.g.,viewBinding("(not (#texture = ''))", "#visible", "image")), but the README documentation formcbe-ts-uionly shows a 2-argument signature:viewBinding("(#health > 0)", "#visible"). The third"image"parameter is undocumented.The code at line 54 is syntactically consistent with other uses in the codebase, but the lack of documentation for the third parameter creates uncertainty about whether this is correct API usage.
scripts/ui/rotomPhone/third.ts (2)
91-101: LGTM!The button panel configurations, including the
left_big_special_button_panelunique to the third page, are well-structured and follow the established patterns.
195-201: LGTM!Main panel structure is correct and consistent with the other Rotom Phone pages.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | ||
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, |
There was a problem hiding this comment.
Missing binding for #form_text label.
The title label at line 163 correctly includes bindings: [globalBinding("#title_text")], but the label at line 164 uses text: "#form_text" without any bindings. This will display the literal string #form_text instead of the bound value.
- { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } },
+ { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, | |
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } }, |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/first.ts around lines 163 to 164, the second label uses
text: "#form_text" but lacks a binding so it will render the literal string; add
a bindings entry similar to the title label (e.g., bindings:
[globalBinding("#form_text")]) to bind the value instead of showing the literal
token, ensuring the entry matches formatting of the adjacent title label.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | ||
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, |
There was a problem hiding this comment.
Missing binding for #form_text label.
Same issue as in first.ts: the label uses text: "#form_text" without any bindings, so it will display the literal string instead of the bound value.
- { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } },
+ { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, | |
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } }, |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/second.ts around lines 182 to 183, the label currently
uses text: "#form_text" but lacks a binding, so it will render the literal key
instead of the bound value; add the same binding used for title (e.g., include
bindings: [globalBinding("#form_text")] or the project’s equivalent binding
helper) to the label object so the text is dynamically populated from the bound
value.
| { | ||
| left_big_special: { | ||
| type: "panel", | ||
| controls: [{ idk: { type: "label", text: "§fIDKKKK", size: [50, 20], offset: [-65, 49], font_scale_factor: 0.7 } }, { "left_big_special_buttons@rotom_phone_third.left_big_special_buttons": {} }], |
There was a problem hiding this comment.
Development placeholder text detected.
The label text "§fIDKKKK" appears to be a development placeholder. This should be replaced with the actual intended label text before release.
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/third.ts around line 160 the control label uses a
development placeholder text "§fIDKKKK"; replace that placeholder with the
intended production string (or a localized lookup key) and remove any leftover
dev formatting codes if not required, ensuring the new text fits UI size and
font_scale_factor or adjust size/offset accordingly.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | ||
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, |
There was a problem hiding this comment.
Missing binding for #form_text label.
Same issue as in first.ts and second.ts: the label uses text: "#form_text" without any bindings.
- { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } },
+ { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text" } }, | |
| { title: { type: "label", layer: 99, size: [30, 15], anchor_from: "top_middle", anchor_to: "top_middle", offset: [47, "39%"], text: "#title_text", font_scale_factor: 0.55, bindings: [globalBinding("#title_text")] } }, | |
| { label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", bindings: [globalBinding("#form_text")] } }, |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/third.ts around lines 186-187, the label entry uses
text: "#form_text" but lacks a binding; add a bindings array with
globalBinding("#form_text") (e.g. bindings: [globalBinding("#form_text")]) to
that label object to mirror first.ts/second.ts so the text is wired to the
global binding.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/battleWait.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/evolutionWait.ts(1 hunks)scripts/ui/phud/loadingScreen.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/phud.ts(1 hunks)scripts/ui/phud/playerPing.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)ui/_ui_defs.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
- scripts/ui/phud/phud.ts
- scripts/ui/phud/battleWait.ts
- scripts/ui/phud/sidebar.ts
- scripts/ui/phud/actionbar.ts
- scripts/ui/phud/playerPing.ts
- scripts/ui/phud/phone.ts
- scripts/ui/phud/evolutionWait.ts
- scripts/ui/phud/currency.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
scripts/ui/phud/loadingScreen.ts (2)
1-17:loadingTextbindings and localization look coherent; confirm intent for localized dynamic textThe
boundLabelsetup withphudRead("#loadingScreen", "#loadingScreenText")andviewBinding("(#loadingScreenText)", "#text")is consistent and should keep the label in sync with PHUD state, and the layering/alignment look fine. The only thing to double‑check is whether#loadingScreenTextwill always be a localization key (not already‑localized text), so that.localize()does what you expect rather than double‑localizing or no‑oping depending on server state.
19-28: Root background + PHUD visibility wiring is clean; verify layer choices vs other PHUD elementsThe
defineMain("phud_loadingScreen", image("main", "textures/ui/background")...)composition withfullSize(), tiling, andbindings(...phudVisibility("#loadingScreen"))is idiomatic and should integrate well as a PHUD overlay. Just make sure layer1000for the background and1002forloadingTextdon’t conflict with other PHUD components’ layers so the loading screen reliably appears above/below the right elements.
| { | ||
| "ui_defs": [ | ||
| "ui/pokemon/attack.json", | ||
| "ui/pokemon/pokemon.json", | ||
| "ui/chest_server_form.json", | ||
| "ui/search_server_form.json", | ||
| "ui/rotom_phone/first.json", | ||
| "ui/rotom_phone/second.json", | ||
| "ui/rotom_phone/third.json", | ||
| "ui/phud/phud.json", | ||
| "ui/phud/phone.json", | ||
| "ui/phud/currency.json", | ||
| "ui/phud/battle_wait.json", | ||
| "ui/phud/loadingScreen.json", | ||
| "ui/phud/evolutionWait.json", | ||
| "ui/phud/playerPing.json", | ||
| "ui/phud/sidebar.json", | ||
| "ui/phud/actionbar.json", | ||
| "ui/pokemon/pokedex.json", | ||
| "ui/pokemon/pc.json" | ||
| "ui/__generated__/phud/sidebar.json" | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Script executed:
#!/bin/bash
# First, let's check what generated UI files exist
echo "=== Checking ui/__generated__/ directory ==="
if [ -d "ui/__generated__" ]; then
find ui/__generated__ -type f | head -50
echo ""
echo "=== Total generated files ==="
find ui/__generated__ -type f | wc -l
else
echo "ui/__generated__/ does not exist"
fi
# Check if there's a ui/ directory and what's in it
echo ""
echo "=== Checking ui/ directory structure ==="
ls -la ui/ 2>/dev/null | head -30
# Look for UI source files (TypeScript)
echo ""
echo "=== Looking for UI source/script files ==="
find . -path "./ui/__generated__" -prune -o -type f \( -name "*sidebar*" -o -name "*battle*" -o -name "*chest*" -o -name "*phud*" -o -name "*rotom*" \) -print 2>/dev/null | grep -E "\.(ts|tsx|json)$" | head -30Repository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Checking ui/__generated__/ directory ===
ui/__generated__/ does not exist
=== Checking ui/ directory structure ===
total 8
drwxr-xr-x 2 jailuser jailuser 80 Nov 26 20:02 .
drwxr-xr-x 20 jailuser jailuser 720 Nov 26 20:02 ..
-rw-r--r-- 1 jailuser jailuser 346 Nov 26 20:02 _global_variables.json
-rw-r--r-- 1 jailuser jailuser 63 Nov 26 20:02 _ui_defs.json
=== Looking for UI source/script files ===
./animations/battle_tower_npc.animation.json
./attachables/armor/aluminum_chestplate.json
./attachables/armor/dawn_stone_chestplate.json
./attachables/armor/dusk_stone_chestplate.json
./attachables/armor/fire_stone_chestplate.json
./attachables/armor/leaf_stone_chestplate.json
./attachables/armor/moon_stone_chestplate.json
./attachables/armor/sun_stone_chestplate.json
./attachables/armor/thunder_stone_chestplate.json
./attachables/armor/water_stone_chestplate.json
./entity/pokemon/rotom.entity.json
./entity/pokemon/rotomfan.entity.json
./entity/pokemon/rotomfrost.entity.json
./entity/pokemon/rotomheat.entity.json
./entity/pokemon/rotommow.entity.json
./entity/pokemon/rotomwash.entity.json
./models/entity/battle_tower_npc.geo.json
./scripts/ui/chestServerForm.ts
./scripts/ui/phud/battleWait.ts
./scripts/ui/phud/phud.ts
./scripts/ui/phud/sidebar.ts
</shell_result>
Script executed:
#!/bin/bash
# Look for build scripts, webpack configs, or generation scripts
echo "=== Looking for build configuration files ==="
find . -maxdepth 3 -type f \( -name "webpack.config.*" -o -name "tsconfig.json" -o -name "build.json" -o -name "*.build.*" -o -name "Makefile" -o -name "gulpfile.js" \) 2>/dev/null
# Check package.json scripts
echo ""
echo "=== Checking package.json for build/generation scripts ==="
if [ -f "package.json" ]; then
cat package.json | grep -A 20 '"scripts"'
fi
# Look for any TypeScript compilation or generation related files
echo ""
echo "=== Looking for scripts directory ==="
ls -la scripts/ 2>/dev/null | head -20
# Check if there's a specific UI generation script
echo ""
echo "=== Looking for UI generation scripts ==="
find scripts -type f \( -name "*.ts" -o -name "*.js" \) 2>/dev/null | grep -i "ui\|generate\|build" | head -20Repository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Looking for build configuration files ===
./tsconfig.json
=== Checking package.json for build/generation scripts ===
"scripts": {
"test": "jest",
"build": "npx ts-node --project tsconfig.json scripts/build.ts",
"generatePokemonFiles": "npx ts-node --project tsconfig.json scripts/generatePokemonFiles.ts",
"removeUnusedFiles": "npx ts-node --project tsconfig.json scripts/removeUnusedFiles.ts",
"translate": "npx ts-node --project tsconfig.json scripts/translate.ts",
"generateItemLang": "npx ts-node --project tsconfig.json scripts/generateItemLang.ts",
"parseAndCreateIssues": "npx ts-node --project tsconfig.json scripts/parseAndCreateIssues.ts",
"generatePokemonCries": "npx ts-node --project tsconfig.json scripts/generatePokemonCries.ts",
"generateMaterialTypes": "npx ts-node --project tsconfig.json scripts/generateMaterialTypes.ts",
"generateShowdownMap": "npx ts-node --project tsconfig.json scripts/generateShowdownMap.ts",
"prepare": "npx husky"
},
"repository": {
"type": "git",
"url": "git+https://github.com/smell-of-curry/pokebedrock-res.git"
},
"keywords": [
"pokemon",
"minecraft",
"bedrock",
=== Looking for scripts directory ===
total 148
drwxr-xr-x 6 jailuser jailuser 340 Nov 26 20:02 .
drwxr-xr-x 20 jailuser jailuser 720 Nov 26 20:02 ..
-rw-r--r-- 1 jailuser jailuser 6441 Nov 26 20:02 build.ts
drwxr-xr-x 3 jailuser jailuser 100 Nov 26 20:02 data
-rw-r--r-- 1 jailuser jailuser 1337 Nov 26 20:02 generateItemLang.ts
-rw-r--r-- 1 jailuser jailuser 9075 Nov 26 20:02 generateMaterialTypes.ts
-rw-r--r-- 1 jailuser jailuser 11605 Nov 26 20:02 generatePokemonCries.ts
-rw-r--r-- 1 jailuser jailuser 58792 Nov 26 20:02 generatePokemonFiles.ts
-rw-r--r-- 1 jailuser jailuser 5341 Nov 26 20:02 generateShowdownMap.ts
-rw-r--r-- 1 jailuser jailuser 7078 Nov 26 20:02 parseAndCreateIssues.ts
-rw-r--r-- 1 jailuser jailuser 3948 Nov 26 20:02 removeUnusedFiles.ts
drwxr-xr-x 3 jailuser jailuser 140 Nov 26 20:02 templates
drwxr-xr-x 2 jailuser jailuser 60 Nov 26 20:02 tests
-rw-r--r-- 1 jailuser jailuser 4798 Nov 26 20:02 translate.ts
-rw-r--r-- 1 jailuser jailuser 10105 Nov 26 20:02 types.ts
drwxr-xr-x 5 jailuser jailuser 200 Nov 26 20:02 ui
-rw-r--r-- 1 jailuser jailuser 9023 Nov 26 20:02 utils.ts
=== Looking for UI generation scripts ===
scripts/build.ts
scripts/generateItemLang.ts
scripts/generateMaterialTypes.ts
scripts/generatePokemonCries.ts
scripts/generatePokemonFiles.ts
scripts/generateShowdownMap.ts
scripts/ui/chestServerForm.ts
scripts/ui/hud_screen.ts
scripts/ui/phud/actionbar.ts
scripts/ui/phud/battleWait.ts
scripts/ui/phud/currency.ts
scripts/ui/phud/evolutionWait.ts
scripts/ui/phud/loadingScreen.ts
scripts/ui/phud/phone.ts
scripts/ui/phud/phud.ts
scripts/ui/phud/playerPing.ts
scripts/ui/phud/sidebar.ts
scripts/ui/pokemon/attack.ts
scripts/ui/pokemon/pc.ts
scripts/ui/pokemon/pokedex.ts
</shell_result>
Script executed:
#!/bin/bash
# Read the build.ts script to understand UI generation
echo "=== Examining build.ts (main build script) ==="
cat -n scripts/build.ts
# Also check if there's a UI-specific build or generation
echo ""
echo "=== Looking for UI-related code in build.ts ==="
grep -n -i "ui\|__generated__" scripts/build.tsRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Examining build.ts (main build script) ===
1 import fs from "fs";
2 import fsExtra from "fs-extra";
3 import archiver from "archiver";
4 import path from "path";
5 import sharp from "sharp";
6 import ProgressBar from "progress";
7 import {
8 countFilesRecursively,
9 removeCommentsFromJSON,
10 removeCommentsFromLang,
11 } from "./utils";
12
13 /**
14 * Files/Directories to exclude from build.
15 */
16 const exclude = [
17 ".github",
18 ".vscode",
19 ".git",
20 "logs",
21 "node_modules",
22 "scripts",
23 ".gitattributes",
24 ".gitignore",
25 ".mcattributes",
26 "missing_info.md",
27 "package-lock.json",
28 "package.json",
29 "tsconfig.json",
30 "pokemon.json",
31 ];
32
33 /**
34 * Will be the resulting `contents.json` file.
35 */
36 const contents: { content: { path: string }[] } = { content: [] };
37
38 /**
39 * A path to all the textures inside `./textures` directory.
40 * Used to generate `textures_list.json`
41 */
42 const textures: string[] = [];
43
44 /**
45 * Adds a path to a archive, and compressing files.
46 * @param pathToAdd
47 * @param archive
48 */
49 async function addPathToArchive(
50 pathToAdd: string,
51 archive: archiver.Archiver,
52 progress?: ProgressBar
53 ): Promise<void> {
54 const pathStat = await fs.promises.lstat(pathToAdd);
55 const parsedPath = pathToAdd.replace(/\\/g, "/");
56
57 if (pathStat.isDirectory()) {
58 const items = await fs.promises.readdir(pathToAdd);
59 for (const item of items) {
60 await addPathToArchive(path.join(pathToAdd, item), archive, progress);
61 }
62 } else if (pathStat.isFile()) {
63 contents.content.push({ path: parsedPath });
64 const ext = pathToAdd.split(".").pop();
65
66 if (ext === "json") {
67 // Compress JSON file
68 try {
69 const fileContents = await fsExtra.readFile(pathToAdd, "utf-8");
70 const commentsRemoved = removeCommentsFromJSON(fileContents);
71 const parsedJson = JSON.parse(commentsRemoved);
72 const compressedContents = JSON.stringify(parsedJson);
73
74 // Add the compressed JSON content as a temporary file
75 archive.append(compressedContents, { name: pathToAdd });
76 } catch (error) {
77 console.error(`Error compressing JSON: ${pathToAdd}:`, error);
78 }
79 } else if (ext === "png") {
80 if (pathToAdd.startsWith("textures")) textures.push(parsedPath);
81
82 // Compress PNG file
83 try {
84 const compressedBuffer = await sharp(pathToAdd).png().toBuffer();
85
86 // Add the compressed PNG content as a temporary file in memory
87 archive.append(compressedBuffer, { name: pathToAdd });
88 } catch (error) {
89 console.error(`Error compressing PNG: ${pathToAdd}:`, error);
90 }
91 } else if (ext === "material") {
92 try {
93 const fileContents = await fsExtra.readFile(pathToAdd, "utf-8");
94 const commentsRemoved = removeCommentsFromJSON(fileContents);
95 const parsedJson = JSON.parse(commentsRemoved);
96 let compressedContents = JSON.stringify(parsedJson, null, 2);
97
98 // Replace Unix line endings with CRLF (Windows-style)
99 compressedContents = compressedContents.replace(/\n/g, "\r\n");
100
101 // Add the parsed Material content as a temporary file
102 archive.append(compressedContents, { name: pathToAdd });
103 } catch (error) {
104 console.error(`Error parsing JSON (material): ${pathToAdd}:`, error);
105 }
106 } else if (ext === "lang") {
107 // Lang can have comments, and extra spaces, we want to remove those
108 try {
109 const fileContents = await fsExtra.readFile(pathToAdd, "utf-8");
110 const commentsRemoved = removeCommentsFromLang(fileContents);
111 const compressedContents = commentsRemoved;
112
113 // Add the compressed Lang content as a temporary file
114 archive.append(compressedContents, { name: pathToAdd });
115 } catch (error) {
116 console.error(`Error compressing Lang: ${pathToAdd}:`, error);
117 }
118 } else {
119 archive.file(pathToAdd, { name: pathToAdd });
120 }
121
122 progress?.tick();
123 } else {
124 console.warn(`[WARN] Unknown path type: ${pathToAdd}`);
125 }
126 }
127
128 /**
129 * Pipes all files in the current directory to a zip file.
130 * @param fileName
131 */
132 async function pipeToFiles(outputFileNames: string[]) {
133 const archive = archiver("zip", { zlib: { level: 9 } });
134
135 const outputs: fs.WriteStream[] = [];
136 for (const outputFileName of outputFileNames) {
137 if (fs.existsSync(outputFileName)) fs.unlinkSync(outputFileName);
138 const output = fs.createWriteStream(outputFileName);
139
140 output.on("close", () => {
141 console.log(`Pack Archive created for ${outputFileName}!`);
142 console.log(" -" + archive.pointer() + " total bytes");
143 console.log(" -" + (archive.pointer() / 1024 ** 2).toFixed(2) + "MB");
144 });
145
146 outputs.push(output);
147 }
148
149 archive.on("warning", (err) => {
150 if (err.code === "ENOENT") {
151 console.warn(err);
152 } else {
153 throw err;
154 }
155 });
156
157 archive.on("error", (err) => {
158 throw err;
159 });
160
161 const paths = fs.readdirSync(".");
162
163 for (const path of paths) {
164 if (exclude.includes(path)) continue;
165 if (
166 outputFileNames.some((outputFileName) => {
167 const [stem] = outputFileName.split(".");
168 const prefix = stem && stem.length > 0 ? stem : outputFileName;
169 return path.startsWith(prefix);
170 })
171 )
172 continue;
173
174 if (fs.lstatSync(path).isDirectory()) {
175 const totalFiles = countFilesRecursively(path);
176 console.log(`Adding ${totalFiles}x files from '${path}' ...`);
177
178 // Initialize the progress bar
179 const progress = new ProgressBar("Archiving [:bar] :percent :etas", {
180 total: totalFiles,
181 width: 40,
182 complete: "=",
183 incomplete: " ",
184 renderThrottle: 16,
185 });
186
187 await addPathToArchive(path, archive, progress);
188 } else {
189 await addPathToArchive(path, archive);
190 }
191 }
192
193 archive.append(JSON.stringify(contents), { name: "contents.json" });
194 archive.append(JSON.stringify(textures), {
195 name: "textures/textures_list.json",
196 });
197 for (const output of outputs) archive.pipe(output);
198 await archive.finalize();
199 }
200
201 (async () => {
202 if (!fs.existsSync("manifest.json")) {
203 console.error("manifest.json not found.");
204 process.exit(1);
205 }
206
207 try {
208 const manifest = fsExtra.readJsonSync("manifest.json", "utf8");
209 const version = manifest.header.version.join(".");
210 const fileName = `PokeBedrock RES ${version}`;
211
212 await pipeToFiles([`${fileName}.zip`, `${fileName}.mcpack`]);
213 } catch (error) {
214 console.error("Error:", error);
215 process.exit(1);
216 }
217 })();
=== Looking for UI-related code in build.ts ===
14: * Files/Directories to exclude from build.
</shell_result>
Script executed:
#!/bin/bash
# Search for references to __generated__ directory
echo "=== Searching for __generated__ references ==="
rg -n "__generated__" --type ts --type json 2>/dev/null | head -30
# Look for any UI compilation or generation logic
echo ""
echo "=== Searching for UI compilation/generation logic ==="
rg -n -A 5 "\.ts.*json\|generate.*ui\|ui.*generate" scripts/ --type ts 2>/dev/null | head -40
# Check if there's any export logic in the UI TypeScript files
echo ""
echo "=== Checking one UI file for exports/compilation hints ==="
head -50 scripts/ui/phud/sidebar.ts
# Check git status to see if there are untracked generated files
echo ""
echo "=== Checking git status ==="
git status --short ui/ 2>/dev/null || echo "Not a git repo or ui/ has no changes"
# Look for any build-related comments or TODOs in UI files
echo ""
echo "=== Looking for build/generation comments in UI files ==="
rg -n "export\|import\|build\|generate" scripts/ui/ --type ts | head -30Repository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Searching for __generated__ references ===
ui/_ui_defs.json:3: "ui/__generated__/phud/sidebar.json"
=== Searching for UI compilation/generation logic ===
=== Checking one UI file for exports/compilation hints ===
/**
* Pokemon Sidebar HUD Element
*
* Displays a sidebar with up to 6 Pokemon slots showing:
* - Pokemon name
* - Pokemon stats
* - Ball icon (caught with)
* - Pokemon sprite icon
* - Active indicator ring
*
* Uses variable parsing to extract data from a concatenated string.
*/
import {
defineUI,
varRef,
panel,
image,
stackPanel,
extend,
phudVisibility,
notEmpty,
texturePath,
variableParserBindings,
sourceControlBinding,
viewBinding,
boundLabel,
boundImage,
ElementBuilder,
} from "mcbe-ts-ui";
// Pokemon slot indices - each pokemon has 6 data points
const POKEMON_DATA_SIZE = 6;
const pokemonIndexMap = {
stats: 0,
name: 1,
id: 2,
active: 3,
caughtWith: 4,
icon: 5,
} as const;
export default defineUI(
"phud_sidebar",
(ns) => {
// Variable parser template - parses string data from #sidebar
const variableParser = panel("variable_parser")
.variableDefault("visible", "true")
.bindings(...variableParserBindings());
=== Checking git status ===
=== Looking for build/generation comments in UI files ===
</shell_result>
Script executed:
#!/bin/bash
# Check README for UI building instructions
echo "=== Searching README for UI or build info ==="
if [ -f "README.md" ]; then
cat README.md | head -200
fi
# Look for package.json to understand mcbe-ts-ui
echo ""
echo "=== Checking package.json for mcbe-ts-ui info ==="
cat package.json | grep -A 5 -B 5 "mcbe-ts-ui"
# Look for any TypeScript config that might handle UI compilation
echo ""
echo "=== Checking tsconfig.json ==="
cat tsconfig.json
# Check if there are any comments in _ui_defs.json or related files
echo ""
echo "=== Checking _ui_defs.json and related files ==="
cat ui/_ui_defs.json
cat ui/_global_variables.jsonRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Searching README for UI or build info ===
# PokeBedrock Resource Pack
Welcome to the PokeBedrock Resource Pack repository! This resource pack is designed for the Minecraft Bedrock server, PokeBedrock. It allows users to easily download, fix bugs, change textures, and modify the server's appearance.
## Contributing
We welcome contributions to the PokeBedrock Resource Pack! Here's how you can contribute:
### Adding or Changing Translations
1. **Navigate to the Texts Directory**:
- Go to [PokeBedrock Texts Directory](https://github.com/smell-of-curry/pokebedrock-res/tree/main/texts).
2. **Download the Base Language File**:
- Download the `en_US.lang` file from [here](https://github.com/smell-of-curry/pokebedrock-res/blob/main/texts/en_US.lang).
3. **Rename the File**:
- Rename the file based on your language using the file names listed in [language_names.json](https://github.com/smell-of-curry/pokebedrock-res/blob/main/texts/language_names.json). For example, `Português (Portugal)` would be `pt_PT`.
4. **Translate the Content**:
- Convert the text in the `en_US.lang` file to your desired language.
5. **Upload Your Translated File**:
- Go back to the [Texts Directory](https://github.com/smell-of-curry/pokebedrock-res/tree/main/texts) and click `Add File` -> `Upload Files`.
- Upload your translated file.
6. **Commit Your Changes**:
- Name your commit something descriptive, like "Added translation for Portuguese (Portugal)".
7. **Submit a Pull Request**:
- Submit a pull request with your changes.
### Advanced
If you have node installed, you can install dependencies by running
```
npm i
```
And then translate 25% of source strings using
```
npm run translate <language>
```
### Getting status of translation
Use
```
npm run translate <language> stat
```
=== Checking package.json for mcbe-ts-ui info ===
"archiver": "^6.0.0",
"dotenv": "^16.4.7",
"fs-extra": "^11.2.0",
"inquirer": "^10.1.7",
"lodash": "^4.17.21",
"mcbe-ts-ui": "^1.0.1",
"pokebedrock-showdown": "0.1.7",
"progress": "^2.0.3",
"sharp": "^0.33.5",
"ts-node": "^10.9.2",
"write-json-file": "^6.0.0"
=== Checking tsconfig.json ===
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": false,
"noImplicitOverride": false,
"noImplicitReturns": false,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": false,
"skipLibCheck": true,
"types": ["node"]
},
"include": ["scripts/**/*", "jest.config.ts"],
"exclude": ["node_modules", "scripts/tests"]
}
=== Checking _ui_defs.json and related files ===
{
"ui_defs": [
"ui/__generated__/phud/sidebar.json"
]
}{
"$transition_time_push_size": 0.0,
"$transition_time_pop_size": 0.0,
"$transition_time_push": 0.0,
"$transition_time_pop": 0.0,
"$container_transition_time_push": 0.0,
"$container_transition_time_pop": 0.0,
"$string_parser": "((('%.' + $var_size + 's') * (#string - (('%.' + ($var_size * $var_index) + 's') * #string))) - '|')"
}
</shell_result>
Script executed:
#!/bin/bash
# Check if there's a bin or cli in mcbe-ts-ui package info
echo "=== Checking for mcbe-ts-ui CLI/build tools ==="
grep -r "bin\|cli\|build" package.json 2>/dev/null | head -20
# Look for any scripts that might be building UIs
echo ""
echo "=== Searching for UI build/generation in all files ==="
find . -type f \( -name "*.md" -o -name "*.json" -o -name "*.ts" \) ! -path "./node_modules/*" ! -path "./.git/*" -exec grep -l "ui.*build\|generate.*ui\|mcbe-ts-ui.*build\|defineUI.*json" {} \; 2>/dev/null | head -20
# Check if there are any GitHub Actions or CI workflows that might build UIs
echo ""
echo "=== Checking for CI/build workflows ==="
find .github -type f 2>/dev/null | head -20
# Look at the actual PR description or recent commits to understand intent
echo ""
echo "=== Checking recent git log for UI-related commits ==="
git log --oneline --all -20 2>/dev/null | head -20Repository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Checking for mcbe-ts-ui CLI/build tools ===
"main": "scripts/build.ts",
"build": "npx ts-node --project tsconfig.json scripts/build.ts",
=== Searching for UI build/generation in all files ===
./scripts/ui/chestServerForm.ts
./package.json
=== Checking for CI/build workflows ===
.github/FUNDING.yml
.github/workflows/auto-issues.yml
.github/workflows/ci.yml
.github/workflows/issue.yml
.github/workflows/missing-report.yml
.github/workflows/model-preview.yml
.github/workflows/zip-pack.yml
=== Checking recent git log for UI-related commits ===
28183d68 extreme work
dbbe08fb v2.16.2
4ee10bd8 Update glaliemega.animation.json
e5e12c89 Fix Water Idling of pokemon
ab77908f fix lopunny animations
e23cb0c9 major cleanup here
2cf1e0f9 init (#672)
b0d91802 Remove Unneeded UI Definitions
b02fabb7 Support Custom Materials for Pokemon (#671)
8b69484f Improve robustness and type safety in scripts
40a0340b v2.16.1
647ac6f9 adding 9 models (#668)
3dc6d4dd v2.16.0
c761c28a Add even MORE skins (#666)
1afd0044 remove hub specific entries
3bab3df3 Add anabel
7b5857d3 Cleanup Skin Model Generation & Types
e28cfd1f v2.15.0
aaa1dde2 de and es lang updated, pokedex and geodex (#665)
08da6b3d Add 300+ new sounds & add generator
</shell_result>
Script executed:
#!/bin/bash
# Get the latest commit details
echo "=== Latest commit details ==="
git log -1 --name-status 2>/dev/null
echo ""
echo "=== Files changed in latest commit ==="
git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -i "ui\|_ui_defs" || echo "Could not get diff"
# Check what files exist currently related to UI
echo ""
echo "=== All UI-related files in repository ==="
find . -path "./node_modules" -prune -o -path "./.git" -prune -o -type f \( -name "*ui*" -o -path "*/ui/*" \) -print 2>/dev/null | grep -v node_modules | sort
# Look at the structure of what exists
echo ""
echo "=== Current state of ui/ directory ==="
find ui -type f -o -type d 2>/dev/null | sort
# Check if there's a __generated__ folder that needs to be created
echo ""
echo "=== Check for any generated folders ==="
find . -path "./node_modules" -prune -o -path "./.git" -prune -o -type d -name "__generated__" -print 2>/dev/nullRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== Latest commit details ===
commit 28183d68e6154264e9513e954b8a41e87a0b54b0
Author: Smell of curry <75345244+smell-of-curry@users.noreply.github.com>
Date: Wed Nov 26 15:02:00 2025 -0500
extreme work
A .gitattributes
A .github/FUNDING.yml
A .github/workflows/auto-issues.yml
A .github/workflows/ci.yml
A .github/workflows/issue.yml
A .github/workflows/missing-report.yml
A .github/workflows/model-preview.yml
A .github/workflows/zip-pack.yml
A .gitignore
A .husky/commit-msg
A .mcattributes
A .vscode/settings.json
A CHANGELOG.md
A LICENSE.md
A README.md
A animation_controllers/crate.json
A animation_controllers/fossil_analyzer.json
A animation_controllers/fossil_cleaner.json
A animation_controllers/gui.json
A animation_controllers/pokedex.json
A animation_controllers/pokemon.json
A animation_controllers/pokemon/clodsire.json
A animation_controllers/pokemon/comfey.json
A animation_controllers/pokemon/cubone.json
A animation_controllers/pokemon/flygon.json
A animation_controllers/pokemon/gardevoir.json
A animation_controllers/pokemon/genesect.json
A animation_controllers/pokemon/genesectburn.json
A animation_controllers/pokemon/genesectchill.json
A animation_controllers/pokemon/genesectdouse.json
A animation_controllers/pokemon/genesectshock.json
A animation_controllers/pokemon/golurk.json
A animation_controllers/pokemon/mamoswine.json
A animation_controllers/pokemon/scizor.json
A animation_controllers/pokemon/torterra.json
A animation_controllers/pokestop.json
A animation_controllers/trainer.json
A animations/anabel.animation.json
A animations/animation.pokemon.evolve.json
A animations/backpack.animation.json
A animations/ball.animation.json
A animations/battle_tower_npc.animation.json
A animations/crate.animations.json
A animations/data_monitor.animation.json
A animations/elfNpc.animation.json
A animations/fossil_analyzer.animation.json
A animations/fossil_cleaner.animation.json
A animations/fpr_tank.animation.json
A animations/gui.animation.json
A animations/hex_mania.animation.json
A animations/item_holder.animation.json
A animations/look_at_target.json
A animations/mega_ring.animation.json
A animations/mega_transformation.animation.json
A animations/move_tutor.animation.json
A animations/neuterer.animation.json
A animations/nurse_joy.animation.json
A animations/nursery_aide.animation.json
A animations/pokedex.animation.json
A animations/pokemon/abomasnowmega.animation.json
A animations/pokemon/abra.animation.json
A animations/pokemon/aerodactyl.animation.json
A animations/pokemon/aerodactylmega.animation.json
A animations/pokemon/aipom.animation.json
A animations/pokemon/alakazam.animation.json
A animations/pokemon/alakazammega.animation.json
A animations/pokemon/amaura.animation.json
A animations/pokemon/ambipom.animation.json
A animations/pokemon/ampharos.animation.json
A animations/pokemon/anorith.animation.json
A animations/pokemon/applin.animation.json
A animations/pokemon/arbok.animation.json
A animations/pokemon/arcanine.animation.json
A animations/pokemon/arceus.animation.json
A animations/pokemon/archen.animation.json
A animations/pokemon/archeops.animation.json
A animations/pokemon/arctovish.animation.json
A animations/pokemon/arctozolt.animation.json
A animations/pokemon/ariados.animation.json
A animations/pokemon/armaldo.animation.json
A animations/pokemon/armarouge.animation.json
A animations/pokemon/armarougechristmas.animation.json
A animations/pokemon/articuno.animation.json
A animations/pokemon/axew.animation.json
A animations/pokemon/azelf.animation.json
A animations/pokemon/azumarill.animation.json
A animations/pokemon/azurill.animation.json
A animations/pokemon/banettemega.animation.json
A animations/pokemon/bastiodon.animation.json
A animations/pokemon/bayleef.animation.json
A animations/pokemon/beedrill.animation.json
A animations/pokemon/beldum.animation.json
A animations/pokemon/bellossom.animation.json
A animations/pokemon/bellsprout.animation.json
A animations/pokemon/bibarel.animation.json
A animations/pokemon/bidoof.animation.json
A animations/pokemon/blastoise.animation.json
A animations/pokemon/blaziken.animation.json
A animations/pokemon/blazikenmega.animation.json
A animations/pokemon/boldore.animation.json
A animations/pokemon/braixen.animation.json
A animations/pokemon/breloom.animation.json
A animations/pokemon/brionne.animation.json
A animations/pokemon/buizel.animation.json
A animations/pokemon/bulbasaur.animation.json
A animations/pokemon/buneary.animation.json
A animations/pokemon/burmy.animation.json
A animations/pokemon/butterfree.animation.json
A animations/pokemon/cameruptmega.animation.json
A animations/pokemon/carracosta.animation.json
A animations/pokemon/carvanha.animation.json
A animations/pokemon/caterpie.animation.json
A animations/pokemon/celebi.animation.json
A animations/pokemon/celebi_halloween.animation.json
A animations/pokemon/celebihalloween.animation.json
A animations/pokemon/ceruledge.animation.json
A animations/pokemon/ceruledgehalloween.animation.json
A animations/pokemon/chansey.animation.json
A animations/pokemon/charcadet.animation.json
A animations/pokemon/charizard.animation.json
A animations/pokemon/charmander.animation.json
A animations/pokemon/charmeleon.animation.json
A animations/pokemon/chesnaught.animation.json
A animations/pokemon/chespin.animation.json
A animations/pokemon/chi_yu.animation.json
A animations/pokemon/chienpao.animation.json
A animations/pokemon/chikorita.animation.json
A animations/pokemon/chimchar.animation.json
A animations/pokemon/chinchou.animation.json
A animations/pokemon/chiyu.animation.json
A animations/pokemon/cinccino.animation.json
A animations/pokemon/cinderace.animation.json
A animations/pokemon/clefable.animation.json
A animations/pokemon/clefairy.animation.json
A animations/pokemon/cleffa.animation.json
A animations/pokemon/clodsire.animation.json
A animations/pokemon/clodsire_stpatrick.animation.json
A animations/pokemon/cloyster.animation.json
A animations/pokemon/combusken.animation.json
A animations/pokemon/comfey.animation.json
A animations/pokemon/comfey_christmas.animation.json
A animations/pokemon/comfeychristmas.animation.json
A animations/pokemon/corsola.animation.json
A animations/pokemon/corsolagalar.animation.json
A animations/pokemon/cosmog.animation.json
A animations/pokemon/cradily.animation.json
A animations/pokemon/cranidos.animation.json
A animations/pokemon/cresselia.animation.json
A animations/pokemon/crobat.animation.json
A animations/pokemon/crocalor.animation.json
A animations/pokemon/croconaw.animation.json
A animations/pokemon/cubone.animation.json
A animations/pokemon/cubone_independence.animation.json
A animations/pokemon/cutiefly.animation.json
A animations/pokemon/cyndaquil.animation.json
A animations/pokemon/darkrai.animation.json
A animations/pokemon/darkraihalloween.animation.json
A animations/pokemon/darmanitan.animation.json
A animations/pokemon/darmanitangalar.animation.json
A animations/pokemon/darmanitangalarzen.animation.json
A animations/pokemon/darmanitanzen.animation.json
A animations/pokemon/dartrix.animation.json
A animations/pokemon/darumaka.animation.json
A animations/pokemon/darumakagalar.animation.json
A animations/pokemon/decidueye.animation.json
A animations/pokemon/decidueyehisui.animation.json
A animations/pokemon/deino.animation.json
A animations/pokemon/delibird.animation.json
A animations/pokemon/delphox.animation.json
A animations/pokemon/dewgong.animation.json
A animations/pokemon/dewott.animation.json
A animations/pokemon/dialga.animation.json
A animations/pokemon/diancie.animation.json
A animations/pokemon/diglett.animation.json
A animations/pokemon/ditto.animation.json
A animations/pokemon/dodrio.animation.json
A animations/pokemon/doduo.animation.json
A animations/pokemon/donphan.animation.json
A animations/pokemon/dracovish.animation.json
A animations/pokemon/dracozolt.animation.json
A animations/pokemon/dragonair.animation.json
A animations/pokemon/dragonite.animation.json
A animations/pokemon/dratini.animation.json
A animations/pokemon/drilbur.animation.json
A animations/pokemon/drizzile.animation.json
A animations/pokemon/drowzee.animation.json
A animations/pokemon/dugtrio.animation.json
A animations/pokemon/eevee.animation.json
A animations/pokemon/ekans.animation.json
A animations/pokemon/electabuzz.animation.json
A animations/pokemon/electrode.animation.json
A animations/pokemon/elekid.animation.json
A animations/pokemon/emboar.animation.json
A animations/pokemon/emolga.animation.json
A animations/pokemon/empoleon.animation.json
A animations/pokemon/entei.animation.json
A animations/pokemon/espeon.animation.json
A animations/pokemon/espurr.animation.json
A animations/pokemon/excadrill.animation.json
A animations/pokemon/exeggcute.animation.json
A animations/pokemon/exeggutor.animation.json
A animations/pokemon/farfetchd.animation.json
A animations/pokemon/fearow.animation.json
A animations/pokemon/fennekin.animation.json
A animations/pokemon/feraligatr.animation.json
A animations/pokemon/finizen.animation.json
A animations/pokemon/flaaffy.animation.json
A animations/pokemon/flareon.animation.json
A animations/pokemon/floatzel.animation.json
A animations/pokemon/floetteeternal.animation.json
A animations/pokemon/floragato.animation.json
A animations/pokemon/flygon.animation.json
A animations/pokemon/flygon_fly.animation.json
A animations/pokemon/forretress.animation.json
A animations/pokemon/fraxure.animation.json
A animations/pokemon/froakie.animation.json
A animations/pokemon/frogadier.animation.json
A animations/pokemon/fuecoco.animation.json
A animations/pokemon/furret.animation.json
A animations/pokemon/gabite.animation.json
A animations/pokemon/gallade.animation.json
A animations/pokemon/galladechristmas.animation.json
A animations/pokemon/galladechristmasmega.animation.json
A animations/pokemon/gallademega.animation.json
A animations/pokemon/galvantula.animation.json
A animations/pokemon/garbodor.animation.json
A animations/pokemon/garbodorhalloween.animation.json
A animations/pokemon/garchomp.animation.json
A animations/pokemon/garchomphalloween.animation.json
A animations/pokemon/garchomphalloweenmega.animation.json
A animations/pokemon/garchompmega.animation.json
A animations/pokemon/gardevoir.animation.json
A animations/pokemon/gardevoir_christmas.animation.json
A animations/pokemon/gardevoirmega.animation.json
A animations/pokemon/garganacl.animation.json
A animations/pokemon/gastly.animation.json
A animations/pokemon/genesect.animation.json
A animations/pokemon/genesect_beru.animation.json
A animations/pokemon/genesect_teamplasma.animation.json
A animations/pokemon/genesectburn.animation.json
A animations/pokemon/genesectburn_beru.animation.json
A animations/pokemon/genesectburn_teamplasma.animation.json
A animations/pokemon/genesectchill.animation.json
A animations/pokemon/genesectchill_beru.animation.json
A animations/pokemon/genesectchill_teamplasma.animation.json
A animations/pokemon/genesectdouse.animation.json
A animations/pokemon/genesectdouse_beru.animation.json
A animations/pokemon/genesectdouse_teamplasma.animation.json
A animations/pokemon/genesectshock.animation.json
A animations/pokemon/genesectshock_beru.animation.json
A animations/pokemon/genesectshock_teamplasma.animation.json
A animations/pokemon/gengar.animation.json
A animations/pokemon/gengarmega.animation.json
A animations/pokemon/geodude.animation.json
A animations/pokemon/gible.animation.json
A animations/pokemon/gigalith.animation.json
A animations/pokemon/girafarig.animation.json
A animations/pokemon/giratina.animation.json
A animations/pokemon/glaceon.animation.json
A animations/pokemon/glaliemega.animation.json
A animations/pokemon/gligar.animation.json
A animations/pokemon/gloom.animation.json
A animations/pokemon/golbat.animation.json
A animations/pokemon/goldeen.animation.json
A animations/pokemon/golduck.animation.json
A animations/pokemon/golem.animation.json
A animations/pokemon/golett.animation.json
A animations/pokemon/goletthalloween.animation.json
A animations/pokemon/golurk.animation.json
A animations/pokemon/golurk_fullmetal.animation.json
A animations/pokemon/golurk_halloween.animation.json
A animations/pokemon/golurkhalloween.animation.json
A animations/pokemon/granbull.animation.json
A animations/pokemon/graveler.animation.json
A animations/pokemon/greninja.animation.json
A animations/pokemon/greninjaash.animation.json
A animations/pokemon/grookey.animation.json
A animations/pokemon/grotle.animation.json
A animations/pokemon/groudon.animation.json
A animations/pokemon/grovyle.animation.json
A animations/pokemon/growlithe.animation.json
A animations/pokemon/gyarados.animation.json
A animations/pokemon/gyaradosmega.animation.json
A animations/pokemon/hatenna.animation.json
A animations/pokemon/hatterene.animation.json
A animations/pokemon/hatterenegmax.animation.json
A animations/pokemon/hattrem.animation.json
A animations/pokemon/haunter.animation.json
A animations/pokemon/haxorus.animation.json
A animations/pokemon/heatran.animation.json
A animations/pokemon/heracross.animation.json
A animations/pokemon/heracrossmega.animation.json
A animations/pokemon/hisuian_typhlosion.animation.json
A animations/pokemon/hitmonchan.animation.json
A animations/pokemon/hitmonlee.animation.json
A animations/pokemon/hitmontop.animation.json
A animations/pokemon/honchkrow.animation.json
A animations/pokemon/hooh.animation.json
A animations/pokemon/hoopa.animation.json
A animations/pokemon/hoothoot.animation.json
A animations/pokemon/hoppip.animation.json
A animations/pokemon/horsea.animation.json
A animations/pokemon/houndoom.animation.json
A animations/pokemon/houndoommega.animation.json
A animations/pokemon/houndour.animation.json
A animations/pokemon/hydreigon.animation.json
A animations/pokemon/hypno.animation.json
A animations/pokemon/igglybuff.animation.json
A animations/pokemon/incineroar.animation.json
A animations/pokemon/infernape.animation.json
A animations/pokemon/inteleon.animation.json
A animations/pokemon/ironbundle.animation.json
A animations/pokemon/ironmoth.animation.json
A animations/pokemon/ironvaliant.animation.json
A animations/pokemon/ivysaur.animation.json
A animations/pokemon/jigglypuff.animation.json
A animations/pokemon/jirachi.animation.json
A animations/pokemon/jolteon.animation.json
A animations/pokemon/joltik.animation.json
A animations/pokemon/jumpluff.animation.json
A animations/pokemon/jynx.animation.json
A animations/pokemon/kabuto.animation.json
A animations/pokemon/kabutops.animation.json
A animations/pokemon/kadabra.animation.json
A animations/pokemon/kakuna.animation.json
A animations/pokemon/kangaskhan.animation.json
A animations/pokemon/kartana.animation.json
A animations/pokemon/kingdra.animation.json
A animations/pokemon/kingler.animation.json
A animations/pokemon/kirlia.animation.json
A animations/pokemon/koffing.animation.json
A animations/pokemon/koraidon.animation.json
A animations/pokemon/krabby.animation.json
A animations/pokemon/krokorok.animation.json
A animations/pokemon/krookodile.animation.json
A animations/pokemon/kubfu.animation.json
A animations/pokemon/kyogre.animation.json
A animations/pokemon/lanturn.animation.json
A animations/pokemon/lapras.animation.json
A animations/pokemon/larvesta.animation.json
A animations/pokemon/larvitar.animation.json
A animations/pokemon/latias.animation.json
A animations/pokemon/latiasmega.animation.json
A animations/pokemon/latios.animation.json
A animations/pokemon/latiosmega.animation.json
A animations/pokemon/leafeon.animation.json
A animations/pokemon/leavanny.animation.json
A animations/pokemon/lechonk.animation.json
A animations/pokemon/ledian.animation.json
A animations/pokemon/ledyba.animation.json
A animations/pokemon/lickitung.animation.json
A animations/pokemon/liepard.animation.json
A animations/pokemon/lileep.animation.json
A animations/pokemon/linoone.animation.json
A animations/pokemon/litten.animation.json
A animations/pokemon/lopunny.animation.json
A animations/pokemon/lopunnymega.animation.json
A animations/pokemon/lucario.animation.json
A animations/pokemon/lucariomega.animation.json
A animations/pokemon/lugia.animation.json
A animations/pokemon/lugia_shadow.animation.json
A animations/pokemon/lunala.animation.json
A animations/pokemon/lunatone.animation.json
A animations/pokemon/luxio.animation.json
A animations/pokemon/luxray.animation.json
A animations/pokemon/machamp.animation.json
A animations/pokemon/machoke.animation.json
A animations/pokemon/machop.animation.json
A animations/pokemon/magby.animation.json
A animations/pokemon/magcargo.animation.json
A animations/pokemon/magikarp.animation.json
A animations/pokemon/magmar.animation.json
A animations/pokemon/magnemite.animation.json
A animations/pokemon/magneton.animation.json
A animations/pokemon/magnezone.animation.json
A animations/pokemon/mamoswine.animation.json
A animations/pokemon/mamoswine_appa.animation.json
A animations/pokemon/manaphy.animation.json
A animations/pokemon/mankey.animation.json
A animations/pokemon/mantine.animation.json
A animations/pokemon/mantyke.animation.json
A animations/pokemon/mareanie.animation.json
A animations/pokemon/mareep.animation.json
A animations/pokemon/marill.animation.json
A animations/pokemon/marowak.animation.json
A animations/pokemon/marowakalola.animation.json
A animations/pokemon/marshadow.animation.json
A animations/pokemon/marshtomp.animation.json
A animations/pokemon/maushold.animation.json
A animations/pokemon/mausholdfour.animation.json
A animations/pokemon/mawilemega.animation.json
A animations/pokemon/meganium.animation.json
A animations/pokemon/meloetta.animation.json
A animations/pokemon/meloettapirouette.animation.json
A animations/pokemon/meowscarada.animation.json
A animations/pokemon/meowstic.animation.json
A animations/pokemon/meowsticf.animation.json
A animations/pokemon/meowth.animation.json
A animations/pokemon/mesprit.animation.json
A animations/pokemon/metagross.animation.json
A animations/pokemon/metagrossmega.animation.json
A animations/pokemon/metang.animation.json
A animations/pokemon/metapod.animation.json
A animations/pokemon/mew.animation.json
A animations/pokemon/mewchristmas.animation.json
A animations/pokemon/mewtwo.animation.json
A animations/pokemon/mewtwomegax.animation.json
A animations/pokemon/mewtwomegay.animation.json
A animations/pokemon/miltank.animation.json
A animations/pokemon/mimejr.animation.json
A animations/pokemon/mimikyu.animation.json
A animations/pokemon/mimikyubusted.animation.json
A animations/pokemon/mimikyubustedtotem.animation.json
A animations/pokemon/mimikyutotem.animation.json
A animations/pokemon/minccino.animation.json
A animations/pokemon/miraidon.animation.json
A animations/pokemon/misdreavus.animation.json
A animations/pokemon/moltres.animation.json
A animations/pokemon/monferno.animation.json
A animations/pokemon/mothim.animation.json
A animations/pokemon/mrmime.animation.json
A animations/pokemon/mrmimegalar.animation.json
A animations/pokemon/mrrime.animation.json
A animations/pokemon/mudkip.animation.json
A animations/pokemon/munchlax.animation.json
A animations/pokemon/munkidori.animation.json
A animations/pokemon/murkrow.animation.json
A animations/pokemon/nacli.animation.json
A animations/pokemon/naclstack.animation.json
A animations/pokemon/naganadel.animation.json
A animations/pokemon/natu.animation.json
A animations/pokemon/nidoking.animation.json
A animations/pokemon/nidoqueen.animation.json
A animations/pokemon/nidoranf.animation.json
A animations/pokemon/nidoranm.animation.json
A animations/pokemon/nidorina.animation.json
A animations/pokemon/nidorino.animation.json
A animations/pokemon/ninetales.animation.json
A animations/pokemon/ninetalesalola.animation.json
A animations/pokemon/noctowl.animation.json
A animations/pokemon/nuzleaf.animation.json
A animations/pokemon/octillery.animation.json
A animations/pokemon/oddish.animation.json
A animations/pokemon/oinkologne.animation.json
A animations/pokemon/oinkolognef.animation.json
A animations/pokemon/omanyte.animation.json
A animations/pokemon/omastar.animation.json
A animations/pokemon/onix.animation.json
A animations/pokemon/oricorio.animation.json
A animations/pokemon/oshawott.animation.json
A animations/pokemon/pachirisu.animation.json
A animations/pokemon/palafin.animation.json
A animations/pokemon/palafinhero.animation.json
A animations/pokemon/palkia.animation.json
A animations/pokemon/pansage.animation.json
A animations/pokemon/paras.animation.json
A animations/pokemon/parasect.animation.json
A animations/pokemon/patrat.animation.json
A animations/pokemon/pawmi.animation.json
A animations/pokemon/pawmo.animation.json
A animations/pokemon/pawmot.animation.json
A animations/pokemon/pelipper.animation.json
A animations/pokemon/persian.animation.json
A animations/pokemon/petilil.animation.json
A animations/pokemon/phanpy.animation.json
A animations/pokemon/pichu.animation.json
A animations/pokemon/pichuspikyeared.animation.json
A animations/pokemon/pidgeot.animation.json
A animations/pokemon/pidgeotmega.animation.json
A animations/pokemon/pidgeotto.animation.json
A animations/pokemon/pidgey.animation.json
A animations/pokemon/pignite.animation.json
A animations/pokemon/pikachu.animation.json
A animations/pokemon/pikachualola.animation.json
A animations/pokemon/pikachubelle.animation.json
A animations/pokemon/pikachuhoenn.animation.json
A animations/pokemon/pikachulibre.animation.json
A animations/pokemon/pikachuoriginal.animation.json
A animations/pokemon/pikachuphd.animation.json
A animations/pokemon/pikachupopstar.animation.json
A animations/pokemon/pikachurockstar.animation.json
A animations/pokemon/pikipek.animation.json
A animations/pokemon/piloswine.animation.json
A animations/pokemon/pineco.animation.json
A animations/pokemon/pinsir.animation.json
A animations/pokemon/piplup.animation.json
A animations/pokemon/poipole.animation.json
A animations/pokemon/politoed.animation.json
A animations/pokemon/poliwag.animation.json
A animations/pokemon/poliwhirl.animation.json
A animations/pokemon/poliwrath.animation.json
A animations/pokemon/ponyta.animation.json
A animations/pokemon/popplio.animation.json
A animations/pokemon/porygon.animation.json
A animations/pokemon/porygon2.animation.json
A animations/pokemon/porygonz.animation.json
A animations/pokemon/primarina.animation.json
A animations/pokemon/primeape.animation.json
A animations/pokemon/prinplup.animation.json
A animations/pokemon/psyduck.animation.json
A animations/pokemon/pupitar.animation.json
A animations/pokemon/purrloin.animation.json
A animations/pokemon/quagsire.animation.json
A animations/pokemon/quaquaval.animation.json
A animations/pokemon/quaxly.animation.json
A animations/pokemon/quaxwell.animation.json
A animations/pokemon/quilava.animation.json
A animations/pokemon/quilladin.animation.json
A animations/pokemon/qwilfish.animation.json
A animations/pokemon/qwilfishhisui.animation.json
A animations/pokemon/raboot.animation.json
A animations/pokemon/raichu.animation.json
A animations/pokemon/raichualola.animation.json
A animations/pokemon/raikou.animation.json
A animations/pokemon/ralts.animation.json
A animations/pokemon/rapidash.animation.json
A animations/pokemon/raticate.animation.json
A animations/pokemon/raticatealola.animation.json
A animations/pokemon/rattata.animation.json
A animations/pokemon/rattataalola.animation.json
A animations/pokemon/rayquaza.animation.json
A animations/pokemon/rayquazamega.animation.json
A animations/pokemon/regice.animation.json
A animations/pokemon/regigigas.animation.json
A animations/pokemon/regirock.animation.json
A animations/pokemon/registeel.animation.json
A animations/pokemon/remoraid.animation.json
A animations/pokemon/reshiram.animation.json
A animations/pokemon/rillaboom.animation.json
A animations/pokemon/riolu.animation.json
A animations/pokemon/roaringmoon.animation.json
A animations/pokemon/rockruff.animation.json
A animations/pokemon/roggenrola.animation.json
A animations/pokemon/rowlet.animation.json
A animations/pokemon/sableye.animation.json
A animations/pokemon/sableyemega.animation.json
A animations/pokemon/salamencemega.animation.json
A animations/pokemon/samurott.animation.json
A animations/pokemon/sandile.animation.json
A animations/pokemon/sandshrew.animation.json
A animations/pokemon/sandshrewhalloween.animation.json
A animations/pokemon/sandslash.animation.json
A animations/pokemon/sandslashhalloween.animation.json
A animations/pokemon/scatterbug.animation.json
A animations/pokemon/sceptile.animation.json
A animations/pokemon/sceptilemega.animation.json
A animations/pokemon/scizor.animation.json
A animations/pokemon/scizor_ranger.animation.json
A animations/pokemon/scizormega.animation.json
A animations/pokemon/scorbunny.animation.json
A animations/pokemon/scyther.animation.json
A animations/pokemon/seadra.animation.json
A animations/pokemon/seaking.animation.json
A animations/pokemon/seedot.animation.json
A animations/pokemon/seel.animation.json
A animations/pokemon/sentret.animation.json
A animations/pokemon/serperior.animation.json
A animations/pokemon/servine.animation.json
A animations/pokemon/sewaddle.animation.json
A animations/pokemon/sharpedo.animation.json
A animations/pokemon/sharpedomega.animation.json
A animations/pokemon/shaymin.animation.json
A animations/pokemon/shellder.animation.json
A animations/pokemon/shieldon.animation.json
A animations/pokemon/shiftry.animation.json
A animations/pokemon/shinx.animation.json
A animations/pokemon/shroomish.animation.json
A animations/pokemon/shuckle.animation.json
A animations/pokemon/simisage.animation.json
A animations/pokemon/skarmory.animation.json
A animations/pokemon/skeledirge.animation.json
A animations/pokemon/skiploom.animation.json
A animations/pokemon/slakoth.animation.json
A animations/pokemon/slitherwing.animation.json
A animations/pokemon/slowbro.animation.json
A animations/pokemon/slowking.animation.json
A animations/pokemon/slowpoke.animation.json
A animations/pokemon/slugma.animation.json
A animations/pokemon/smeargle.animation.json
A animations/pokemon/smoochum.animation.json
A animations/pokemon/sneasel.animation.json
A animations/pokemon/snivy.animation.json
A animations/pokemon/snorlax.animation.json
A animations/pokemon/snubbull.animation.json
A animations/pokemon/sobble.animation.json
A animations/pokemon/solrock.animation.json
A animations/pokemon/spearow.animation.json
A animations/pokemon/spewpa.animation.json
A animations/pokemon/spheal.animation.json
A animations/pokemon/spinarak.animation.json
A animations/pokemon/spinda.animation.json
A animations/pokemon/spiritomb.animation.json
A animations/pokemon/sprigatito.animation.json
A animations/pokemon/squirtle.animation.json
A animations/pokemon/stantler.animation.json
A animations/pokemon/starmie.animation.json
A animations/pokemon/staryu.animation.json
A animations/pokemon/steelix.animation.json
A animations/pokemon/sudowoodo.animation.json
A animations/pokemon/suicune.animation.json
A animations/pokemon/sunflora.animation.json
A animations/pokemon/sunkern.animation.json
A animations/pokemon/swadloon.animation.json
A animations/pokemon/swampert.animation.json
A animations/pokemon/swellow.animation.json
A animations/pokemon/swinub.animation.json
A animations/pokemon/swoobat.animation.json
A animations/pokemon/sylveon.animation.json
A animations/pokemon/taillow.animation.json
A animations/pokemon/tandemaus.animation.json
A animations/pokemon/tangela.animation.json
A animations/pokemon/tapukoko.animation.json
A animations/pokemon/tauros.animation.json
A animations/pokemon/teddiursa.animation.json
A animations/pokemon/tentacool.animation.json
A animations/pokemon/tentacruel.animation.json
A animations/pokemon/tepig.animation.json
A animations/pokemon/terapagos.animation.json
A animations/pokemon/terrakion.animation.json
A animations/pokemon/thwackey.animation.json
A animations/pokemon/tinkatink.animation.json
A animations/pokemon/tinkaton.animation.json
A animations/pokemon/tinkatonchristmas.animation.json
A animations/pokemon/tinkatuff.animation.json
A animations/pokemon/tirtouga.animation.json
A animations/pokemon/toedscool.animation.json
A animations/pokemon/toedscruel.animation.json
A animations/pokemon/togedemaru.animation.json
A animations/pokemon/togepi.animation.json
A animations/pokemon/togetic.animation.json
A animations/pokemon/torchic.animation.json
A animations/pokemon/torracat.animation.json
A animations/pokemon/torterra.animation.json
A animations/pokemon/torterra_stpatrick.animation.json
A animations/pokemon/totodile.animation.json
A animations/pokemon/toucannon.animation.json
A animations/pokemon/toxapex.animation.json
A animations/pokemon/trapinch.animation.json
A animations/pokemon/treecko.animation.json
A animations/pokemon/trubbish.animation.json
A animations/pokemon/trubbishhalloween.animation.json
A animations/pokemon/trumbeak.animation.json
A animations/pokemon/turtwig.animation.json
A animations/pokemon/typhlosion.animation.json
A animations/pokemon/typhlosionhisui.animation.json
A animations/pokemon/tyranitar.animation.json
A animations/pokemon/tyrantrum.animation.json
A animations/pokemon/tyrogue.animation.json
A animations/pokemon/tyrunt.animation.json
A animations/pokemon/umbreon.animation.json
A animations/pokemon/ursaring.animation.json
A animations/pokemon/urshifu.animation.json
A animations/pokemon/urshifurapidstrike.animation.json
A animations/pokemon/uxie.animation.json
A animations/pokemon/vaporeon.animation.json
A animations/pokemon/venomoth.animation.json
A animations/pokemon/venonat.animation.json
A animations/pokemon/venusaur.animation.json
A animations/pokemon/vibrava.animation.json
A animations/pokemon/victini.animation.json
A animations/pokemon/victreebel.animation.json
A animations/pokemon/vigoroth.animation.json
A animations/pokemon/vileplume.animation.json
A animations/pokemon/vivillon.animation.json
A animations/pokemon/vivillonfancy.animation.json
A animations/pokemon/vivillonpokeball.animation.json
A animations/pokemon/volcarona.animation.json
A animations/pokemon/voltorb.animation.json
A animations/pokemon/vulpix.animation.json
A animations/pokemon/vulpixalola.animation.json
A animations/pokemon/wailmer.animation.json
A animations/pokemon/wailord.animation.json
A animations/pokemon/walkingwake.animation.json
A animations/pokemon/wartortle.animation.json
A animations/pokemon/watchog.animation.json
A animations/pokemon/weedle.animation.json
A animations/pokemon/weepinbell.animation.json
A animations/pokemon/weezing.animation.json
A animations/pokemon/wigglytuff.animation.json
A animations/pokemon/wingull.animation.json
A animations/pokemon/wobbuffet.animation.json
A animations/pokemon/woobat.animation.json
A animations/pokemon/wooper.animation.json
A animations/pokemon/wooperpaldea.animation.json
A animations/pokemon/wormadam.animation.json
A animations/pokemon/wormadamsandy.animation.json
A animations/pokemon/wormadamtrash.animation.json
A animations/pokemon/xatu.animation.json
A animations/pokemon/xerneas.animation.json
A animations/pokemon/xerneasneutral.animation.json
A animations/pokemon/xurkitree.animation.json
A animations/pokemon/yveltal.animation.json
A animations/pokemon/zapdos.animation.json
A animations/pokemon/zekrom.animation.json
A animations/pokemon/zeraora.animation.json
A animations/pokemon/zigzagoon.animation.json
A animations/pokemon/zoroark.animation.json
A animations/pokemon/zoroarkhalloween.animation.json
A animations/pokemon/zorua.animation.json
A animations/pokemon/zoruahalloween.animation.json
A animations/pokemon/zubat.animation.json
A animations/pokemon/zweilous.animation.json
A animations/pokestop.animation.json
A animations/professor_oak.animation.json
A animations/santa.animation.json
A animations/server_npc.animation.json
A animations/stpatrick_npc.animation.json
A animations/trainers/bugElite4.animation.json
A animations/trainers/darkLeader.animation.json
A animations/trainers/dragonElite4.animation.json
A animations/trainers/electricElite4.animation.json
A animations/trainers/fairyElite4.animation.json
A animations/trainers/fireLeader.animation.json
A animations/trainers/grassLeader.animation.json
A animations/trainers/groundLeader.animation.json
A animations/trainers/normalLeader.animation.json
A animations/trainers/poisonLeader.animation.json
A animations/trainers/steelLeader.animation.json
A animations/trainers/stpatrick.animation.json
A animations/trainers/waterLeader.animation.json
A animations/valentine_npc.animation.json
A attachables/armor/aluminum_boots.json
A attachables/armor/aluminum_chestplate.json
A attachables/armor/aluminum_helmet.json
A attachables/armor/aluminum_leggings.json
A attachables/armor/dawn_stone_boots.json
A attachables/armor/dawn_stone_chestplate.json
A attachables/armor/dawn_stone_helmet.json
A attachables/armor/dawn_stone_leggings.json
A attachables/armor/dusk_stone_boots.json
A attachables/armor/dusk_stone_chestplate.json
A attachables/armor/dusk_stone_helmet.json
A attachables/armor/dusk_stone_leggings.json
A attachables/armor/fire_stone_boots.json
A attachables/armor/fire_stone_chestplate.json
A attachables/armor/fire_stone_helmet.json
A attachables/armor/fire_stone_leggings.json
A attachables/armor/leaf_stone_boots.json
A attachables/armor/leaf_stone_chestplate.json
A attachables/armor/leaf_stone_helmet.json
A attachables/armor/leaf_stone_leggings.json
A attachables/armor/moon_stone_boots.json
A attachables/armor/moon_stone_chestplate.json
A attachables/armor/moon_stone_helmet.json
A attachables/armor/moon_stone_leggings.json
A attachables/armor/new_running_boots.json
A attachables/armor/old_running_boots.json
A attachables/armor/sun_stone_boots.json
A attachables/armor/sun_stone_chestplate.json
A attachables/armor/sun_stone_helmet.json
A attachables/armor/sun_stone_leggings.json
A attachables/armor/thunder_stone_boots.json
A attachables/armor/thunder_stone_chestplate.json
A attachables/armor/thunder_stone_helmet.json
A attachables/armor/thunder_stone_leggings.json
A attachables/armor/water_stone_boots.json
A attachables/armor/water_stone_chestplate.json
A attachables/armor/water_stone_helmet.json
A attachables/armor/water_stone_leggings.json
A attachables/balls/beast.json
A attachables/balls/cherish.json
A attachables/balls/dive.json
A attachables/balls/dream.json
A attachables/balls/dusk.json
A attachables/balls/fast.json
A attachables/balls/friend.json
A attachables/balls/great.json
A attachables/balls/gs.json
A attachables/balls/heal.json
A attachables/balls/heavy.json
A attachables/balls/level.json
A attachables/balls/love.json
A attachables/balls/lure.json
A attachables/balls/lux.json
A attachables/balls/luxury.json
A attachables/balls/master.json
A attachables/balls/moon.json
A attachables/balls/nest.json
A attachables/balls/net.json
A attachables/balls/park.json
A attachables/balls/poke.json
A attachables/balls/premier.json
A attachables/balls/quick.json
A attachables/balls/repeat.json
A attachables/balls/safari.json
A attachables/balls/sport.json
A attachables/balls/timer.json
A attachables/balls/ultra.json
A attachables/gui.attachable.json
A attachables/gui.json
A attachables/held_backpack.json
A attachables/held_pokeball.json
A attachables/mega_ring.json
A attachables/pokedex/black.json
A attachables/pokedex/blue.json
A attachables/pokedex/brown.json
A attachables/pokedex/cyan.json
A attachables/pokedex/gray.json
A attachables/pokedex/green.json
A attachables/pokedex/light_blue.json
A attachables/pokedex/light_gray.json
A attachables/pokedex/lime.json
A attachables/pokedex/magenta.json
A attachables/pokedex/orange.json
A attachables/pokedex/pink.json
A attachables/pokedex/purple.json
A attachables/pokedex/rainbow.json
A attachables/pokedex/red.json
A attachables/pokedex/white.json
A attachables/pokedex/yellow.json
A blocks.json
A entity/anabel.json
A entity/ball.json
A entity/ball_catch.json
A entity/crate.json
A entity/data_monitor.json
A entity/eliteFour/ashcroft.json
A entity/eliteFour/jeice.json
A entity/eliteFour/vanita.json
A entity/eliteFour/yukimara.json
A entity/floating_text.json
A entity/fossil_analyzer.json
A entity/fossil_cleaner.json
A entity/fpr_tank.json
A entity/fpr_tank_water.json
A entity/hex_mania.json
A entity/ice_cube.json
A entity/item_holder.json
A entity/mega_transformation.json
A entity/move_tutor.json
A entity/neuterer.json
A entity/nurse_joy.json
A entity/nursery_aide.json
A entity/pokemon/abomasnow.entity.json
A entity/pokemon/abomasnowmega.entity.json
A entity/pokemon/abra.entity.json
A entity/pokemon/absol.entity.json
A entity/pokemon/absolmega.entity.json
A entity/pokemon/accelgor.entity.json
A entity/pokemon/aegislash.entity.json
A entity/pokemon/aegislashblade.entity.json
A entity/pokemon/aerodactyl.entity.json
A entity/pokemon/aerodactylmega.entity.json
A entity/pokemon/aggron.entity.json
A entity/pokemon/aggronmega.entity.json
A entity/pokemon/aipom.entity.json
A entity/pokemon/alakazam.entity.json
A entity/pokemon/alakazammega.entity.json
A entity/pokemon/alcremie.entity.json
A entity/pokemon/alcremiegmax.entity.json
A entity/pokemon/alomomola.entity.json
A entity/pokemon/altaria.entity.json
A entity/pokemon/altariamega.entity.json
A entity/pokemon/amaura.entity.json
A entity/pokemon/ambipom.entity.json
A entity/pokemon/amoonguss.entity.json
A entity/pokemon/ampharos.entity.json
A entity/pokemon/ampharosmega.entity.json
A entity/pokemon/annihilape.entity.json
A entity/pokemon/anorith.entity.json
A entity/pokemon/appletun.entity.json
A entity/pokemon/appletungmax.entity.json
A entity/pokemon/applin.entity.json
A entity/pokemon/araquanid.entity.json
A entity/pokemon/araquanidtotem.entity.json
A entity/pokemon/arbok.entity.json
A entity/pokemon/arboliva.entity.json
A entity/pokemon/arcanine.entity.json
A entity/pokemon/arcaninehisui.entity.json
A entity/pokemon/arceus.entity.json
A entity/pokemon/arceusbug.entity.json
A entity/pokemon/arceusdark.entity.json
A entity/pokemon/arceusdragon.entity.json
A entity/pokemon/arceuselectric.entity.json
A entity/pokemon/arceusfairy.entity.json
A entity/pokemon/arceusfighting.entity.json
A entity/pokemon/arceusfire.entity.json
A entity/pokemon/arceusflying.entity.json
A entity/pokemon/arceusghost.entity.json
A entity/pokemon/arceusgrass.entity.json
A entity/pokemon/arceusground.entity.json
A entity/pokemon/arceusice.entity.json
A entity/pokemon/arceuspoison.entity.json
A entity/pokemon/arceuspsychic.entity.json
A entity/pokemon/arceusrock.entity.json
A entity/pokemon/arceussteel.entity.json
A entity/pokemon/arceuswater.entity.json
A entity/pokemon/archaludon.entity.json
A entity/pokemon/archen.entity.json
A entity/pokemon/archeops.entity.json
A entity/pokemon/arctibax.entity.json
A entity/pokemon/arctovish.entity.json
A entity/pokemon/arctozolt.entity.json
A entity/pokemon/ariados.entity.json
A entity/pokemon/armaldo.entity.json
A entity/pokemon/armarouge.entity.json
A entity/pokemon/aromatisse.entity.json
A entity/pokemon/aron.entity.json
A entity/pokemon/arrokuda.entity.json
A entity/pokemon/articuno.entity.json
A entity/pokemon/articunogalar.entity.json
A entity/pokemon/audino.entity.json
A entity/pokemon/audinomega.entity.json
A entity/pokemon/aurorus.entity.json
A entity/pokemon/avalugg.entity.json
A entity/pokemon/avalugghisui.entity.json
A entity/pokemon/axew.entity.json
A entity/pokemon/azelf.entity.json
A entity/pokemon/azumarill.entity.json
A entity/pokemon/azurill.entity.json
A entity/pokemon/bagon.entity.json
A entity/pokemon/baltoy.entity.json
A entity/pokemon/banette.entity.json
A entity/pokemon/banettemega.entity.json
A entity/pokemon/barbaracle.entity.json
A entity/pokemon/barboach.entity.json
A entity/pokemon/barraskewda.entity.json
A entity/pokemon/basculegion.entity.json
A entity/pokemon/basculegionf.entity.json
A entity/pokemon/basculin.entity.json
A entity/pokemon/basculinbluestriped.entity.json
A entity/pokemon/basculinwhitestriped.entity.json
A entity/pokemon/bastiodon.entity.json
A entity/pokemon/baxcalibur.entity.json
A entity/pokemon/bayleef.entity.json
A entity/pokemon/beartic.entity.json
A entity/pokemon/beautifly.entity.json
A entity/pokemon/beedrill.entity.json
A entity/pokemon/beedrillmega.entity.json
A entity/pokemon/beheeyem.entity.json
A entity/pokemon/beldum.entity.json
A entity/pokemon/bellibolt.entity.json
A entity/pokemon/bellossom.entity.json
A entity/pokemon/bellsprout.entity.json
A entity/pokemon/bergmite.entity.json
A entity/pokemon/bewear.entity.json
A entity/pokemon/bibarel.entity.json
A entity/pokemon/bidoof.entity.json
A entity/pokemon/binacle.entity.json
A entity/pokemon/bisharp.entity.json
A entity/pokemon/blacephalon.entity.json
A entity/pokemon/blastoise.entity.json
A entity/pokemon/blastoisegmax.entity.json
A entity/pokemon/blastoisemega.entity.json
A entity/pokemon/blaziken.entity.json
A entity/pokemon/blazikenmega.entity.json
A entity/pokemon/blipbug.entity.json
A entity/pokemon/blissey.entity.json
A entity/pokemon/blitzle.entity.json
A entity/pokemon/boldore.entity.json
A entity/pokemon/boltund.entity.json
A entity/pokemon/bombirdier.entity.json
A entity/pokemon/bonsly.entity.json
A entity/pokemon/bouffalant.entity.json
A entity/pokemon/bounsweet.entity.json
A entity/pokemon/braixen.entity.json
A entity/pokemon/brambleghast.entity.json
A entity/pokemon/bramblin.entity.json
A entity/pokemon/braviary.entity.json
A entity/pokemon/braviaryhisui.entity.json
A entity/pokemon/breloom.entity.json
A entity/pokemon/brionne.entity.json
A entity/pokemon/bronzong.entity.json
A entity/pokemon/bronzor.entity.json
A entity/pokemon/brutebonnet.entity.json
A entity/pokemon/bruxish.entity.json
A entity/pokemon/budew.entity.json
A entity/pokemon/buizel.entity.json
A entity/pokemon/bulbasaur.entity.json
A entity/pokemon/buneary.entity.json
A entity/pokemon/bunnelby.entity.json
A entity/pokemon/burmy.entity.json
A entity/pokemon/butterfree.entity.json
A entity/pokemon/butterfreegmax.entity.json
A entity/pokemon/buzzwole.entity.json
A entity/pokemon/cacnea.entity.json
A entity/pokemon/cacturne.entity.json
A entity/pokemon/calyrex.entity.json
A entity/pokemon/calyrexice.entity.json
A entity/pokemon/calyrexshadow.entity.json
A entity/pokemon/camerupt.entity.json
A entity/pokemon/cameruptmega.entity.json
A entity/pokemon/capsakid.entity.json
A entity/pokemon/carbink.entity.json
A entity/pokemon/carkol.entity.json
A entity/pokemon/carnivine.entity.json
A entity/pokemon/carracosta.entity.json
A entity/pokemon/carvanha.entity.json
A entity/pokemon/cascoon.entity.json
A entity/pokemon/castform.entity.json
A entity/pokemon/castformrainy.entity.json
A entity/pokemon/castformsnowy.entity.json
A entity/pokemon/castformsunny.entity.json
A entity/pokemon/caterpie.entity.json
A entity/pokemon/celebi.entity.json
A entity/pokemon/celesteela.entity.json
A entity/pokemon/centiskorch.entity.json
A entity/pokemon/centiskorchgmax.entity.json
A entity/pokemon/ceruledge.entity.json
A entity/pokemon/cetitan.entity.json
A entity/pokemon/cetoddle.entity.json
A entity/pokemon/chandelure.entity.json
A entity/pokemon/chansey.entity.json
A entity/pokemon/charcadet.entity.json
A entity/pokemon/charizard.entity.json
A entity/pokemon/charizardgmax.entity.json
A entity/pokemon/charizardmegax.entity.json
A entity/pokemon/charizardmegay.entity.json
A entity/pokemon/charjabug.entity.json
A entity/pokemon/charmander.entity.json
A entity/pokemon/charmeleon.entity.json
A entity/pokemon/chatot.entity.json
A entity/pokemon/cherrim.entity.json
A entity/pokemon/cherrimsunshine.entity.json
A entity/pokemon/cherubi.entity.json
A entity/pokemon/chesnaught.entity.json
A entity/pokemon/chespin.entity.json
A entity/pokemon/chewtle.entity.json
A entity/pokemon/chienpao.entity.json
A entity/pokemon/chikorita.entity.json
A entity/pokemon/chimchar.entity.json
A entity/pokemon/chimecho.entity.json
A entity/pokemon/chinchou.entity.json
A entity/pokemon/chingling.entity.json
A entity/pokemon/chiyu.entity.json
A entity/pokemon/cinccino.entity.json
A entity/pokemon/cinderace.entity.json
A entity/pokemon/cinderacegmax.entity.json
A entity/pokemon/clamperl.entity.json
A entity/pokemon/clauncher.entity.json
A entity/pokemon/clawitzer.entity.json
A entity/pokemon/claydol.entity.json
A entity/pokemon/clefable.entity.json
A entity/pokemon/clefairy.entity.json
A entity/pokemon/cleffa.entity.json
A entity/pokemon/clobbopus.entity.json
A entity/pokemon/clodsire.entity.json
A entity/pokemon/cloyster.entity.json
A entity/pokemon/coalossal.entity.json
A entity/pokemon/coalossalgmax.entity.json
A entity/pokemon/cobalion.entity.json
A entity/pokemon/cofagrigus.entity.json
A entity/pokemon/combee.entity.json
A entity/pokemon/combusken.entity.json
A entity/pokemon/comfey.entity.json
A entity/pokemon/conkeldurr.entity.json
A entity/pokemon/copperajah.entity.json
A entity/pokemon/copperajahgmax.entity.json
A entity/pokemon/corphish.entity.json
A entity/pokemon/corsola.entity.json
A entity/pokemon/corsolagalar.entity.json
A entity/pokemon/corviknight.entity.json
A entity/pokemon/corviknightgmax.entity.json
A entity/pokemon/corvisquire.entity.json
A entity/pokemon/cosmoem.entity.json
A entity/pokemon/cosmog.entity.json
A entity/pokemon/cottonee.entity.json
A entity/pokemon/crabominable.entity.json
A entity/pokemon/crabrawler.entity.json
A entity/pokemon/cradily.entity.json
A entity/pokemon/cramorant.entity.json
A entity/pokemon/cramorantgorging.entity.json
A entity/pokemon/cramorantgulping.entity.json
A entity/pokemon/cranidos.entity.json
A entity/pokemon/crawdaunt.entity.json
A entity/pokemon/cresselia.entity.json
A entity/pokemon/croagunk.entity.json
A entity/pokemon/crobat.entity.json
A entity/pokemon/crocalor.entity.json
A entity/pokemon/croconaw.entity.json
A entity/pokemon/crustle.entity.json
A entity/pokemon/cryogonal.entity.json
A entity/pokemon/cubchoo.entity.json
A entity/pokemon/cubone.entity.json
A entity/pokemon/cufant.entity.json
A entity/pokemon/cursola.entity.json
A entity/pokemon/cutiefly.entity.json
A entity/pokemon/cyclizar.entity.json
A entity/pokemon/cyndaquil.entity.json
A entity/pokemon/dachsbun.entity.json
A entity/pokemon/darkrai.entity.json
A entity/pokemon/darmanitan.entity.json
A entity/pokemon/darmanitangalar.entity.json
A entity/pokemon/darmanitangalarzen.entity.json
A entity/pokemon/darmanitanzen.entity.json
A entity/pokemon/dartrix.entity.json
A entity/pokemon/darumaka.entity.json
A entity/pokemon/darumakagalar.entity.json
A entity/pokemon/decidueye.entity.json
A entity/pokemon/decidueyehisui.entity.json
A entity/pokemon/dedenne.entity.json
A entity/pokemon/deerling.entity.json
A entity/pokemon/deino.entity.json
A entity/pokemon/delcatty.entity.json
A entity/pokemon/delibird.entity.json
A entity/pokemon/delphox.entity.json
A entity/pokemon/deoxys.entity.json
A entity/pokemon/deoxysattack.entity.json
A entity/pokemon/deoxysdefense.entity.json
A entity/pokemon/deoxysspeed.entity.json
A entity/pokemon/dewgong.entity.json
A entity/pokemon/dewott.entity.json
A entity/pokemon/dewpider.entity.json
A entity/pokemon/dhelmise.entity.json
A entity/pokemon/dialga.entity.json
A entity/pokemon/dialgaorigin.entity.json
A entity/pokemon/diancie.entity.json
A entity/pokemon/dianciemega.entity.json
A entity/pokemon/diggersby.entity.json
A entity/pokemon/diglett.entity.json
A entity/pokemon/diglettalola.entity.json
A entity/pokemon/dipplin.entity.json
A entity/pokemon/ditto.entity.json
A entity/pokemon/dodrio.entity.json
A entity/pokemon/doduo.entity.json
A entity/pokemon/dolliv.entity.json
A entity/pokemon/dondozo.entity.json
A entity/pokemon/donphan.entity.json
A entity/pokemon/dottler.entity.json
A entity/pokemon/doublade.entity.json
A entity/pokemon/dracovish.entity.json
A entity/pokemon/dracozolt.entity.json
A entity/pokemon/dragalge.entity.json
A entity/pokemon/dragapult.entity.json
A entity/pokemon/dragonair.entity.json
A entity/pokemon/dragonite.entity.json
A entity/pokemon/drakloak.entity.json
A entity/pokemon/drampa.entity.json
A entity/pokemon/drapion.entity.json
A entity/pokemon/dratini.entity.json
A entity/pokemon/drednaw.entity.json
A entity/pokemon/drednawgmax.entity.json
A entity/pokemon/dreepy.entity.json
A entity/pokemon/drifblim.entity.json
A entity/pokemon/drifloon.entity.json
A entity/pokemon/drilbur.entity.json
A entity/pokemon/drizzile.entity.json
A entity/pokemon/drowzee.entity.json
A entity/pokemon/druddigon.entity.json
A entity/pokemon/dubwool.entity.json
A entity/pokemon/ducklett.entity.json
A entity/pokemon/dudunsparce.entity.json
A entity/pokemon/dudunsparcethreesegment.entity.json
A entity/pokemon/dugtrio.entity.json
A entity/pokemon/dugtrioalola.entity.json
A entity/pokemon/dunsparce.entity.json
A entity/pokemon/duosion.entity.json
A entity/pokemon/duraludon.entity.json
A entity/pokemon/duraludongmax.entity.json
A entity/pokemon/durant.entity.json
A entity/pokemon/dusclops.entity.json
A entity/pokemon/dusknoir.entity.json
A entity/pokemon/duskull.entity.json
A entity/pokemon/dustox.entity.json
A entity/pokemon/dwebble.entity.json
A entity/pokemon/eelektrik.entity.json
A entity/pokemon/eelektross.entity.json
A entity/pokemon/eevee.entity.json
A entity/pokemon/eeveegmax.entity.json
A entity/pokemon/eeveestarter.entity.json
A entity/pokemon/eiscue.entity.json
A entity/pokemon/eiscuenoice.entity.json
A entity/pokemon/ekans.entity.json
A entity/pokemon/eldegoss.entity.json
A entity/pokemon/electabuzz.entity.json
A entity/pokemon/electivire.entity.json
A entity/pokemon/electrike.entity.json
A entity/pokemon/electrode.entity.json
A entity/pokemon/electrodehisui.entity.json
A entity/pokemon/elekid.entity.json
A entity/pokemon/elgyem.entity.json
A entity/pokemon/emboar.entity.json
A entity/pokemon/emolga.entity.json
A entity/pokemon/empoleon.entity.json
A entity/pokemon/enamorus.entity.json
A entity/pokemon/enamorustherian.entity.json
A entity/pokemon/entei.entity.json
A entity/pokemon/escavalier.entity.json
A entity/pokemon/espathra.entity.json
A entity/pokemon/espeon.entity.json
A e
... [stdout truncated: output exceeded 50000 characters (471485 total). Please modify your command to reduce output size, for example by:
- Using grep/rg to filter results
- Using head/tail to limit lines
- Using --max-count flag with grep/rg
- Processing output with awk/sed to extract only needed information]
</shell_result>
Script executed:
#!/bin/bash
# Get all files added in this commit that relate to UI
echo "=== UI-related files added in commit ==="
git show --name-only --pretty="" 28183d68 | grep -i "ui\|_ui_defs" | sort
# Check if the referenced __generated__ file exists
echo ""
echo "=== Checking if referenced generated file exists ==="
if [ -f "ui/__generated__/phud/sidebar.json" ]; then
echo "File EXISTS"
wc -l ui/__generated__/phud/sidebar.json
head -20 ui/__generated__/phud/sidebar.json
else
echo "File DOES NOT EXIST"
fi
# Check all current UI files
echo ""
echo "=== All current UI files ==="
find ui -type f
# Check all scripts/ui source files added
echo ""
echo "=== All scripts/ui TypeScript source files ==="
find scripts/ui -type f -name "*.ts" | sortRepository: smell-of-curry/pokebedrock-res
<shell_result>
Repository: smell-of-curry/pokebedrock-res
Exit code: 0
stdout:
=== UI-related files added in commit ===
animation_controllers/gui.json
animations/gui.animation.json
animations/pokemon/buizel.animation.json
animations/pokemon/cyndaquil.animation.json
animations/pokemon/decidueyehisui.animation.json
animations/pokemon/hisuian_typhlosion.animation.json
animations/pokemon/quilava.animation.json
animations/pokemon/quilladin.animation.json
animations/pokemon/qwilfishhisui.animation.json
animations/pokemon/squirtle.animation.json
animations/pokemon/suicune.animation.json
animations/pokemon/typhlosionhisui.animation.json
attachables/balls/quick.json
attachables/gui.attachable.json
attachables/gui.json
entity/pokemon/arcaninehisui.entity.json
entity/pokemon/avalugghisui.entity.json
entity/pokemon/braviaryhisui.entity.json
entity/pokemon/buizel.entity.json
entity/pokemon/corvisquire.entity.json
entity/pokemon/cyndaquil.entity.json
entity/pokemon/decidueyehisui.entity.json
entity/pokemon/electrodehisui.entity.json
entity/pokemon/goodrahisui.entity.json
entity/pokemon/growlithehisui.entity.json
entity/pokemon/lilliganthisui.entity.json
entity/pokemon/quilava.entity.json
entity/pokemon/quilladin.entity.json
entity/pokemon/qwilfishhisui.entity.json
entity/pokemon/samurotthisui.entity.json
entity/pokemon/sliggoohisui.entity.json
entity/pokemon/sneaselhisui.entity.json
entity/pokemon/squirtle.entity.json
entity/pokemon/suicune.entity.json
entity/pokemon/tranquill.entity.json
entity/pokemon/typhlosionhisui.entity.json
entity/pokemon/voltorbhisui.entity.json
entity/pokemon/zoroarkhisui.entity.json
entity/pokemon/zoruahisui.entity.json
models/entity/gui.geo.json
models/entity/pokemon/buizel.geo.json
models/entity/pokemon/cyndaquil.geo.json
models/entity/pokemon/decidueyehisui.geo.json
models/entity/pokemon/quilava.geo.json
models/entity/pokemon/quilladin.geo.json
models/entity/pokemon/qwilfishhisui.geo.json
models/entity/pokemon/squirtle.geo.json
models/entity/pokemon/suicune.geo.json
models/entity/pokemon/typhlosionhisui.geo.json
render_controllers/pokemon/buizel.rc.json
render_controllers/pokemon/sneaselhisui.rc.json
scripts/build.ts
scripts/ui/README.md
scripts/ui/chestServerForm.ts
scripts/ui/hud_screen.ts
scripts/ui/phud/actionbar.ts
scripts/ui/phud/battleWait.ts
scripts/ui/phud/currency.ts
scripts/ui/phud/evolutionWait.ts
scripts/ui/phud/loadingScreen.ts
scripts/ui/phud/phone.ts
scripts/ui/phud/phud.ts
scripts/ui/phud/playerPing.ts
scripts/ui/phud/sidebar.ts
scripts/ui/pokemon/attack.ts
scripts/ui/pokemon/pc.ts
scripts/ui/pokemon/pokedex.ts
scripts/ui/pokemon/pokemon.ts
scripts/ui/rotomPhone/first.ts
scripts/ui/rotomPhone/second.ts
scripts/ui/rotomPhone/third.ts
scripts/ui/searchServerForm.ts
scripts/ui/serverForm.ts
sounds/mob/pokemon/buizel.ogg
sounds/mob/pokemon/corvisquire.ogg
sounds/mob/pokemon/cyndaquil.ogg
sounds/mob/pokemon/quilava.ogg
sounds/mob/pokemon/quilladin.ogg
sounds/mob/pokemon/squirtle.ogg
sounds/mob/pokemon/suicune.ogg
sounds/mob/pokemon/tranquill.ogg
textures/attachables/gui.png
textures/entity/ball/quick.png
textures/entity/gui.png
textures/entity/pokemon/buizel/buizel.png
textures/entity/pokemon/buizel/shiny_buizel.png
textures/entity/pokemon/cyndaquil/cyndaquil.png
textures/entity/pokemon/cyndaquil/shiny_cyndaquil.png
textures/entity/pokemon/decidueyehisui/decidueyehisui.png
textures/entity/pokemon/decidueyehisui/shiny_decidueyehisui.png
textures/entity/pokemon/quilava/quilava.png
textures/entity/pokemon/quilava/shiny_quilava.png
textures/entity/pokemon/quilladin/quilladin.png
textures/entity/pokemon/quilladin/shiny_quilladin.png
textures/entity/pokemon/qwilfishhisui/qwilfishhisui.png
textures/entity/pokemon/qwilfishhisui/shiny_qwilfishhisui.png
textures/entity/pokemon/squirtle/shiny_squirtle.png
textures/entity/pokemon/squirtle/squirtle.png
textures/entity/pokemon/suicune/shiny_suicune.png
textures/entity/pokemon/suicune/suicune.png
textures/entity/pokemon/typhlosionhisui/shiny_typhlosionhisui.png
textures/entity/pokemon/typhlosionhisui/typhlosionhisui.png
textures/entity/trainers/suit.png
textures/items/ball/lid/quick_ball_lid.png
textures/items/ball/quick_ball.png
textures/items/gui.png
textures/items/healing_items/berry_juice.png
textures/items/healing_items/berryjuice.png
textures/items/held_items/quickclaw.png
textures/items/held_items/quickpowder.png
textures/sprites/dark/arcaninehisui.png
textures/sprites/dark/avalugghisui.png
textures/sprites/dark/braviaryhisui.png
textures/sprites/dark/buizel.png
textures/sprites/dark/corvisquire.png
textures/sprites/dark/cyndaquil.png
textures/sprites/dark/decidueyehisui.png
textures/sprites/dark/electrodehisui.png
textures/sprites/dark/equilibra.png
textures/sprites/dark/goodrahisui.png
textures/sprites/dark/growlithehisui.png
textures/sprites/dark/lilliganthisui.png
textures/sprites/dark/quilava.png
textures/sprites/dark/quilladin.png
textures/sprites/dark/qwilfishhisui.png
textures/sprites/dark/samurotthisui.png
textures/sprites/dark/sliggoohisui.png
textures/sprites/dark/sneaselhisui.png
textures/sprites/dark/squirtle.png
textures/sprites/dark/suicune.png
textures/sprites/dark/tranquill.png
textures/sprites/dark/typhlosionhisui.png
textures/sprites/dark/voltorbhisui.png
textures/sprites/dark/zoroarkhisui.png
textures/sprites/dark/zoruahisui.png
textures/sprites/default/arcaninehisui.png
textures/sprites/default/avalugghisui.png
textures/sprites/default/braviaryhisui.png
textures/sprites/default/buizel.png
textures/sprites/default/corvisquire.png
textures/sprites/default/cyndaquil.png
textures/sprites/default/decidueyehisui.png
textures/sprites/default/electrodehisui.png
textures/sprites/default/equilibra.png
textures/sprites/default/goodrahisui.png
textures/sprites/default/growlithehisui.png
textures/sprites/default/lilliganthisui.png
textures/sprites/default/quilava.png
textures/sprites/default/quilladin.png
textures/sprites/default/qwilfishhisui.png
textures/sprites/default/samurotthisui.png
textures/sprites/default/sliggoohisui.png
textures/sprites/default/sneaselhisui.png
textures/sprites/default/squirtle.png
textures/sprites/default/suicune.png
textures/sprites/default/tranquill.png
textures/sprites/default/typhlosionhisui.png
textures/sprites/default/voltorbhisui.png
textures/sprites/default/zoroarkhisui.png
textures/sprites/default/zoruahisui.png
textures/ui/battle/ally.png
textures/ui/battle/back.png
textures/ui/battle/background.png
textures/ui/battle/caught.png
textures/ui/battle/log_down.png
textures/ui/battle/log_up.png
textures/ui/battle/menu_background.png
textures/ui/battle/menu_bag.png
textures/ui/battle/menu_bag_disabled.png
textures/ui/battle/menu_bag_hover.png
textures/ui/battle/menu_left.png
textures/ui/battle/menu_list_item.png
textures/ui/battle/menu_poke.png
textures/ui/battle/menu_poke_disabled.png
textures/ui/battle/menu_poke_hover.png
textures/ui/battle/menu_reuse_button.png
textures/ui/battle/menu_right.png
textures/ui/battle/menu_run.png
textures/ui/battle/menu_run_disabled.png
textures/ui/battle/menu_run_hover.png
textures/ui/battle/moveSelection.png
textures/ui/battle/moveSelectionBadges/background.png
textures/ui/battle/moveSelectionBadges/default.png
textures/ui/battle/moveSelectionBadges/dynamax.png
textures/ui/battle/moveSelectionBadges/dynamax_disabled.png
textures/ui/battle/moveSelectionBadges/dynamax_hollow.png
textures/ui/battle/moveSelectionBadges/mega.png
textures/ui/battle/moveSelectionBadges/mega_disabled.png
textures/ui/battle/moveSelectionBadges/mega_hollow.png
textures/ui/battle/moveSelectionBadges/zmove.png
textures/ui/battle/moveSelectionBadges/zmove_disabled.png
textures/ui/battle/moveSelectionBadges/zmove_hollow.png
textures/ui/battle/moveSelection_blank_badge.png
textures/ui/battle/moveSelection_hover.png
textures/ui/battle/moveSelection_locked.png
textures/ui/battle/opponent.png
textures/ui/battle/pointer.png
textures/ui/battle/pokemon_active.png
textures/ui/battle/pokemon_caution.png
textures/ui/battle/pokemon_caution_bar.png
textures/ui/battle/pokemon_details.png
textures/ui/battle/pokemon_healthy.png
textures/ui/battle/pokemon_healthy_bar.png
textures/ui/battle/pokemon_icon.png
textures/ui/battle/pokemon_warning.png
textures/ui/battle/pokemon_warning_bar.png
textures/ui/battle/raid.png
textures/ui/battle/shiny.png
textures/ui/battle/star.png
textures/ui/battle/target_down.png
textures/ui/battle/target_up.png
textures/ui/battle/white_shaded.png
textures/ui/battle/white_transparency.png
textures/ui/evolution_box.png
textures/ui/gui/attacks/bug.png
textures/ui/gui/attacks/dark.png
textures/ui/gui/attacks/dragon.png
textures/ui/gui/attacks/electric.png
textures/ui/gui/attacks/fairy.png
textures/ui/gui/attacks/fighting.png
textures/ui/gui/attacks/fire.png
textures/ui/gui/attacks/flying.png
textures/ui/gui/attacks/ghost.png
textures/ui/gui/attacks/grass.png
textures/ui/gui/attacks/ground.png
textures/ui/gui/attacks/ice.png
textures/ui/gui/attacks/normal.png
textures/ui/gui/attacks/poison.png
textures/ui/gui/attacks/psychic.png
textures/ui/gui/attacks/rock.png
textures/ui/gui/attacks/steel.png
textures/ui/gui/attacks/water.png
textures/ui/gui/auction.png
textures/ui/gui/backpack.png
textures/ui/gui/generic_1.png
textures/ui/gui/generic_27.png
textures/ui/gui/generic_54.png
textures/ui/gui/generic_9.png
textures/ui/gui/inventory.png
textures/ui/gui/pokeball.png
textures/ui/gui/rotom_phone/ability_section.png
textures/ui/gui/rotom_phone/background.png
textures/ui/gui/rotom_phone/background_info.png
textures/ui/gui/rotom_phone/background_moves.png
textures/ui/gui/rotom_phone/background_stats.png
textures/ui/gui/rotom_phone/blank_type.png
textures/ui/gui/rotom_phone/hp_exp_bar_background.png
textures/ui/gui/rotom_phone/hp_exp_bar_cover.png
textures/ui/gui/rotom_phone/info_button.png
textures/ui/gui/rotom_phone/info_button_disabled.png
textures/ui/gui/rotom_phone/info_button_hover.png
textures/ui/gui/rotom_phone/left_arrow.png
textures/ui/gui/rotom_phone/left_arrow_disabled.png
textures/ui/gui/rotom_phone/left_arrow_hover.png
textures/ui/gui/rotom_phone/move_button.png
textures/ui/gui/rotom_phone/move_button_disabled.png
textures/ui/gui/rotom_phone/move_button_hover.png
textures/ui/gui/rotom_phone/moves_button.png
textures/ui/gui/rotom_phone/moves_button_disabled.png
textures/ui/gui/rotom_phone/moves_button_hover.png
textures/ui/gui/rotom_phone/physical_icon.png
textures/ui/gui/rotom_phone/pokeball_icon.png
textures/ui/gui/rotom_phone/pokeball_icon.psd
textures/ui/gui/rotom_phone/pokemon_name.png
textures/ui/gui/rotom_phone/pp_bar_cover.png
textures/ui/gui/rotom_phone/progressbar_exp.png
textures/ui/gui/rotom_phone/progressbar_hp.png
textures/ui/gui/rotom_phone/progressbar_pp.png
textures/ui/gui/rotom_phone/right_arrow.png
textures/ui/gui/rotom_phone/right_arrow_disabled.png
textures/ui/gui/rotom_phone/right_arrow_hover.png
textures/ui/gui/rotom_phone/section_one.png
textures/ui/gui/rotom_phone/section_three.png
textures/ui/gui/rotom_phone/section_two.png
textures/ui/gui/rotom_phone/section_two_button.png
textures/ui/gui/rotom_phone/section_two_button_disabled.png
textures/ui/gui/rotom_phone/section_two_button_hover.png
textures/ui/gui/rotom_phone/section_two_disabled.png
textures/ui/gui/rotom_phone/section_two_hover.png
textures/ui/gui/rotom_phone/special_icon.png
textures/ui/gui/rotom_phone/statistics_section.png
textures/ui/gui/rotom_phone/stats_button.png
textures/ui/gui/rotom_phone/stats_button_disabled.png
textures/ui/gui/rotom_phone/stats_button_hover.png
textures/ui/gui/rotom_phone/status_icon.png
textures/ui/pc/action_button.png
textures/ui/pc/action_button_disabled.png
textures/ui/pc/action_button_hover.png
textures/ui/pc/container_slots.png
textures/ui/pc/content_box.png
textures/ui/pc/icon_box.png
textures/ui/pc/left_arrow.png
textures/ui/pc/left_arrow_disabled.png
textures/ui/pc/left_arrow_hover.png
textures/ui/pc/party_slots.png
textures/ui/pc/right_arrow.png
textures/ui/pc/right_arrow_disabled.png
textures/ui/pc/right_arrow_hover.png
textures/ui/pc/slot_hover.png
textures/ui/pc/title_box.png
textures/ui/phud/box_small.png
textures/ui/phud/box_wide.png
textures/ui/phud/currency.png
textures/ui/phud/jeb_loop.png
textures/ui/phud/jeb_start.png
textures/ui/phud/maple_loop.png
textures/ui/phud/maple_start.png
textures/ui/phud/ringing.png
textures/ui/phud/smellofcurry_loop.png
textures/ui/phud/smellofcurry_start.png
textures/ui/phud/standby.png
textures/ui/pokebuilder/27_slot_pokebuilder.png
textures/ui/pokebuilder/45_slot_pokebuilder.png
textures/ui/pokebuilder/ability_icon.png
textures/ui/pokebuilder/back_icon.png
textures/ui/pokebuilder/female_icon.png
textures/ui/pokebuilder/gender_icon.png
textures/ui/pokebuilder/level_icon.png
textures/ui/pokebuilder/male_icon.png
textures/ui/pokebuilder/nature_icon.png
textures/ui/pokebuilder/pokeball_icon.png
textures/ui/pokebuilder/pokebuilder_evs_icon.png
textures/ui/pokebuilder/pokebuilder_ivs_icon.png
textures/ui/pokebuilder/shiny_icon.png
textures/ui/pokedex/ALL GUIS.png
textures/ui/pokedex/Button_1.png
textures/ui/pokedex/Button_1_disabled.png
textures/ui/pokedex/Button_1_green.png
textures/ui/pokedex/Button_2.png
textures/ui/pokedex/Button_2_disabled.png
textures/ui/pokedex/Button_2_green.png
textures/ui/pokedex/Button_3.png
textures/ui/pokedex/Button_3_disabled.png
textures/ui/pokedex/Button_3_green.png
textures/ui/pokedex/Button_4.png
textures/ui/pokedex/Button_4_disabled.png
textures/ui/pokedex/Button_4_green.png
textures/ui/pokedex/Button_5.png
textures/ui/pokedex/Button_5_disabled.png
textures/ui/pokedex/Button_5_green.png
textures/ui/pokedex/Button_6.png
textures/ui/pokedex/Button_6_disabled.png
textures/ui/pokedex/Button_6_green.png
textures/ui/pokedex/Button_7.png
textures/ui/pokedex/Button_7_disabled.png
textures/ui/pokedex/Button_7_green.png
textures/ui/pokedex/Orange_gui_first.png
textures/ui/pokedex/Orange_gui_resized_and_removed.png
textures/ui/pokedex/Orange_gui_second.png
textures/ui/pokedex/Orange_gui_second_resized_and_removed.png
textures/ui/pokemon/background.png
textures/ui/pokemon/background_default.json
textures/ui/pokemon/background_default.png
textures/ui/pokemon/background_hover.json
textures/ui/pokemon/background_hover.png
textures/ui/pokemon/starterholder.png
textures/ui/quests/calander_icon.png
textures/ui/quests/chest_screen.png
textures/ui/quests/chest_screen_large.png
textures/ui/quests/collect_rewards.png
textures/ui/quests/main.png
textures/ui/quests/main_blank.png
textures/ui/quests/pokeball_icon.png
textures/ui/quests/trophy_icon.png
textures/ui/shiny_icon.png
textures/ui/sidebar/balls/beast.png
textures/ui/sidebar/balls/cherish.png
textures/ui/sidebar/balls/dive.png
textures/ui/sidebar/balls/dream.png
textures/ui/sidebar/balls/dusk.png
textures/ui/sidebar/balls/empty.png
textures/ui/sidebar/balls/fast.png
textures/ui/sidebar/balls/friend.png
textures/ui/sidebar/balls/great.png
textures/ui/sidebar/balls/gs.png
textures/ui/sidebar/balls/heal.png
textures/ui/sidebar/balls/heavy.png
textures/ui/sidebar/balls/level.png
textures/ui/sidebar/balls/love.png
textures/ui/sidebar/balls/lure.png
textures/ui/sidebar/balls/luxury.png
textures/ui/sidebar/balls/master.png
textures/ui/sidebar/balls/moon.png
textures/ui/sidebar/balls/nest.png
textures/ui/sidebar/balls/net.png
textures/ui/sidebar/balls/park.png
textures/ui/sidebar/balls/poke.png
textures/ui/sidebar/balls/premier.png
textures/ui/sidebar/balls/quick.png
textures/ui/sidebar/balls/repeat.png
textures/ui/sidebar/balls/safari.png
textures/ui/sidebar/balls/sport.png
textures/ui/sidebar/balls/timer.png
textures/ui/sidebar/balls/ultra.png
textures/ui/sidebar/data.png
textures/ui/sidebar/dock.png
textures/ui/sidebar/ring.png
textures/ui/snow_golem.png
textures/ui/thumbtack.png
textures/ui/thumbtack_remove.png
textures/ui/title.png
ui/_global_variables.json
ui/_ui_defs.json
=== Checking if referenced generated file exists ===
File DOES NOT EXIST
=== All current UI files ===
ui/_global_variables.json
ui/_ui_defs.json
=== All scripts/ui TypeScript source files ===
scripts/ui/chestServerForm.ts
scripts/ui/hud_screen.ts
scripts/ui/phud/actionbar.ts
scripts/ui/phud/battleWait.ts
scripts/ui/phud/currency.ts
scripts/ui/phud/evolutionWait.ts
scripts/ui/phud/loadingScreen.ts
scripts/ui/phud/phone.ts
scripts/ui/phud/phud.ts
scripts/ui/phud/playerPing.ts
scripts/ui/phud/sidebar.ts
scripts/ui/pokemon/attack.ts
scripts/ui/pokemon/pc.ts
scripts/ui/pokemon/pokedex.ts
scripts/ui/pokemon/pokemon.ts
scripts/ui/rotomPhone/first.ts
scripts/ui/rotomPhone/second.ts
scripts/ui/rotomPhone/third.ts
scripts/ui/searchServerForm.ts
scripts/ui/serverForm.ts
</shell_result>
Perfect. I now have all the information I need. The review comment's concerns are validated. The PR adds 20 TypeScript UI source files but ui/_ui_defs.json only references a single non-existent generated file, and there's no build process to generate these files from TypeScript sources.
ui/_ui_defs.json is incomplete — references non-existent generated file and omits multiple UI definitions.
The PR adds 20 TypeScript UI source files (scripts/ui/) for PHUD (actionbar, battleWait, currency, evolutionWait, loadingScreen, phone, playerPing, sidebar), Pokémon (attack, pc, pokedex), Rotom Phone, server forms, and chest forms. However, ui/_ui_defs.json references only "ui/__generated__/phud/sidebar.json", which does not exist. Additionally:
- No build process found to generate JSON files from TypeScript sources
- Missing references for 19 other UI components (actionbar, battleWait, currency, evolution wait, loading screen, phone, player ping, attack, pc, pokedex, rotom phone screens, chest/search forms)
- Either
npm run buildhasn't been executed, or the build system needs implementation to compile TypeScript UIs to JSON
All TypeScript UI source files must be compiled and their corresponding JSON entries must be registered in _ui_defs.json.
🤖 Prompt for AI Agents
In ui/_ui_defs.json around lines 1 to 5, the file only references
"ui/__generated__/phud/sidebar.json" which does not exist and omits the 19 other
UI definitions added as TypeScript under scripts/ui/; fix by running or adding
the UI build step that compiles each TypeScript UI to JSON (or implement the
build task if missing), generate the corresponding files under ui/__generated__/
(e.g. phud/*, pokedex/*, rotom phone screens, server/chest forms, etc.), and
update ui/_ui_defs.json to include an entry for each generated JSON file; also
ensure package.json/CI includes the build step so generated files are produced
consistently (or commit the generated JSONs if your repo policy requires
checked-in artifacts).
| $pressed_button_name: "button.form_button_click", | ||
| $default_button_texture: "textures/ui/form_btn_background", | ||
| $hover_button_texture: "textures/ui/form_btn_background_interact", | ||
| $pressed_button_texture: "textures/ui/form_btn_background_interact", |
There was a problem hiding this comment.
Bug: Inconsistent button texture paths in rotom phone second page
The button texture paths in rotom_phone_second.ts use textures/ui/form_btn_background while both rotom_phone_first.ts and rotom_phone_third.ts use textures/ui/gui/rotom_phone/form_btn_background. The second page is missing the gui/rotom_phone/ subdirectory from the texture paths for $default_button_texture, $hover_button_texture, and $pressed_button_texture. This inconsistency would cause buttons on the second rotom phone page to either display incorrectly or use fallback/missing textures.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
scripts/ui/phud/phone.ts (1)
64-66: Extra closing parenthesis in texture expression still present.The texture expression has an unbalanced parenthesis that will cause a parsing error at runtime:
-const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name))") +const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name)")This was flagged in a previous review as addressed, but the extra
)is still present in the code.
🧹 Nitpick comments (1)
scripts/ui/phud/battleWait.ts (1)
23-29: Consider simplifying layout helpers (fillvssize)
menuExtrauses both.fill()and.size("85%"), and the rootmainimage combines.fill()with.size("default", "30%"); iffill()already sets width/height, the subsequentsize(...)may be redundant or confusing—droppingfill()where explicitsize(...)is desired would make intent clearer and avoid relying on internal override order.Also applies to: 39-52
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (9)
ui/__generated__/actionbar.jsonis excluded by!**/__generated__/**ui/__generated__/battleWait.jsonis excluded by!**/__generated__/**ui/__generated__/currency.jsonis excluded by!**/__generated__/**ui/__generated__/evolutionWait.jsonis excluded by!**/__generated__/**ui/__generated__/loadingScreen.jsonis excluded by!**/__generated__/**ui/__generated__/phone.jsonis excluded by!**/__generated__/**ui/__generated__/phud.jsonis excluded by!**/__generated__/**ui/__generated__/playerPing.jsonis excluded by!**/__generated__/**ui/__generated__/sidebar.jsonis excluded by!**/__generated__/**
📒 Files selected for processing (8)
scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/battleWait.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/phud.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)ui/_ui_defs.json(1 hunks)ui/actionbar.json(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/ui/phud/phud.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (7)
ui/actionbar.json (1)
28-32: Color mismatch between JSON and TypeScript definitions.The color in this JSON file is essentially black
[0.003922, 0.003922, 0.002039](~RGB 1,1,0.5), while the TypeScript definition inscripts/ui/phud/actionbar.tsuses[1, 1, 0.52, 1](yellow). This inconsistency may cause unexpected visual differences depending on which definition is used at runtime.Verify which color is intended and ensure both files are consistent if they serve the same purpose.
scripts/ui/phud/phone.ts (1)
113-126: LGTM on the module structure and export pattern.The
defineUIpattern with animation registration and component composition is well-structured. The phone conditional visibility logic and animation sequencing are properly wired.scripts/ui/phud/currency.ts (1)
1-62: LGTM on the currency component implementation.Clean implementation with proper text splitting logic at 80 characters. The binding pattern using
phudReadwithfirstStripped/skipStrippedis consistent with other PHUD modules.scripts/ui/phud/actionbar.ts (1)
25-33: LGTM on the TypeScript actionbar implementation.The
defineMainpattern is correctly used with proper anchor positioning, layer assignment, and visibility bindings. ThephudTextwrapper appropriately binds the label to#fake_actionbar.scripts/ui/phud/sidebar.ts (1)
140-159: Slot generation loop is well-structured.The dynamic slot generation with proper index calculation (
base = slotIndex * POKEMON_DATA_SIZE) and variable assignment for each Pokemon field is correct. The padding logic between slots is appropriately handled.ui/_ui_defs.json (1)
4-12: Generated UI files are present and properly committed to the repository.All referenced
ui/__generated__/*.jsonfiles (actionbar.json, battleWait.json, currency.json, evolutionWait.json, loadingScreen.json, phone.json, phud.json, playerPing.json, and sidebar.json) exist in the repository with reasonable file sizes and current timestamps. The build process has been executed and the generated artifacts are already committed.scripts/ui/phud/battleWait.ts (1)
13-54: PHUD battle wait layout and bindings look solidThe composition (phudRead → viewBinding, phudVisibility on the root, horizontal stack combining log + subtitle) is coherent and should behave as a clean, bottom-aligned battle log overlay; layers and anchors are reasonable for stacking on top of the game HUD.
| const pokemonIndexMap = { | ||
| stats: 0, | ||
| name: 1, | ||
| id: 2, | ||
| active: 3, | ||
| caughtWith: 4, | ||
| icon: 5, | ||
| } as const; |
There was a problem hiding this comment.
Index mapping mismatch between pokemonIndexMap and variableDefaults persists.
The pokemonIndexMap defines name: 1 and id: 2 (lines 21-28), but variableDefaults has pokemon_id_index: 1 and pokemon_name_index: 2 (lines 121-128). These are swapped. This was flagged in a previous review as addressed, but the inconsistency remains.
While the loop at lines 149-153 correctly applies the pokemonIndexMap values, the defaults will be incorrect for any slot that doesn't receive the dynamic override.
Apply this diff to align the defaults with the map:
.variableDefaults({
pokemon_stats_index: 0,
- pokemon_id_index: 1,
- pokemon_name_index: 2,
+ pokemon_name_index: 1,
+ pokemon_id_index: 2,
pokemon_active_index: 3,
pokemon_caughtWith_index: 4,
pokemon_icon_index: 5,
})Also applies to: 121-128
🤖 Prompt for AI Agents
In scripts/ui/phud/sidebar.ts around lines 21-28 and 121-128, the pokemon index
mapping (name:1, id:2) does not match the variableDefaults (pokemon_id_index:1,
pokemon_name_index:2); update the defaults to match the map by swapping the two
default values so pokemon_id_index uses 2 and pokemon_name_index uses 1,
ensuring the loop that applies pokemonIndexMap (around lines 149-153) and any
fallback behavior use the correct indices.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (2)
scripts/ui/pokemon/pokedex.ts (1)
193-209: Duplicate control names may cause issues.Both page navigation controls use the same name
page_management@pokedex.button_stack. Consider using distinct names likeprevious_page_managementandnext_page_managementto avoid potential binding or identification conflicts.scripts/ui/phud/phone.ts (1)
64-66: Fix extra closing parenthesis in texture expression.The texture expression has an unbalanced parenthesis that will cause a parsing error at runtime.
Apply this diff to fix:
-const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name))") +const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name)")
🧹 Nitpick comments (7)
ui/_ui_defs.json (1)
22-22: Add trailing newline at end of file.The file is missing a trailing newline, which is a common convention and may cause issues with some tools.
scripts/ui/pokemon/shared.ts (1)
110-117: Consider documenting the magic number for skipChars.The default value of
25forskipCharsrepresents the button metadata prefix length. Adding a constant or comment explaining what these 25 characters contain would improve maintainability.+// Button text format: first 25 chars are metadata (enabled flag, IDs, etc.) +const BUTTON_METADATA_PREFIX_LENGTH = 25; + /** * Creates bindings for button text display. * Strips and skips the first 25 characters (button metadata prefix). */ -export const formButtonTextLabelBindings = (skipChars = 25): Binding[] => [ +export const formButtonTextLabelBindings = (skipChars = BUTTON_METADATA_PREFIX_LENGTH): Binding[] => [ formButtonTextBinding(), viewBinding(strip(skip(skipChars, "#form_button_text")), "#text"), ];scripts/ui/phud/phone.ts (1)
14-14: TODO comment noted - consider tracking separately.This TODO indicates potential cleanup work. Consider creating an issue to track this improvement if it's not planned for this PR.
Would you like me to open an issue to track this refactoring task?
scripts/ui/hud_screen.ts (1)
20-58: Consider extracting duplicate binding configuration.The same bindings array is defined for both
title_background(lines 23-37) andtitle(lines 43-57). Consider extracting this to a shared constant to reduce duplication and ensure consistency.const titleVisibilityBindings = [ { binding_type: "global", binding_condition: "none", binding_name: "#hud_title_text_string", binding_name_override: "#hud_title_text_string", }, { binding_name: "#null", binding_type: "view", source_property_name: "(not ((%.1s * #hud_title_text_string ) = '&_'))", target_property_name: "#visible", }, ]; // Then use: bindings: titleVisibilityBindingsscripts/ui/pokemon/attackScreen/progress.ts (1)
42-57: Consider documenting the magic number for PP bar width calculation.The value
1.965(line 48) appears to be a calculated multiplier for PP bar width. Adding a comment explaining how this value was derived would improve maintainability.+ // 1.965 ≈ 40% (max width) / 20 (max PP steps), accounting for base size const sizePercent: SizeValue = i === "null" || i === 0 ? "0%" : (`${(Number(i) * 1.965).toFixed(3)}%` as SizeValue);scripts/ui/pokemon/attackScreen/buttons.ts (1)
228-248: Consider using declarative map instead of imperative loop for grid button construction.The imperative loop with push could be refactored to a more functional approach, improving readability and reducing mutation.
-export const gridButton = panel("grid_button").size("default", "100%c"); -const gridButtonControls: ElementBuilder[] = []; -for (const offset of gridButtonOffsets) { - gridButtonControls.push( - extend(`grid_button_${gridButtonControls.length + 1}`, gridButtonCheckId) - .variable("icon_offset", [ - // Make first two buttons on left side (-) - `${gridButtonControls.length <= 1 ? "-" : ""}15%`, - "-14%", - ]) - .variable("offset", offset) - .variable("button_id", `b:${gridButtonControls.length + 1}_`) - ); -} -gridButton.controls(...gridButtonControls); +const gridButtonControls = gridButtonOffsets.map((offset, index) => + extend(`grid_button_${index + 1}`, gridButtonCheckId) + .variable("icon_offset", [ + // Make first two buttons on left side (-) + `${index <= 1 ? "-" : ""}15%`, + "-14%", + ]) + .variable("offset", offset) + .variable("button_id", `b:${index + 1}_`) +); + +export const gridButton = panel("grid_button") + .size("default", "100%c") + .controls(...gridButtonControls);scripts/ui/pokemon/attackScreen/actors.ts (1)
171-189: Consider using map for actor control generation, consistent with earlier suggestion.Similar to the grid button construction, this could use a more functional approach.
-const opponentControls: ElementBuilder[] = []; -for (const id of opponentIds) { - opponentControls.push( - extend( - (opponentControls.length + 1).toString(), - opponentActorDetailsButtonCheckId - ).variable("button_id", id) - ); -} -opponentActorDetailsButton.controls(...opponentControls); +const opponentControls = opponentIds.map((id, index) => + extend((index + 1).toString(), opponentActorDetailsButtonCheckId) + .variable("button_id", id) +); +opponentActorDetailsButton.controls(...opponentControls);The same refactor applies to the ally controls loop (lines 200-209).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (18)
ui/__generated__/chestServerForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/actionbar.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/battleWait.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/currency.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/evolutionWait.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/loadingScreen.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/phone.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/phud.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/playerPing.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/sidebar.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/attackScreen.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pc.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pokedex.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/first.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/second.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/third.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/searchServerForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/serverForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**
📒 Files selected for processing (18)
.coderabbit.yaml(1 hunks).copilotignore(1 hunks).cursorignore(1 hunks).gitattributes(1 hunks)scripts/ui/hud_screen.ts(1 hunks)scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/pokemon/attackScreen/actors.ts(1 hunks)scripts/ui/pokemon/attackScreen/buttons.ts(1 hunks)scripts/ui/pokemon/attackScreen/index.ts(1 hunks)scripts/ui/pokemon/attackScreen/progress.ts(1 hunks)scripts/ui/pokemon/attackScreen/shared.ts(1 hunks)scripts/ui/pokemon/pc.ts(1 hunks)scripts/ui/pokemon/pokedex.ts(1 hunks)scripts/ui/pokemon/shared.ts(1 hunks)ui/_ui_defs.json(1 hunks)ui/hud_screen.json(4 hunks)
✅ Files skipped from review due to trivial changes (3)
- .copilotignore
- .cursorignore
- .gitattributes
🚧 Files skipped from review as they are similar to previous changes (2)
- scripts/ui/phud/actionbar.ts
- scripts/ui/phud/currency.ts
🧰 Additional context used
🧬 Code graph analysis (6)
scripts/ui/pokemon/attackScreen/shared.ts (1)
scripts/ui/pokemon/shared.ts (3)
formButtonsDetailsBinding(39-40)addSharedElements(229-233)buttonStack(90-90)
scripts/ui/pokemon/pc.ts (2)
scripts/ui/pokemon/attackScreen/shared.ts (7)
buttonStack(22-22)formButtonEnabledBindings(24-24)formButtonTextLabelBindings(25-25)formButtonImageBindings(26-26)buttonTextureProps(27-27)simpleButtonTextures(28-28)visibilityForId(18-18)scripts/ui/pokemon/shared.ts (7)
buttonStack(90-90)formButtonEnabledBindings(100-108)formButtonTextLabelBindings(114-117)formButtonImageBindings(122-125)buttonTextureProps(144-149)simpleButtonTextures(155-163)visibilityForId(28-29)
scripts/ui/pokemon/shared.ts (1)
scripts/ui/pokemon/attackScreen/shared.ts (2)
buttonStack(22-22)addSharedElements(70-75)
scripts/ui/pokemon/attackScreen/progress.ts (1)
scripts/ui/pokemon/attackScreen/shared.ts (1)
NS(39-39)
scripts/ui/pokemon/pokedex.ts (2)
scripts/ui/pokemon/attackScreen/shared.ts (6)
buttonStack(22-22)formButtonEnabledBindings(24-24)formButtonTextLabelBindings(25-25)formButtonImageBindings(26-26)buttonTextureProps(27-27)visibilityForId(18-18)scripts/ui/pokemon/shared.ts (6)
buttonStack(90-90)formButtonEnabledBindings(100-108)formButtonTextLabelBindings(114-117)formButtonImageBindings(122-125)buttonTextureProps(144-149)visibilityForId(28-29)
scripts/ui/pokemon/attackScreen/index.ts (5)
scripts/ui/pokemon/attackScreen/shared.ts (2)
NS(39-39)addSharedElements(70-75)scripts/ui/pokemon/shared.ts (1)
addSharedElements(229-233)scripts/ui/pokemon/attackScreen/buttons.ts (1)
addButtonElements(253-265)scripts/ui/pokemon/attackScreen/progress.ts (2)
addProgressElements(102-108)addPpBarVariants(42-57)scripts/ui/pokemon/attackScreen/actors.ts (1)
addActorElements(214-224)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (20)
.coderabbit.yaml (1)
1-3: Good configuration to exclude generated code from reviews.Excluding
__generated__directories from code review is appropriate since these files are machine-generated from the TypeScript sources. This aligns with the PR's approach of usingmcbe-ts-uito generate JSON UI definitions.scripts/ui/pokemon/shared.ts (2)
1-18: Well-structured shared utilities module.The module provides a clean, well-documented API for common Pokemon UI patterns. The section separators and JSDoc comments enhance readability.
226-233: Implementation matches design pattern from attackScreen/shared.ts.The
addSharedElementsfunction correctly adds onlybuttonStackhere, while the specializedattackScreen/shared.tsversion adds additional elements likebuttonHoverControl. This pattern allows for extensible shared element registration.scripts/ui/pokemon/pokedex.ts (3)
1-20: Clean UI module structure with proper imports.The Pokedex UI module is well-organized, properly importing shared utilities and using the
defineUIpattern consistently with other modules.
155-164: Transparent textures for invisible button — verify intent.The icon button uses
textures/ui/battle/white_transparencyfor all states, making it visually invisible. Confirm this is intentional (likely used as a clickable overlay for the Pokemon icon).
329-341: Complex string parsing for spawn location.The expression
strip((first(80, "#form_text") - first(40, "#form_text")))extracts characters 41-80 from the form text. While functional, this pattern relies on string subtraction semantics in the UI binding system. Ensure the server-side data format is documented to match this parsing logic.scripts/ui/pokemon/pc.ts (4)
31-33: Proper use of shared utilities.The PC UI module correctly imports and uses the shared button stack and binding utilities, maintaining consistency with other Pokemon UI modules.
197-212: Grid configuration looks correct.The 6x6 grid setup with
chest_ui.chest_itemtemplate andform_buttonscollection follows the established pattern used in other Pokemon UIs.
257-269: Main layout composition is well-structured.The horizontal stack panel layout with left content, center grid, and right content areas creates a clean, modular PC interface. The spacing and organization are appropriate.
172-182: I'm unable to complete the verification due to repository access issues. The web search provided general UI binding theory, but this project appears to use a custom or specific UI framework with its own binding conventions that I cannot determine without accessing the codebase.To proceed, I need you to provide:
The binding mechanism in this project — Does the framework automatically resolve
#title_textreferences, or must they be explicitly declared in abindingsarray?The full context around lines 172-182 in pc.ts — Are bindings defined at a parent panel level that this label inherits, or should they be at this specific control level?
A direct comparison — Show me the exact binding declaration from rotomPhone or chestServerForm so I can verify if pc.ts is genuinely missing the same pattern.
Runtime behavior — Is the title text actually displaying correctly at runtime, or is this a confirmed functional issue?
Alternatively, if you can share the repository in a different way or provide the relevant file excerpts, I can complete the verification immediately.
scripts/ui/pokemon/attackScreen/index.ts (1)
1-125: LGTM - Well-structured battle UI composition.The main entry point properly orchestrates all attack screen modules with clear element definitions and consistent use of the namespace constant. The
defineUIpattern with metadata is correctly implemented.scripts/ui/phud/phone.ts (1)
101-126: Main panel and namespace registration looks correct.The defineUI properly registers all animations and elements. The panel composition with icons, backgrounds, and jebBackground is well-structured.
ui/hud_screen.json (2)
3-85: Well-structured centered GUI panel with proper visibility bindings.The panel correctly positions HUD elements (heart, armor, hunger, bubbles, exp bar) with appropriate offsets and visibility bindings. The mutually exclusive visibility for bubbles based on riding state is correctly implemented.
143-168: PHUD and player ping injection via modifications looks correct.The use of
insert_backfor PHUD andinsert_afterfor player_ping follows the expected modification patterns for Bedrock UI.scripts/ui/hud_screen.ts (1)
86-145: Centered GUI panel implementation looks correct.The panel properly defines all HUD renderers with appropriate positioning and visibility bindings. The global visibility binding using
#hud_visible_centeredallows server-side control.scripts/ui/pokemon/attackScreen/progress.ts (1)
84-97: HP progress bar color variants are well-structured.The dynamic progress bar correctly extends the base
variableProgressBarwith appropriate color IDs and RGBA values for health state indication.scripts/ui/pokemon/attackScreen/buttons.ts (1)
1-48: Well-designed button base with clear state management.The
simpleButtonelement properly extends the common button with all state panels and appropriate bindings. The factory functioncreateActionButtoneffectively reduces code duplication.scripts/ui/pokemon/attackScreen/shared.ts (1)
44-65: Hover tooltip implementation looks correct.The custom hover text renderer with bindings and the buttonHoverControl wrapper are properly implemented.
scripts/ui/pokemon/attackScreen/actors.ts (2)
30-56: Entity icon binding structure is well-implemented.The dual collection bindings for texture and texture_file_system properly support different texture sources.
214-224: Actor elements registration is complete.The
addActorElementshelper properly registers all defined UI elements for namespace integration.
| type ButtonTextureConfig, | ||
| } from "../shared"; | ||
|
|
||
| import { formButtonsDetailsBinding } from "../shared"; |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Remove redundant import - already re-exported above.
formButtonsDetailsBinding is already re-exported at line 19, so the import at line 36 is unnecessary.
-import { formButtonsDetailsBinding } from "../shared";The re-exported formButtonsDetailsBinding from line 19 is already in scope and can be used directly.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { formButtonsDetailsBinding } from "../shared"; |
🤖 Prompt for AI Agents
In scripts/ui/pokemon/attackScreen/shared.ts around line 36, there is a
redundant import of formButtonsDetailsBinding (it is already re-exported at line
19); remove the import statement at line 36 so the module uses the re-exported
symbol instead and ensure no other code relies on that direct import.
| .variableDefaults({ | ||
| pokemon_stats_index: 0, | ||
| pokemon_id_index: 1, | ||
| pokemon_name_index: 2, |
There was a problem hiding this comment.
Bug: Swapped default indices for pokemon name and id
The variableDefaults object has pokemon_id_index: 1 and pokemon_name_index: 2, but these values are swapped compared to pokemonIndexMap which defines name: 1 and id: 2. While the loop at line 153 correctly sets the values for actual pokemon slots, the incorrect defaults would cause issues if the pokemon_sidebar_pokemon template is used directly without the loop setting variables, or cause confusion during maintenance.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (8)
scripts/ui/pokemon/attackScreen/shared.ts (1)
36-36: Remove redundant import - symbol already re-exported.
formButtonsDetailsBindingis already re-exported at line 20, making the direct import at line 36 unnecessary. The code should use the re-exported symbol.Apply this diff:
-import { buttonStack, formButtonsDetailsBinding } from "../shared"; +import { buttonStack } from "../shared";The re-exported
formButtonsDetailsBindingfrom line 20 remains available for use at line 54.scripts/ui/pokemon/pokemon.ts (2)
179-211: Add state-based visibility bindings to prevent both arrow images from rendering simultaneously.The
arrowandhoverimages are both always visible as siblings without visibility bindings. This causes both the default and hover textures to render at the same time, similar to the issue flagged in the past review foracceptButton.Add visibility bindings based on button state (e.g., show default arrow when not hovered, show hover image only when hovered). Consider using variables like
$default_stateand$hover_statewith requires conditions to control which image is visible, matching the pattern used inbuttonActionRaw.
214-283: Add state-based visibility bindings to prevent both button images from rendering simultaneously.The
buttonandhoverimages at lines 227-279 are both always visible without visibility bindings. This is the same issue flagged in the previous review.Apply state-based visibility bindings so only one image is visible at a time. The hover texture should only appear on hover, not simultaneously with the default button texture.
scripts/ui/phud/phone.ts (1)
68-71: Fix extra closing parenthesis in texture expression.The texture parameter has an unbalanced parenthesis:
"('textures/ui/phud/maple_' + $name))"should be"('textures/ui/phud/maple_' + $name)". Compare with the correct pattern on Line 74.Apply this diff:
-const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name))") +const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name)") .uvSize(64, 64)scripts/ui/phud/sidebar.ts (1)
22-29: Index mapping mismatch persists between pokemonIndexMap and variableDefaults.The
pokemonIndexMapdefinesname: 1andid: 2, butvariableDefaultsat lines 127-134 haspokemon_id_index: 1andpokemon_name_index: 2(swapped). While the loop at lines 152-157 overrides these values, the inconsistent defaults are confusing and could cause issues if the template is used without overrides.Apply this diff to align defaults with the map:
.variableDefaults({ pokemon_stats_index: 0, - pokemon_id_index: 1, - pokemon_name_index: 2, + pokemon_name_index: 1, + pokemon_id_index: 2, pokemon_active_index: 3, pokemon_caughtWith_index: 4, pokemon_icon_index: 5, })scripts/ui/pokemon/pokedex.ts (1)
320-341: Duplicate control names remain in page navigation.Both page navigation controls still use the same name
"page_management@pokedex.button_stack"(lines 327 and 334), which can cause binding or identification conflicts.Apply this diff to use distinct names:
controls: [ { - "page_management@pokedex.button_stack": { + "previous_page@pokedex.button_stack": { size: [11, 26], layer: 4, $button: "pokedex.previous_page_button", }, }, { - "page_management@pokedex.button_stack": { + "next_page@pokedex.button_stack": { size: [11, 26], layer: 4, $button: "pokedex.next_page_button", }, },scripts/ui/rotomPhone/third.ts (1)
188-194: Development placeholder text still present.Line 190 contains the placeholder
"§fIDKKKK"that was flagged in previous reviews. This should be replaced with the intended production text before merging.ui/_ui_defs.json (1)
3-20: Critical: All referenced generated UI files are still missing.Previous reviews confirmed that all 18 generated files referenced here do not exist in the repository. This is a critical blocker that prevents the UI system from functioning. The TypeScript sources exist in
scripts/ui/, but the corresponding generated JSON files underui/__generated__/are absent.Either commit the generated files or run the generation step before merging.
🧹 Nitpick comments (1)
scripts/ui/pokemon/attackScreen/buttons.ts (1)
149-189: Complex string parsing for move data — ensure format is documented.The move button components use
skip()andfirst()to extract move name, type, and PP from#form_button_text. For example, line 158 extracts 30 characters starting at position 36 to build a localization key. This works but is fragile if the data format changes. Ensure the expected string format is documented in shared.ts or in comments, so future maintainers understand the layout.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (12)
ui/__generated__/chestServerForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/phone.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/phud.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/phud/sidebar.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/attackScreen.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pc.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pokedex.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pokemon.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/first.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/second.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/rotomPhone/third.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/searchServerForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**
📒 Files selected for processing (28)
scripts/ui/chestServerForm.ts(1 hunks)scripts/ui/hud_screen.ts(1 hunks)scripts/ui/phud/actionbar.ts(1 hunks)scripts/ui/phud/battleWait.ts(1 hunks)scripts/ui/phud/currency.ts(1 hunks)scripts/ui/phud/evolutionWait.ts(1 hunks)scripts/ui/phud/loadingScreen.ts(1 hunks)scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/phud.ts(1 hunks)scripts/ui/phud/playerPing.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)scripts/ui/pokemon/attackScreen/actors.ts(1 hunks)scripts/ui/pokemon/attackScreen/buttons.ts(1 hunks)scripts/ui/pokemon/attackScreen/index.ts(1 hunks)scripts/ui/pokemon/attackScreen/progress.ts(1 hunks)scripts/ui/pokemon/attackScreen/shared.ts(1 hunks)scripts/ui/pokemon/pc.ts(1 hunks)scripts/ui/pokemon/pokedex.ts(1 hunks)scripts/ui/pokemon/pokemon.ts(1 hunks)scripts/ui/pokemon/shared.ts(1 hunks)scripts/ui/rotomPhone/first.ts(1 hunks)scripts/ui/rotomPhone/second.ts(1 hunks)scripts/ui/rotomPhone/shared.ts(1 hunks)scripts/ui/rotomPhone/third.ts(1 hunks)scripts/ui/searchServerForm.ts(1 hunks)scripts/ui/serverForm.ts(1 hunks)ui/_ui_defs.json(1 hunks)ui/server_form.json(11 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
- scripts/ui/serverForm.ts
- scripts/ui/phud/actionbar.ts
- scripts/ui/phud/evolutionWait.ts
- scripts/ui/phud/currency.ts
- scripts/ui/chestServerForm.ts
- scripts/ui/rotomPhone/second.ts
- scripts/ui/pokemon/attackScreen/progress.ts
- scripts/ui/phud/loadingScreen.ts
🧰 Additional context used
🧬 Code graph analysis (3)
scripts/ui/pokemon/attackScreen/shared.ts (1)
scripts/ui/pokemon/shared.ts (2)
formButtonsDetailsBinding(39-40)buttonStack(90-90)
scripts/ui/pokemon/attackScreen/index.ts (4)
scripts/ui/pokemon/attackScreen/shared.ts (2)
NS(39-39)registerSharedElements(76-81)scripts/ui/pokemon/attackScreen/progress.ts (2)
registerProgressElements(68-97)registerPpBarVariants(104-120)scripts/ui/pokemon/attackScreen/buttons.ts (1)
registerButtonElements(242-343)scripts/ui/pokemon/attackScreen/actors.ts (1)
registerActorElements(137-264)
scripts/ui/pokemon/pokemon.ts (1)
scripts/ui/pokemon/shared.ts (1)
buttonStack(90-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (11)
scripts/ui/phud/phud.ts (1)
15-73: LGTM! Clean data-driven refactor.The data-driven approach using
HUD_COMPONENTSarray is well-structured. The intentional exclusion ofplayerPingfrom controls (handled by hud_screen) is clearly documented.scripts/ui/pokemon/attackScreen/index.ts (1)
15-134: LGTM! Well-structured battle UI composition.The module registration follows proper dependency order, and the UI hierarchy is clearly organized. The composition pattern effectively combines all battle screen modules.
scripts/ui/pokemon/attackScreen/actors.ts (1)
1-264: LGTM! Clean actor element structure.The module provides a well-organized API for battle actor UI elements with proper separation of concerns. The integration with progress elements for HP bars is cleanly implemented.
scripts/ui/phud/battleWait.ts (1)
1-54: LGTM! Clean battle wait overlay implementation.The battle wait HUD is well-structured with appropriate bindings for visibility and battle log text display.
scripts/ui/phud/playerPing.ts (1)
1-26: LGTM! Clean player ping HUD implementation.The player ping component is well-structured with appropriate visibility bindings and styling.
scripts/ui/pokemon/attackScreen/buttons.ts (3)
42-65: Well-structured button base implementation.The simple button template properly extends the common button framework and correctly wires state transitions (default/hover/pressed/locked) using shared state variables. The binding chain ensures button textures and enabled state are synchronized with form data.
310-330: LGTM: Grid button layout logic is clear and correct.The grid button positions are well-organized with the 4 offsets matching the expected layout. The icon offset calculation (line 319-321) correctly places icons on the left side for the first two buttons and the right side for the last two, as documented in the inline comment.
227-343: Excellent registration pattern for button elements.The
ButtonElementsinterface andregisterButtonElements()function provide a clean, type-safe API for registering and accessing battle UI buttons. This pattern centralizes element creation, maintains proper registration order, and gives consumers strongly-typed references to all button components.ui/server_form.json (3)
255-268: LGTM: Server form factory properly configured.The
ng_main_screen_contentpanel correctly wraps theserver_form_factoryand maps the form types to their corresponding implementations. This follows the standard Bedrock UI factory pattern for multi-form screens.
269-278: LGTM: Screen configuration follows standard pattern.The
third_party_server_screenproperly extends the base screen, references the main content panel, and maps the cancel button to exit. This is a standard Bedrock UI screen configuration.
19-252: <function_calls>
#!/bin/bashSearch for where pokemon namespace might be defined
echo "=== Searching for 'pokemon' namespace definition ==="
rg '"pokemon"' --type json -n | grep -E '(namespace|ui)' | head -20echo -e "\n=== Checking ui directory contents ==="
ls -la ui/ 2>/dev/nullecho -e "\n=== Checking for generated or generated directories ==="
find . -type d ( -name "generate" -o -name "generated" ) 2>/dev/nullecho -e "\n=== Listing all JSON files in ui directory ==="
find ui -name "*.json" -type f 2>/dev/null | sortecho -e "\n=== Looking for .gitignore to check if files are ignored ==="
cat .gitignore 2>/dev/null | grep -E "(generate|generated|ui)"
Let me also search for where these form references are actually used:
<function_calls>
#!/bin/bash
echo "=== Searching for references to @pokemon.main pattern ==="
rg '@pokemon.main|@pokedex.main|@battle.main' -n --type jsonecho -e "\n=== Checking if there are any TypeScript/JavaScript files that might define these ==="
find . -type f ( -name ".ts" -o -name ".js" ) | head -20echo -e "\n=== Searching for 'pokemon' in all file types ==="
rg 'pokemon.main' -n | head -20
| label: { | ||
| type: "label", | ||
| layer: 99, | ||
| size: [70, 20], | ||
| anchor_from: "top_middle", | ||
| anchor_to: "top_middle", | ||
| offset: [93, "39.5%"], | ||
| font_scale_factor: 0.8, | ||
| text: "#form_text", | ||
| }, |
There was a problem hiding this comment.
Add missing binding for #form_text label.
The label element uses text: "#form_text" without a bindings declaration, which will display the literal string "#form_text" instead of the bound value. The title label above it correctly includes bindings: [globalBinding("#title_text")].
This issue affects all Rotom Phone pages (first, second, third) that use createTopSection.
Apply this diff:
{
label: {
type: "label",
layer: 99,
size: [70, 20],
anchor_from: "top_middle",
anchor_to: "top_middle",
offset: [93, "39.5%"],
font_scale_factor: 0.8,
text: "#form_text",
+ bindings: [globalBinding("#form_text")],
},
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| label: { | |
| type: "label", | |
| layer: 99, | |
| size: [70, 20], | |
| anchor_from: "top_middle", | |
| anchor_to: "top_middle", | |
| offset: [93, "39.5%"], | |
| font_scale_factor: 0.8, | |
| text: "#form_text", | |
| }, | |
| label: { | |
| type: "label", | |
| layer: 99, | |
| size: [70, 20], | |
| anchor_from: "top_middle", | |
| anchor_to: "top_middle", | |
| offset: [93, "39.5%"], | |
| font_scale_factor: 0.8, | |
| text: "#form_text", | |
| bindings: [globalBinding("#form_text")], | |
| }, |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/shared.ts around lines 281 to 290, the label element
sets text: "#form_text" but lacks a bindings declaration so the literal string
will be displayed; add a bindings property mirroring the title label (e.g.,
bindings: [globalBinding("#form_text")]) so the label receives the bound value;
update the createTopSection label definition to include that bindings array.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (2)
scripts/ui/phud/sidebar.ts (1)
127-134: Align default indices with pokemonIndexMap.The
variableDefaultsstill haspokemon_id_index: 1andpokemon_name_index: 2, which are swapped compared topokemonIndexMap(name: 1, id: 2). While the loop at lines 152-157 correctly applies the map values to all slots, the inconsistent defaults create a maintenance hazard.Note: This issue was flagged in multiple previous reviews and marked as addressed in commit 28183d6, but the inconsistency persists.
Apply this diff to align the defaults with the map:
.variableDefaults({ pokemon_stats_index: 0, - pokemon_id_index: 1, - pokemon_name_index: 2, + pokemon_name_index: 1, + pokemon_id_index: 2, pokemon_active_index: 3, pokemon_caughtWith_index: 4, pokemon_icon_index: 5, })scripts/ui/phud/phone.ts (1)
68-71: Fix extra closing parenthesis in texture expression.The texture expression has an extra closing parenthesis that will cause a parsing error:
"('textures/ui/phud/maple_' + $name))"should be"('textures/ui/phud/maple_' + $name)".Note: This issue was previously flagged and marked as addressed in commit ea33c9e, but the error still persists in the current code.
Apply this diff:
- const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name))") + const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name)") .uvSize(64, 64) .bindings(phudPhoneBinding("#value")) .addToNamespace(ns);
🧹 Nitpick comments (2)
scripts/ui/phud/phone.ts (1)
57-66: TODO: Consider refactoring to match phudText pattern.The developer note suggests this could be cleaned up to read the image binding name more elegantly, similar to the phudText pattern used elsewhere.
Would you like me to help refactor this to match the phudText pattern, or open an issue to track this improvement?
scripts/ui/pokemon/pc.ts (1)
253-263: Verify rootmainpanel sizing/anchoring vs previous.fullSize().anchor("center").The prior version had
stackPanel("main").horizontal().fullSize().anchor("center"); the new code usesstackPanel("main", "horizontal").offset("25%", "25%")without.fullSize()or.anchor("center"). Depending onmcbe-ts-uidefaults, this might change how the PC UI is positioned/scaled on screen.If the intent is to preserve the old layout, consider restoring those calls:
- return ns.setMain( - stackPanel("main", "horizontal") - .offset("25%", "25%") + return ns.setMain( + stackPanel("main", "horizontal") + .fullSize() + .anchor("center") + .offset("25%", "25%") .controls( leftContentBox, panel("spacer1").size(2), centerGridNs, panel("spacer2").size(1), rightContentNs ) );
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
scripts/ui/phud/phone.ts(1 hunks)scripts/ui/phud/phud.ts(1 hunks)scripts/ui/phud/sidebar.ts(1 hunks)scripts/ui/pokemon/pc.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/ui/pokemon/pc.ts (2)
scripts/ui/pokemon/attackScreen/shared.ts (5)
formButtonEnabledBindings(24-24)formButtonTextLabelBindings(25-25)formButtonImageBindings(26-26)simpleButtonTextures(28-28)visibilityForId(19-19)scripts/ui/pokemon/shared.ts (6)
formButtonEnabledBindings(100-108)formButtonTextLabelBindings(114-117)formButtonImageBindings(122-125)simpleButtonTextures(155-163)buttonStack(90-90)visibilityForId(28-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (4)
scripts/ui/phud/phud.ts (1)
15-120: LGTM! Clean registry-driven architecture.The refactored HUD_COMPONENTS registry pattern provides excellent maintainability and eliminates code duplication. The dynamic generation of sibling bindings and element refs is well-structured. The intentional exclusion of playerPing from elementRefs (line 71 comment) is correctly implemented since it's handled by hud_screen rather than requiring a separate namespace.
scripts/ui/pokemon/pc.ts (3)
32-59: Button templates and stack usage look consistent and reusable.The base
formButton, sharedbuttonNs, and the specific variants (left/right arrows, icon, action) are wired cleanly throughsimpleButtonTextures,visibilityForId, andbuttonStack.addToNamespace(ns). This should keep behavior consistent across the PC UI and other screens that share these helpers.Also applies to: 130-199, 200-224, 236-251
60-93: Left content panel faithfully mirrors legacyform_textbehavior.The header/body labels correctly reuse the prior
first(40, ...)/skip(40, ...)truncation withstrip(...), and the close button extension matches the legacycommon.light_close_buttonsetup. This should preserve the original text layout and close behavior.
94-115: I'll help you verify the review comment about thecontainer_slotswidth change. Let me examine the codebase to understand if this is a legitimate concern.
<function_calls>
cat -n scripts/ui/pokemon/pc.ts | sed -n '80,130p'
</function_calls>Let me start by viewing the file and checking the current code state:
<function_calls>
wc -l scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
cat -n scripts/ui/pokemon/pc.ts | sed -n '85,120p'
</function_calls>Now let me check the git history to see what changed:
<function_calls>
git log --oneline -10 scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
git show HEAD:scripts/ui/pokemon/pc.ts | sed -n '85,120p'
</function_calls>Let me also search for how
size()is used elsewhere and understand what "default" means:
<function_calls>
rg -n ".size(" scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
rg -C3 ".size("default"" --type=ts
</function_calls><function_calls>
find . -name ".ts" -o -name ".js" | head -20
</function_calls>Let me check the git diff to see exactly what changed:
<function_calls>
git diff HEAD^ HEAD -- scripts/ui/pokemon/pc.ts | head -100
</function_calls><function_calls>
git log --all --oneline -- scripts/ui/pokemon/pc.ts | head -20
</function_calls>Let me check the actual branch state and diff:
<function_calls>
git status
</function_calls><function_calls>
git log --all --pretty=format:"%H %s" | head -20
</function_calls><function_calls>
git rev-parse HEAD
</function_calls>Let me search for documentation or framework definitions about the size method:
<function_calls>
rg -n "size.*100%" --type=ts scripts/
</function_calls><function_calls>
find . -type f ( -name ".md" -o -name ".txt" ) | xargs grep -l "size|width|default" 2>/dev/null | head -10
</function_calls>Let me search more broadly in the scripts directory for how container or grid sizing works:
<function_calls>
rg -n "container.*size|size.*100" scripts/ui/ -A2 -B2
</function_calls><function_calls>
ls -la scripts/ui/pokemon/
</function_calls><function_calls>
head -50 scripts/ui/pokemon/pc.ts
</function_calls>Let me check if there are any imports or definitions that explain what framework is being used:
<function_calls>
head -20 scripts/ui/pokemon/pc.ts && echo "..." && tail -20 scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
cat scripts/ui/pokemon/pc.ts | grep -n "import|from" | head -20
</function_calls>Now let me search for how the legacy code looked - let me check git history more thoroughly:
<function_calls>
git log --all --source --oneline scripts/ui/pokemon/pc.ts 2>&1 | head -30
</function_calls><function_calls>
git show HEAD:scripts/ui/pokemon/pc.ts 2>&1 | head -130 | tail -50
</function_calls>Let me check if there's a parent commit:
<function_calls>
git log -2 --oneline
</function_calls>Let me search for any other PC UI files or related tests:
<function_calls>
find . -path "/ui/" -name "pc" -o -path "/ui/" -name "chest" 2>/dev/null
</function_calls><function_calls>
rg "container_slots|small_chest_grid" --type=ts
</function_calls>Let me check the broader repository structure to understand the project:
<function_calls>
ls -la
</function_calls><function_calls>
cat -n scripts/ui/pokemon/pc.ts 2>&1 | sed -n '1,150p' | tail -75
</function_calls>Let me try a different approach and look at the entire file more carefully:
<function_calls>
sed -n '85,125p' scripts/ui/pokemon/pc.ts
</function_calls>Perfect! Now let me search for how other elements use size() to understand the pattern:
<function_calls>
sed -n '1,200p' scripts/ui/pokemon/pc.ts | grep -n ".size("
</function_calls><function_calls>
sed -n '85,200p' scripts/ui/pokemon/pc.ts
</function_calls>Now let me check if there's documentation or type definitions for the size method:
<function_calls>
rg -n "function size|.size\s*=|size.*parameter" scripts/ --type=ts -B2 -A5
</function_calls><function_calls>
find . -type f -name "*.json" | xargs grep -l ""default"" 2>/dev/null | head -5
</function_calls>Let me check if there are any test files or examples showing the intended behavior:
<function_calls>
find . -path "/test" -name ".ts" -o -path "/test*" -name "*.js" 2>/dev/null | head -10
</function_calls><function_calls>
rg "100%" scripts/ui/ --type=ts -B3 -A3
</function_calls>Now let me look at the entire structure of the pc.ts file around the code in question:
<function_calls>
sed -n '1,150p' scripts/ui/pokemon/pc.ts
</function_calls>Based on the code, let me search for the framework being used to understand what "default" means:
<function_calls>
head -40 scripts/ui/pokemon/pc.ts
</function_calls>Let me check where grid, image, and other functions are imported from:
<function_calls>
grep "^import|^export|from ['"]" scripts/ui/pokemon/pc.ts | head -30
</function_calls><function_calls>
cat scripts/ui/pokemon/pc.ts | head -50
</function_calls>Let me check a parent directory to understand the broader structure:
<function_calls>
ls -la scripts/ui/
</function_calls><function_calls>
head -100 scripts/ui/shared.ts 2>/dev/null | tail -50
</function_calls>Let me try searching across the entire scripts directory for where these functions are defined:
<function_calls>
rg "export.*function\s+(grid|image|size)" scripts/ --type=ts -A3
</function_calls><function_calls>
rg "class.*Builder|.size(" scripts/ui/ --type=ts | head -30
</function_calls>Let me look at simpler comparisons - what other images use and compare their sizing:
<function_calls>
rg "image(" scripts/ui/pokemon/pc.ts -A5
</function_calls><function_calls>
sed -n '90,120p' scripts/ui/pokemon/pc.ts
</function_calls>Based on my analysis of the code, let me check if there are any comments or patterns in the git history:
<function_calls>
python3 << 'EOF'Check the full context around lines 94-115
with open('scripts/ui/pokemon/pc.ts', 'r') as f:
lines = f.readlines()
for i in range(85, min(125, len(lines))):
print(f"{i+1:3d}: {lines[i]}", end='')
EOF
</function_calls>Let me check if there are any configuration files or examples showing what "default" means in the context of sizing:
<function_calls>
find . -name ".json" -o -name ".yaml" -o -name ".config." 2>/dev/null | head -20
</function_calls><function_calls>
rg ""default"|'default'" . --type=json --type=yaml 2>/dev/null | grep -i "size|width" | head -20
</function_calls>Let me look at other usages of partySlots and container elements to understand the pattern:
<function_calls>
grep -n "party_slots|container_slots|.size(" scripts/ui/pokemon/pc.ts
</function_calls>Let me check the structure more carefully around the grid and its dimensions:
<function_calls>
sed -n '94,115p' scripts/ui/pokemon/pc.ts
</function_calls>Now let me search for any references to "100%" width in similar UI files to see if that was a common pattern:
<function_calls>
rg "100%" scripts/ui/ --type=ts
</function_calls>Let me check if there are any other branches or files that might show the legacy code:
<function_calls>
git branch -a
</function_calls><function_calls>
git log --all --diff-filter=M -- scripts/ui/pokemon/pc.ts | head -40
</function_calls>Let me try a more systematic approach to find the size method definition:
<function_calls>
rg -n ".size\s*(" scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
python3 << 'EOF'Extract all size() calls with context
import re
with open('scripts/ui/pokemon/pc.ts', 'r') as f:
content = f.read()
matches = re.finditer(r'.size([^)]*)', content)
for match in matches:
start = max(0, match.start() - 60)
end = min(len(content), match.end() + 60)
context = content[start:end]
print(f"--- Match: {match.group()} ---")
print(context)
print()
EOF
</function_calls>Let me check commit messages and recent changes to see if there's context about this:
<function_calls>
git log --all -p -- scripts/ui/pokemon/pc.ts 2>&1 | head -200
</function_calls><function_calls>
git log --oneline --all -- scripts/ui/pokemon/pc.ts
</function_calls><function_calls>
git show --stat HEAD
</function_calls><function_calls>
git diff --name-only HEAD~5..HEAD 2>/dev/null | head -20
</function_calls>Let me check if there are any issues or test files mentioning this:
<function_calls>
rg "container.*width|100%|default.*size" . --type=json --type=md 2>/dev/null
</function_calls><function_calls>
find . -name ".md" -o -name ".txt" 2>/dev/null | xargs grep -l "container_slots|pc.ts" 2>/dev/null
</function_calls>Let me check if there's documentation about the UI framework being used:
<function_calls>
find . -name "*.md" 2>/dev/null | xargs cat 2>/dev/null | grep -i "size|width|100%" | head -20
</function_calls>Let me look at the grid dimensions more carefully - if the container background is supposed to match the grid:
<function_calls>
python3 << 'EOF'Analyze the dimensions
grid_cols = 6
grid_rows = 6
grid_width = 108
grid_height = 118container_width_default = "default (unknown)"
container_height = 105
party_slots_height = 26print(f"Grid dimensions: {grid_cols}×{grid_rows}")
print(f"Grid size: {grid_width}×{grid_height}")
print(f"Container background: {container_width_default} × {container_height}")
print(f"Party slots: default × {party_slots_height}")
print(f"\nTotal items that should fit in container: {grid_cols * grid_rows} = 36")
print(f"Each cell would be approximately: {grid_width/grid_cols}×{grid_height/grid_rows}")
EOF
</function_calls>Based on my investigation, I cannot find evidence supporting the claim about "100%" in the current codebase. Let me make one final search:
<function_calls>
rg -i "100%|full.width|span" . --type=ts --type=json | grep -i "size|width|container"
</function_calls>Let me check if there's a parent directory with older versions or previous code:
<function_calls>
git log --all --source --oneline | head -50
</function_calls>Based on my thorough investigation, here are the findings:
Unable to verify the claim about the "100%" to "default" width change.
I thoroughly searched the codebase and cannot find any evidence of:
- The current code ever using
"100%"insize()calls- Any
"100%"string anywhere inscripts/ui/- Git history showing this change from
["100%", 105]to"default"- Framework documentation explaining what
"default"means vs"100%"The current code at lines 105-110 uses
.size("default", 105)forcontainerSlotsBackground, which is consistent with other size() calls throughout the UI files (e.g., line 112 also uses.size("default", 26)). Without access to the "legacy version" referenced in the review or the framework's documentation, I cannot verify whether:
"default"is the intended value- It actually causes visual misalignment
- A change was even made
116757e to
5b4c38d
Compare
| binding_name: "#null", | ||
| binding_type: "view", | ||
| source_property_name: | ||
| "(not ((%.1s * #hud_title_text_string ) = '&_'))", |
There was a problem hiding this comment.
Format specifier length mismatch in visibility binding
The expression (not ((%.1s * #hud_title_text_string ) = '&_')) uses %.1s to extract 1 character but compares it to '&_' which is 2 characters. A 1-character string can never equal a 2-character string, so this comparison is always false, making not false = true - the element is always visible. Based on the codebase pattern (e.g., %.4s with 'cht:', %.8s with 'textures'), this should use %.2s to properly check if the title starts with the 2-character prefix &_. This bug prevents hiding the title background/text when PHUD updates are displayed.
Additional Locations (1)
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (7)
scripts/ui/chestServerForm.ts (2)
643-654: Incorrect grid name - copy-paste error (previously flagged).The grid inside
backpack_gridis namedquest_chest_gridwhich should bebackpack_chest_gridfor consistency.🔎 Proposed fix
{ - quest_chest_grid: { + backpack_chest_grid: { type: "grid", grid_dimensions: [9, 10],
671-682: Incorrect grid name - copy-paste error (previously flagged).The grid inside
auction_house_gridis namedquest_chest_gridwhich should beauction_house_chest_gridfor consistency.🔎 Proposed fix
{ - quest_chest_grid: { + auction_house_chest_grid: { type: "grid", grid_dimensions: [9, 6],scripts/ui/rotomPhone/second.ts (1)
127-127: Inconsistent button texture paths.This page uses
FORM_TEXTURES(path:textures/ui/form_btn_background) while first.ts and third.ts useDEFAULT_TEXTURES(path:textures/ui/gui/rotom_phone/form_btn_background). The missinggui/rotom_phone/subdirectory would cause buttons to reference different textures or fail to load.🔎 Proposed fix
- createButtonTemplate(ns, { textures: FORM_TEXTURES }); + createButtonTemplate(ns, { textures: DEFAULT_TEXTURES });scripts/ui/rotomPhone/shared.ts (1)
281-290: Missing binding for#form_textlabel.The label uses
text: "#form_text"without abindingsarray, which will display the literal string instead of the bound value. Thetitlelabel above (line 277) correctly includesbindings: [globalBinding("#title_text")]. This issue affects all Rotom Phone pages that usecreateTopSection.🔎 Proposed fix
{ label: { type: "label", layer: 99, size: [70, 20], anchor_from: "top_middle", anchor_to: "top_middle", offset: [93, "39.5%"], font_scale_factor: 0.8, text: "#form_text", + bindings: [globalBinding("#form_text")], }, },scripts/ui/phud/currency.ts (1)
38-44: Fix unresolved placeholder in currencyLabel binding.The
currencyLabelbinding passes"${prop}"as a literal string toskipStripped, which results in an unresolved placeholder in the generated JSON. This breaks the currency display. Replace"${prop}"with the actual property name"#level_number".🔎 Proposed fix
const currencyLabel = boundLabel("currency_label") .layer(3) .fontScaleFactor(FONT_SCALE) .color(COLOR) .bindings( - phudRead("#level_number", "#text", skipStripped(VARIABLE_SIZE, "${prop}")) + phudRead("#level_number", "#text", skipStripped(VARIABLE_SIZE, "#level_number")) );Based on past review comments, this issue was already identified but not yet resolved.
scripts/ui/phud/phone.ts (1)
68-71: Fix extra closing parenthesis in texture expression.The
jebIcontexture expression has an unbalanced parenthesis:"('textures/ui/phud/maple_' + $name))"should be"('textures/ui/phud/maple_' + $name)". This will cause a parsing error.🔎 Proposed fix
- const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name))") + const jebIcon = image("jeb_icon", "('textures/ui/phud/maple_' + $name)") .uvSize(64, 64) .bindings(phudPhoneBinding("#value")) .addToNamespace(ns);Based on past review comments, this issue was marked as addressed in commit ea33c9e, but it still appears in the current code.
scripts/ui/phud/sidebar.ts (1)
22-29: Index mapping mismatch betweenpokemonIndexMapandvariableDefaultspersists.The
pokemonIndexMapdefinesname: 1andid: 2(lines 24-25), butvariableDefaultshaspokemon_id_index: 1andpokemon_name_index: 2(lines 129-130). These values are swapped. While the loop at lines 153-157 correctly applies thepokemonIndexMapvalues for each slot, the defaults remain inconsistent and could cause issues if the template is used without the loop override.🔎 Proposed fix to align defaults with the map
.variableDefaults({ pokemon_stats_index: 0, - pokemon_id_index: 1, - pokemon_name_index: 2, + pokemon_name_index: 1, + pokemon_id_index: 2, pokemon_active_index: 3, pokemon_caughtWith_index: 4, pokemon_icon_index: 5, })Also applies to: 127-134
🧹 Nitpick comments (12)
scripts/ui/pokemon/attackScreen/actors.ts (1)
64-66: Consider extracting thespacerPanelhelper to the shared module.This utility function creates simple spacer panels and could be useful in other UI modules. Since
shared.tsalready provides shared utilities, this could be a candidate for reuse.scripts/ui/pokemon/attackScreen/progress.ts (4)
23-35: Magic offsetskip(2, ...)should be documented.The
skip(2, "#form_button_texture")binding extracts data from a specific position in the texture string. Consider adding a brief comment explaining what data resides at offset 2.
37-56: Complex binding expressions with undocumented offsets.Lines 49 and 53 use
skip(60, ...)andskip(58, ...)to extract HP ratio and color ID from#form_button_text. These magic numbers make the code fragile to data format changes. Consider documenting the expected text format or extracting these offsets as named constants.// Example: Document expected format or use constants const HP_RATIO_OFFSET = 60; const HP_RATIO_LENGTH = 3; const COLOR_ID_OFFSET = 58;
74-96: Duplicate dynamic progress bar construction.The dynamic progress bar with color variants (green/yellow/red) is constructed identically here and in
createDynamicProgressBar(lines 126-140). This violates DRY. Consider havingregisterProgressElementscallcreateDynamicProgressBarinternally.🔎 Proposed refactor
export function registerProgressElements( ns: NamespaceBuilder ): ProgressElements { const ppBarNs = ppBar.addToNamespace(ns); const variableProgressBarNs = variableProgressBar.addToNamespace(ns); - // Dynamic progress bar with color variants (green/yellow/red) - const dynamicProgressBarNs = panel("dynamic_progress_bar") - .controls( - extendRaw("empty_progress_bar", "common.empty_progress_bar", { - layer: 1, - }), - extend("green", variableProgressBarNs) - .variable("color_id", "G") - .color([0.5, 1.0, 0.5, 1.0]), - extend("yellow", variableProgressBarNs) - .variable("color_id", "Y") - .color([1, 0.9, 0, 1.0]), - extend("red", variableProgressBarNs) - .variable("color_id", "R") - .color([1, 0, 0, 1.0]) - ) - .addToNamespace(ns); + // Dynamic progress bar with color variants (green/yellow/red) + const dynamicProgressBarNs = createDynamicProgressBar(variableProgressBarNs) + .addToNamespace(ns); return { ppBar: ppBarNs, variableProgressBar: variableProgressBarNs, dynamicProgressBar: dynamicProgressBarNs, }; }
122-141: Clarify the relationship betweenregisterProgressElementsandcreateDynamicProgressBar.The JSDoc comment mentions "Must be called after registerProgressElements" but
createDynamicProgressBarcan actually be called independently with anyvariableProgressBarNs. The comment is misleading since it doesn't depend on the registration, only on having a namespace reference./** - * Get the dynamic progress bar builder for use in other modules. - * Note: Must be called after registerProgressElements to get the registered version. + * Creates a dynamic progress bar panel with color variants (green/yellow/red). + * @param variableProgressBarNs - A registered variable progress bar namespace element */scripts/ui/pokemon/attackScreen/index.ts (1)
124-128: Unused destructured value fromns.add().The pattern
[, finalNs]discards the first element. While this works, it's slightly unusual. Ifns.add()returns[element, namespace]and only the namespace is needed, this is fine but could benefit from a brief comment.scripts/ui/searchServerForm.ts (1)
54-68: Consider removing @ts-ignore if type definitions can be updated.The
@ts-ignorecomment on line 58 suppresses a type error for themax_lengthproperty. Ifmcbe-ts-uitype definitions are incomplete or incorrect, consider contributing the proper types upstream or using a more specific type assertion.scripts/ui/hud_screen.ts (1)
147-148: TODO comment indicates incomplete work.The comment suggests mapping conversion isn't finalized. Consider tracking this as a follow-up task.
Would you like me to open an issue to track this TODO?
scripts/ui/pokemon/shared.ts (1)
114-117: Consider extracting the magic number 25 to a named constant.The default
skipChars = 25for button metadata prefix could be clearer as a named constant likeBUTTON_TEXT_METADATA_PREFIX_LENGTH.🔎 Proposed refactor
+// Button text metadata prefix length (first 25 chars contain button state/type info) +const BUTTON_TEXT_METADATA_PREFIX_LENGTH = 25; + /** * Creates bindings for button text display. * Strips and skips the first 25 characters (button metadata prefix). */ -export const formButtonTextLabelBindings = (skipChars = 25): Binding[] => [ +export const formButtonTextLabelBindings = (skipChars = BUTTON_TEXT_METADATA_PREFIX_LENGTH): Binding[] => [ formButtonTextBinding(), viewBinding(strip(skip(skipChars, "#form_button_text")), "#text"), ];scripts/ui/pokemon/pc.ts (1)
173-174: TODO: Make textures type safe.This TODO indicates incomplete work on texture path type safety.
Would you like me to open an issue to track implementing type-safe texture paths?
scripts/ui/pokemon/pokemon.ts (2)
82-91: Consider using the sharedbuttonStackinstead of defining locally.This local
buttonStackdefinition duplicates the pattern fromscripts/ui/pokemon/shared.ts(line 89). Consider importing and usingcreateButtonStackorbuttonStackfrom the shared module to reduce duplication.🔎 Proposed refactor
+import { createButtonStack } from "./shared"; + -// Button stack factory -const buttonStack = stackPanel("button_stack", "vertical") - .size("100%", "100%c") - .anchor("top_left") - .rawProp("$button|default", "default_form.button") - .rawProp("factory", { name: "buttons", control_name: "$button" }) - .rawProp("collection_name", "form_buttons") - .bindings( - ...factoryBindings(), - viewBinding(contains("#title_text", "§s"), "#visible") - ); +// Button stack factory with custom visibility binding +const buttonStack = createButtonStack() + .bindings(viewBinding(contains("#title_text", "§s"), "#visible"));
108-109: Multiple@ts-ignorecomments forfont_typeproperty.There are five instances of
@ts-ignoreforfont_type: "MinecraftTen"orfont_type: "default". This suggests a type definition gap in mcbe-ts-ui. Consider contributing the missing type definition upstream or adding a local type augmentation.Also applies to: 236-237, 263-264, 367-368, 383-384
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (33)
.coderabbit.yaml.copilotignore.cursorignore.gitattributes.vscode/settings.jsonpackage.jsonscripts/ui/README.mdscripts/ui/chestServerForm.tsscripts/ui/hud_screen.tsscripts/ui/phud/actionbar.tsscripts/ui/phud/battleWait.tsscripts/ui/phud/currency.tsscripts/ui/phud/evolutionWait.tsscripts/ui/phud/loadingScreen.tsscripts/ui/phud/phone.tsscripts/ui/phud/phud.tsscripts/ui/phud/playerPing.tsscripts/ui/phud/sidebar.tsscripts/ui/pokemon/attackScreen/actors.tsscripts/ui/pokemon/attackScreen/buttons.tsscripts/ui/pokemon/attackScreen/index.tsscripts/ui/pokemon/attackScreen/progress.tsscripts/ui/pokemon/attackScreen/shared.tsscripts/ui/pokemon/pc.tsscripts/ui/pokemon/pokedex.tsscripts/ui/pokemon/pokemon.tsscripts/ui/pokemon/shared.tsscripts/ui/rotomPhone/first.tsscripts/ui/rotomPhone/second.tsscripts/ui/rotomPhone/shared.tsscripts/ui/rotomPhone/third.tsscripts/ui/searchServerForm.tsscripts/ui/serverForm.ts
✅ Files skipped from review due to trivial changes (1)
- .cursorignore
🚧 Files skipped from review as they are similar to previous changes (10)
- .gitattributes
- scripts/ui/rotomPhone/first.ts
- package.json
- .coderabbit.yaml
- scripts/ui/pokemon/pokedex.ts
- scripts/ui/pokemon/attackScreen/buttons.ts
- scripts/ui/phud/phud.ts
- scripts/ui/pokemon/attackScreen/shared.ts
- scripts/ui/phud/actionbar.ts
- scripts/ui/rotomPhone/third.ts
🧰 Additional context used
🧬 Code graph analysis (3)
scripts/ui/pokemon/pokemon.ts (1)
scripts/ui/pokemon/shared.ts (1)
buttonStack(90-90)
scripts/ui/pokemon/pc.ts (1)
scripts/ui/pokemon/shared.ts (6)
formButtonEnabledBindings(100-108)formButtonTextLabelBindings(114-117)formButtonImageBindings(122-125)simpleButtonTextures(155-163)buttonStack(90-90)visibilityForId(28-29)
scripts/ui/pokemon/attackScreen/index.ts (4)
scripts/ui/pokemon/attackScreen/shared.ts (2)
NS(39-39)registerSharedElements(76-81)scripts/ui/pokemon/attackScreen/progress.ts (2)
registerProgressElements(68-97)registerPpBarVariants(104-120)scripts/ui/pokemon/attackScreen/buttons.ts (1)
registerButtonElements(242-343)scripts/ui/pokemon/attackScreen/actors.ts (1)
registerActorElements(137-264)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (34)
.copilotignore (1)
1-2: ✓ LGTM – Correct ignore pattern for Copilot.The file correctly excludes generated code directories from Copilot processing, which aligns well with the PR's strategy to separate hand-authored sources from generated assets. The pattern and comment are clear and consistent with similar ignore rules added elsewhere in the PR.
scripts/ui/pokemon/attackScreen/actors.ts (6)
1-26: LGTM on imports and module structure.The module is well-organized with clear section separators and proper TypeScript imports. The separation of concerns between entity icons, descriptions, and buttons is clean.
32-44: Entity icon implementation looks correct.The
entityIconproperly binds texture data from form buttons using collection bindings. Layer 25 ensures proper z-ordering.
68-78: Text truncation viastrip(first(58, ...))may cause unexpected display behavior.The label binds to the first 58 characters of the button text. If the text contains Minecraft formatting codes (like
§), this fixed offset could cut mid-code or mid-word. Verify this offset works correctly with actual battle data.
122-132: Well-defined interface for actor elements.The
ActorElementsinterface provides clear typing for all registered namespace elements, enabling type-safe usage in consuming modules.
216-251: Actor ID arrays use section sign (§) formatting codes correctly.The IDs like
"§0§0§1"and"§0§a§1"follow Minecraft's formatting code convention. The loop properly generates controls for each actor position.
253-264: Clean return of all registered namespace elements.The function properly returns all registered elements, enabling the calling module to reference them for composition.
scripts/ui/pokemon/attackScreen/progress.ts (2)
1-21: Clean module structure with proper imports.The imports are well-organized and the module header clearly describes its purpose.
104-120: PP bar variant generation is well-implemented.The loop correctly generates 22 variants (null + 0-20) with appropriate sizing calculations. The width formula
i * 1.965appears to be calibrated for the UI layout.scripts/ui/pokemon/attackScreen/index.ts (5)
1-14: Clean module composition with well-ordered dependencies.The imports and dependency registration order (shared → progress → ppBarVariants → buttons → actors) correctly respects the inter-module dependencies documented in the relevant code snippets.
15-24: Module registration follows a clear dependency chain.The sequential registration ensures each module has access to its dependencies:
progressdepends onnsonlyregisterPpBarVariantsdepends onprogress.ppBarbuttonsdepends onsharedactorsdepends onprogress
44-56: Verify thatalpha(0)onbuttonGridMiddleis intentional.Setting
alpha(0)makes this container fully transparent. If this is intentional (using it purely for layout/positioning of child controls), consider adding a comment. If the container should be visible, this may be a bug.
71-77: TheinfoLabeluses"#form_text"binding which differs from other bindings.Other elements use
"#form_button_text"for text bindings, butinfoLabeluses"#form_text". Verify this is the correct binding source for battle info text.
130-134: Configuration options are clear and match directory structure.The
filename: "attackScreen"andsubdir: "pokemon"properly configure the output path for generated UI files.scripts/ui/chestServerForm.ts (1)
688-710: Main panel structure looks good.The main panel correctly aggregates all chest variant layouts with proper visibility bindings. Each variant will be shown/hidden based on the title text flag.
.vscode/settings.json (1)
36-36: LGTM!The addition of "mcbe" to the spell-check dictionary aligns with the new
mcbe-ts-uidependency introduced in this PR.scripts/ui/README.md (1)
1-84: LGTM!The documentation provides clear examples of the PHUD helper utilities imported from
mcbe-ts-ui, covering visibility bindings, string parsing, and binding helpers. This will be helpful for developers working with the new UI system.scripts/ui/phud/evolutionWait.ts (1)
1-27: LGTM!The Evolution Wait PHUD component is well-structured with proper bindings, visibility control, and layout configuration. The implementation follows the established PHUD pattern consistently.
scripts/ui/phud/loadingScreen.ts (1)
1-28: LGTM!The Loading Screen PHUD component is properly structured with tiled background, centered text, and appropriate bindings for loading screen text display.
scripts/ui/phud/battleWait.ts (1)
1-54: LGTM!The Battle Wait PHUD component is well-implemented with proper layering, color overlays, and bindings. The horizontal stack panel effectively combines the battle log text and subtitle information.
scripts/ui/phud/phone.ts (1)
106-110: Verify the condition expression is correctly balanced.The
$conditionexpression on line 109 appears to be correctly balanced:"((#value = 'ring') or (#value = 'standby'))". A past review flagged a missing closing parenthesis here, which seems to have been addressed.Based on past review comments, this was addressed in commit 28183d6.
scripts/ui/searchServerForm.ts (1)
109-142: LGTM!The search template button bindings are well-structured with proper filtering logic. The visibility condition correctly handles empty search, "Back" button visibility, and substring matching for filtered results.
scripts/ui/phud/playerPing.ts (1)
1-26: Clean PHUD component implementation.The Player Ping HUD component is well-structured with proper visibility bindings via
phudVisibility. The use ofphudTexthelper andboundLabelfollows the established patterns in other PHUD modules.scripts/ui/phud/sidebar.ts (1)
145-163: Slot generation loop is well-implemented.The dynamic slot generation correctly computes per-slot indices using
POKEMON_DATA_SIZE * slotIndex + pokemonIndexMap[key]. The padding logic and template extension pattern are clean.scripts/ui/hud_screen.ts (2)
63-83: PHUD and player ping integration looks correct.The modifications to inject
phud@phud.mainintoroot_panelandplayer_ping@player_ping.mainafterplayer_positionfollow the expected Bedrock UI modification pattern.
87-145: Centered GUI elements panel is well-structured.The bottom-middle HUD panel correctly positions vital stat renderers with appropriate visibility bindings for riding states. The global binding
#hud_visible_centeredproperly controls overall visibility.scripts/ui/pokemon/shared.ts (1)
1-233: Well-organized shared utilities module.The module provides a clean, reusable API for Pokemon UI screens with good JSDoc documentation. The separation of visibility helpers, binding factories, and state configurations follows best practices.
scripts/ui/pokemon/pc.ts (2)
126-264: Clean PC UI module structure.The module makes good use of shared utilities from
./sharedand follows a consistent pattern for button variants with texture configurations. The namespace registration and element composition are well-organized.
116-124: Verify thatboundLabelwith a second parameter automatically creates the global binding.The call
boundLabel("text", "title_text")lacks an explicit.bindings()call, unlike other similar usages in the same file (lines 60, 72) which explicitly call.bindings(globalBinding(...)). Confirm whether the second parameter"title_text"automatically generatesbinding_name: "#title_text", binding_type: "global"or if explicit binding setup is required.scripts/ui/pokemon/pokemon.ts (1)
285-415: Overall starter selection UI structure is well-organized.The main panel composition with text_common header and button_panel containing the common_panel follows a clear hierarchy. The namespace registration pattern is consistent.
scripts/ui/serverForm.ts (4)
79-102: TheflagBindingshelper correctly applies consistent visibility and enabled bindings.This resolves the previous issue where rotom phone pages had mismatched enabled bindings. Both
#visibleand#enablednow use the same flag expression.
127-134: Dynamic form panel generation is well-implemented.The loop correctly creates panels for each custom form using
extendExternalwith the form's namespace main element, applying appropriate flag-based visibility bindings.
137-156: Server form factory and screen wiring are correctly structured.The
server_form_factorymaps control IDs to the appropriate panels, andthird_party_server_screenproperly extendscommon.base_screenwith button mapping frommenu_canceltomenu_exit.
117-123: [Rewritten review comment text]
[Classification tag]
| small_chest_grid: { | ||
| type: "grid", | ||
| grid_dimensions: [9, 1], | ||
| size: ["100% - 14px", "100% - 112px"], | ||
| offset: [7, 21], | ||
| anchor_from: "top_left", | ||
| anchor_to: "top_left", | ||
| grid_item_template: "chest_ui.chest_item", | ||
| collection_name: "form_buttons", | ||
| layer: 1, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Incorrect grid name - copy-paste error.
The grid inside tiny_chest_grid_image is named small_chest_grid instead of tiny_chest_grid. This naming inconsistency could cause confusion.
🔎 Proposed fix
{
- small_chest_grid: {
+ tiny_chest_grid: {
type: "grid",
grid_dimensions: [9, 1],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| small_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 1], | |
| size: ["100% - 14px", "100% - 112px"], | |
| offset: [7, 21], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, | |
| }, | |
| tiny_chest_grid: { | |
| type: "grid", | |
| grid_dimensions: [9, 1], | |
| size: ["100% - 14px", "100% - 112px"], | |
| offset: [7, 21], | |
| anchor_from: "top_left", | |
| anchor_to: "top_left", | |
| grid_item_template: "chest_ui.chest_item", | |
| collection_name: "form_buttons", | |
| layer: 1, | |
| }, | |
| }, |
🤖 Prompt for AI Agents
In scripts/ui/chestServerForm.ts around lines 439 to 450, the grid object is
misnamed small_chest_grid but should be tiny_chest_grid to match the surrounding
tiny_chest_grid_image; rename the key from small_chest_grid to tiny_chest_grid
so the identifier is consistent with the container and avoids confusion or
lookup issues.
| const questLabel = boundLabel("quest_label") | ||
| .layer(3) | ||
| .fontScaleFactor(FONT_SCALE) | ||
| .color(COLOR) | ||
| .bindings( | ||
| phudRead("#level_number", "#text", firstStripped(VARIABLE_SIZE, "${prop}")) | ||
| ); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's explore the repository structure
git ls-files | head -20Repository: smell-of-curry/pokebedrock-res
Length of output: 520
🏁 Script executed:
# Locate the currency.ts file mentioned in the review
find . -name "currency.ts" -type fRepository: smell-of-curry/pokebedrock-res
Length of output: 103
🏁 Script executed:
# Check for generated JSON files related to currency
find . -name "currency.json" -type fRepository: smell-of-curry/pokebedrock-res
Length of output: 56
🏁 Script executed:
# Read the currency.ts file to understand the context
cat -n ./scripts/ui/phud/currency.tsRepository: smell-of-curry/pokebedrock-res
Length of output: 2080
🏁 Script executed:
# Search for the firstStripped function definition
rg "firstStripped" -A 5 -B 2Repository: smell-of-curry/pokebedrock-res
Length of output: 1565
🏁 Script executed:
# Look for currencyLabel mentioned in the review as having similar issues
rg "currencyLabel" -A 5 -B 2Repository: smell-of-curry/pokebedrock-res
Length of output: 963
🏁 Script executed:
# Check if there's any code generation process or output directory
find . -type d -name "__generated__" 2>/dev/null | head -20Repository: smell-of-curry/pokebedrock-res
Length of output: 56
🏁 Script executed:
# Search for other uses of firstStripped or skipStripped to see the expected pattern
rg "firstStripped|skipStripped" -B 2 -A 2Repository: smell-of-curry/pokebedrock-res
Length of output: 1354
🏁 Script executed:
# Check for any build or code generation scripts
find . -name "*.ts" -o -name "*.js" | xargs grep -l "generate\|codegen" 2>/dev/null | head -10Repository: smell-of-curry/pokebedrock-res
Length of output: 247
🏁 Script executed:
# Check the build script to understand how UI is generated
cat -n ./scripts/build.ts | head -100Repository: smell-of-curry/pokebedrock-res
Length of output: 3757
🏁 Script executed:
# Look for mcbe-ts-ui package or library references to understand placeholder handling
rg "mcbe-ts-ui" -A 3 -B 1Repository: smell-of-curry/pokebedrock-res
Length of output: 8279
🏁 Script executed:
# Check if there's documentation on the placeholder syntax
cat -n ./scripts/ui/README.mdRepository: smell-of-curry/pokebedrock-res
Length of output: 2508
🏁 Script executed:
# Let's check if there are any other uses of phudRead in the codebase to see the pattern
rg "phudRead" -B 2 -A 2Repository: smell-of-curry/pokebedrock-res
Length of output: 2383
🏁 Script executed:
# Look for any test files or examples that might show expected usage
find . -type f \( -name "*.test.ts" -o -name "*.spec.ts" -o -name "*example*" \) | head -10Repository: smell-of-curry/pokebedrock-res
Length of output: 113
🏁 Script executed:
# Let me check if there's any package.json script that generates UI files
cat -n package.json | grep -A 10 -B 5 "scripts"Repository: smell-of-curry/pokebedrock-res
Length of output: 1761
🏁 Script executed:
# Look for any other mcbe-ts-ui filter functions being used with similar patterns
rg "first\(|skip\(|slice\(" -B 2 -A 2Repository: smell-of-curry/pokebedrock-res
Length of output: 8851
Replace placeholder "${prop}" with actual property reference in binding filters.
Both questLabel (line 30) and currencyLabel (line 43) use unresolved placeholders "${prop}" in their filter functions. According to the documented pattern and all other usages in the codebase (e.g., first(40, "#form_text")), these should reference the binding source property with the # prefix: firstStripped(VARIABLE_SIZE, "#level_number") and skipStripped(VARIABLE_SIZE, "#level_number").
🤖 Prompt for AI Agents
In scripts/ui/phud/currency.ts around lines 25 to 31 (and also update the
related currencyLabel at line ~43), the binding filter uses the unresolved
placeholder "${prop}"; replace that placeholder with the binding source property
reference "#level_number" and call the correct filter functions as in the
codebase: use firstStripped(VARIABLE_SIZE, "#level_number") for questLabel and
skipStripped(VARIABLE_SIZE, "#level_number") for currencyLabel so the bindings
reference the actual property instead of a string placeholder.
| // Ally actor button with visibility check | ||
| const allyActorDetailsButtonCheckIdNs = element( | ||
| "ally_actor_details_button_check_id" | ||
| ) | ||
| .extendsFrom(allyActorButtonNs) | ||
| .variableDefault("button_id", "b:opponent_1_") | ||
| .bindings(...visibilityForId("$button_id")) | ||
| .addToNamespace(ns); | ||
|
|
||
| // Opponent actor button with visibility check | ||
| const opponentActorDetailsButtonCheckIdNs = element( | ||
| "opponent_actor_details_button_check_id" | ||
| ) | ||
| .extendsFrom(opponentActorButtonNs) | ||
| .variableDefault("button_id", "b:opponent_1_") | ||
| .bindings(...visibilityForId("$button_id")) | ||
| .addToNamespace(ns); |
There was a problem hiding this comment.
Default button_id values appear mismatched between ally and opponent.
Both allyActorDetailsButtonCheckIdNs (line 203) and opponentActorDetailsButtonCheckIdNs (line 212) use the same default "b:opponent_1_". However, the ally button should likely default to an ally-style ID (e.g., "b:ally_1_") for consistency, since actual IDs are passed via variables anyway (lines 217-242).
🔎 Proposed fix
const allyActorDetailsButtonCheckIdNs = element(
"ally_actor_details_button_check_id"
)
.extendsFrom(allyActorButtonNs)
- .variableDefault("button_id", "b:opponent_1_")
+ .variableDefault("button_id", "b:ally_1_")
.bindings(...visibilityForId("$button_id"))
.addToNamespace(ns);🤖 Prompt for AI Agents
scripts/ui/pokemon/attackScreen/actors.ts around lines 198 to 214: the ally
actor default button_id incorrectly uses "b:opponent_1_"; update the ally
element's variableDefault to use an ally-style id (e.g., "b:ally_1_") so
allyActorDetailsButtonCheckIdNs defaults to the correct prefix, and leave
opponentActorDetailsButtonCheckIdNs as "b:opponent_1_"; run a quick grep to
confirm no other copy-paste defaults remain.
| controls: [ | ||
| { | ||
| arrow: { | ||
| type: "image", | ||
| size: ["50%", "100%x"], | ||
| texture: "textures/ui/chevron_left", | ||
| layer: 2, | ||
| }, | ||
| }, | ||
| { | ||
| hover: { | ||
| type: "image", | ||
| size: ["50%", "100%x"], | ||
| texture: "textures/ui/chevron_left", | ||
| layer: 2, | ||
| color: "black", | ||
| }, | ||
| }, | ||
| ], | ||
| bindings: [collectionDetailsBinding()], | ||
| }, | ||
| }); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if there's a parent-level hover state mechanism controlling child visibility
rg -n "hover_state|default_state" scripts/ui/pokemon/pokemon.ts -C 3Repository: smell-of-curry/pokebedrock-res
Length of output: 992
🏁 Script executed:
#!/bin/bash
# Get the full context around lines 190-211 and examine the backButton component
sed -n '150,250p' scripts/ui/pokemon/pokemon.ts | cat -nRepository: smell-of-curry/pokebedrock-res
Length of output: 3579
🏁 Script executed:
#!/bin/bash
# Search for "backButton" definition to understand the full component structure
rg -n "backButton" scripts/ui/pokemon/pokemon.ts -B 20 | head -100Repository: smell-of-curry/pokebedrock-res
Length of output: 1228
🏁 Script executed:
#!/bin/bash
# Search for common.button definition to see if it handles state-based visibility
rg -n "common\.button|form_button.*visible" scripts/ui/pokemon/pokemon.ts -A 5 -B 2Repository: smell-of-curry/pokebedrock-res
Length of output: 1485
🏁 Script executed:
#!/bin/bash
# Check if bindings functions handle visibility based on hover_state
rg -n "collectionDetailsBinding" scripts/ui/pokemon/pokemon.ts -A 10Repository: smell-of-curry/pokebedrock-res
Length of output: 1863
🏁 Script executed:
#!/bin/bash
# Search for common.button definition or import in the codebase
fd -e ts -e js -e json | xargs grep -l "common\.button" 2>/dev/null | head -20Repository: smell-of-curry/pokebedrock-res
Length of output: 201
🏁 Script executed:
#!/bin/bash
# Search for usage patterns of $hover_state throughout the codebase
rg "\$hover_state" --type ts --type js -B 2 -A 2Repository: smell-of-curry/pokebedrock-res
Length of output: 56
🏁 Script executed:
#!/bin/bash
# Check if there are visibility bindings elsewhere for hover states as a pattern
rg "visible.*hover|hover.*visible" --type ts --type js -C 2Repository: smell-of-curry/pokebedrock-res
Length of output: 56
🏁 Script executed:
#!/bin/bash
# Check the json file for common.button usage pattern
cat ui/chest_server_form.json | head -150Repository: smell-of-curry/pokebedrock-res
Length of output: 4710
🏁 Script executed:
#!/bin/bash
# Search for where collectionDetailsBinding is defined
rg -n "collectionDetailsBinding" -A 15 --type ts --type js | head -80Repository: smell-of-curry/pokebedrock-res
Length of output: 4728
🏁 Script executed:
#!/bin/bash
# Search for any $visible variable usage in relation to arrow or hover patterns
rg "\$visible|visible.*true|visible.*false" --type ts --type js -C 2 | head -100Repository: smell-of-curry/pokebedrock-res
Length of output: 3700
Add visibility bindings to control arrow/hover image display.
The arrow and hover images remain siblings without visibility bindings. Both images render simultaneously—only the color changes on hover. The $default_state and $hover_state variables are declared but unused. Add explicit visibility bindings following the pattern used elsewhere (e.g., viewBinding(...) with "#visible" target) to show/hide each image based on hover state.
🤖 Prompt for AI Agents
In scripts/ui/pokemon/pokemon.ts around lines 190 to 211 the arrow and hover
image elements lack visibility bindings so both render simultaneously; update
each control entry to include a viewBinding targeting "#visible" that ties the
arrow image to the $default_state and the hover image to the $hover_state (use
the same viewBinding(...) pattern used elsewhere), so the arrow is visible when
not hovered and the hover image is visible when hovered; ensure you import/keep
the $default_state and $hover_state variables and add the bindings into each
control object’s bindings array.
| const FORM_TEXTURES: ButtonTexturesConfig = { | ||
| default: "textures/ui/form_btn_background", | ||
| hover: "textures/ui/form_btn_background_interact", | ||
| pressed: "textures/ui/form_btn_background_interact", | ||
| }; |
There was a problem hiding this comment.
Inconsistent texture path in FORM_TEXTURES.
FORM_TEXTURES uses textures/ui/form_btn_background while DEFAULT_TEXTURES uses textures/ui/gui/rotom_phone/form_btn_background. The missing gui/rotom_phone/ subdirectory creates an inconsistency that affects second.ts (which uses FORM_TEXTURES) compared to first.ts and third.ts.
🔎 Proposed fix
const FORM_TEXTURES: ButtonTexturesConfig = {
- default: "textures/ui/form_btn_background",
- hover: "textures/ui/form_btn_background_interact",
- pressed: "textures/ui/form_btn_background_interact",
+ default: "textures/ui/gui/rotom_phone/form_btn_background",
+ hover: "textures/ui/gui/rotom_phone/form_btn_background_interact",
+ pressed: "textures/ui/gui/rotom_phone/form_btn_background_interact",
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const FORM_TEXTURES: ButtonTexturesConfig = { | |
| default: "textures/ui/form_btn_background", | |
| hover: "textures/ui/form_btn_background_interact", | |
| pressed: "textures/ui/form_btn_background_interact", | |
| }; | |
| const FORM_TEXTURES: ButtonTexturesConfig = { | |
| default: "textures/ui/gui/rotom_phone/form_btn_background", | |
| hover: "textures/ui/gui/rotom_phone/form_btn_background_interact", | |
| pressed: "textures/ui/gui/rotom_phone/form_btn_background_interact", | |
| }; |
🤖 Prompt for AI Agents
In scripts/ui/rotomPhone/shared.ts around lines 93 to 97, FORM_TEXTURES uses
"textures/ui/form_btn_background" (and interact variants) which is inconsistent
with DEFAULT_TEXTURES' "textures/ui/gui/rotom_phone/form_btn_background"; update
all three FORM_TEXTURES entries (default, hover, pressed) to include the missing
"gui/rotom_phone/" subdirectory so they match the other files (e.g.,
"textures/ui/gui/rotom_phone/form_btn_background" and the corresponding
_interact variants).
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (3)
scripts/ui/chestServerForm.ts (3)
439-449: Incorrect grid name - copy-paste error.The grid inside
tiny_chest_grid_imageis namedsmall_chest_gridinstead oftiny_chest_grid, creating a naming inconsistency that could confuse future maintainers.🔎 Proposed fix
{ - small_chest_grid: { + tiny_chest_grid: { type: "grid", grid_dimensions: [9, 1],
644-654: Incorrect grid name - copy-paste error.The grid inside
backpack_gridis namedquest_chest_gridinstead of a name matching the backpack context (e.g.,backpack_chest_grid), creating a naming inconsistency.🔎 Proposed fix
{ - quest_chest_grid: { + backpack_chest_grid: { type: "grid", grid_dimensions: [9, 10],
672-682: Incorrect grid name - copy-paste error.The grid inside
auction_house_gridis namedquest_chest_gridinstead of a name matching the auction house context (e.g.,auction_house_chest_grid), creating a naming inconsistency.🔎 Proposed fix
{ - quest_chest_grid: { + auction_house_chest_grid: { type: "grid", grid_dimensions: [9, 6],
🧹 Nitpick comments (3)
scripts/ui/pokemon/pc.ts (3)
90-111: Document the expected format of#title_textfor string manipulations.The code uses hard-coded offsets (22, 44) to extract substrings from
#title_textwithout explaining the expected format. Adding comments describing the structure (e.g., "Format: [22 chars prefix][22 chars title][remaining chars for texture path]") would improve maintainability.
235-235: Address the TODO: Type-safe texture paths.The TODO comment indicates texture paths should be type-safe to catch invalid references at compile time rather than runtime.
Would you like me to generate a solution that creates a type-safe texture path system (e.g., using string literal types or an enum) and open a new issue to track this enhancement?
327-336: Document the dynamic texture path construction logic.The binding expression at line 333 performs complex string manipulation to construct texture paths from
#title_text. Consider adding a comment explaining:
- The expected format of
#title_text(e.g., "Format: [44 char prefix][background_name]_[suffix]")- The transformation steps
- Example input/output
This will make debugging and maintenance significantly easier.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
ui/__generated__/chestServerForm.jsonis excluded by!**/__generated__/**,!**/__generated__/**ui/__generated__/pokemon/pc.jsonis excluded by!**/__generated__/**,!**/__generated__/**
📒 Files selected for processing (3)
scripts/ui/chestServerForm.tsscripts/ui/pokemon/pc.tsui/chest_server_form.json
💤 Files with no reviewable changes (1)
- ui/chest_server_form.json
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/ui/pokemon/pc.ts (2)
scripts/ui/pokemon/attackScreen/shared.ts (5)
formButtonEnabledBindings(24-24)formButtonTextLabelBindings(25-25)formButtonImageBindings(26-26)simpleButtonTextures(28-28)visibilityForId(19-19)scripts/ui/pokemon/shared.ts (6)
formButtonEnabledBindings(100-108)formButtonTextLabelBindings(114-117)formButtonImageBindings(122-125)simpleButtonTextures(155-163)buttonStack(90-90)visibilityForId(28-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
scripts/ui/chestServerForm.ts (1)
690-710: Well-structured aggregation of chest variants.The main panel properly aggregates all 11 chest variants with correct visibility switching based on title flags. Each variant will conditionally render based on its corresponding flag in the title text.
scripts/ui/pokemon/pc.ts (1)
34-34: All referenced UI templates are confirmed to exist and are actively used across multiple files in the codebase:
common_buttons.light_text_buttonis used in searchServerForm.ts, rotomPhone/shared.ts, pokedex.ts, and attackScreen/buttons.tschest_ui.chest_itemis defined in chestServerForm.ts and referenced in the grid templatecommon.light_close_buttonis used in chestServerForm.ts, rotomPhone/shared.ts, and pokedex.tsThese templates are available and properly configured. No action needed.
Squash-rebase PR #674 onto current main and port UI fixes from sidebar/battle/chest/PC/pokedex into mcbe-ts-ui sources. Regenerate JSON and align server_form routing with main. Co-authored-by: Cursor <cursoragent@cursor.com>
da0ee3d to
0f96718
Compare
Note
Converts legacy JSON UI to TypeScript using
mcbe-ts-ui, adding major UI surfaces and generated outputs.actionbar,currency,battleWait,evolutionWait,loadingScreen,phone,playerPing,sidebar) and modifieshud_screenattackScreen(shared/buttons/actors/progress),pc,pokedex, andpokemonstarter pickerfirst,second,third) with shared utilitieschestServerFormandsearchServerForm; routes viaserverFormui/__generated__/and updates tooling to ignore it (.coderabbit.yaml,.copilotignore,.cursorignore,.gitattributes)mcbe-ts-ui@^1.0.1andscripts/ui/README.mdwith helper usageWritten by Cursor Bugbot for commit da0ee3d. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.