How adr-hyng/anglers-desire works
Main components
• Behavior Pack (BP): Contains game logic elements such as function files (mcfunctions), scripts (JavaScript files under BP/scripts), recipes, loot tables, entities, items, blocks, and spawn rules. This layer is responsible for defining how the addon changes vanilla game behavior.
• Resource Pack (RP): Holds assets for visuals and sounds including textures, models (geo.json files), animations, particles, and language texts. This represents the presentation layer for the in‐game effects.
• Source Code (src): Written in TypeScript, this portion mirrors the structure in BP (with directories like commands, custom_enchantment, enchantment_system, fishing_system, overrides, utils, etc.) and is likely compiled/transpiled to output the JS used by the addon. This folder organizes the core systems and modules behind the behavior pack.
• Build & Development Tools: Tools (Python scripts, tsconfig.json, package.json) and additional directories (like “tools” and “setup”) support building, processing the manifest, synchronizing configurations, and packaging the addon for deployment.
• Additional Assets and Configurations: Other folders (mcip, res, etc.) offer configuration assets (such as addon configuration, manifest files, thumbnails, and extra recipes) to support deployment, documentation, or marketing assets.
Relationships and interactions
• The Minecraft engine loads both the Behavior Pack and Resource Pack. The blueprint for changes is defined in BP (with functions, entities, events, loot tables, etc.) while RP provides the visual and audio overlays corresponding to these logical changes.
• Within the behavior pack, various systems interact:
– The fishing system (under BP/scripts and src/fishing_system) handles the customized fishing mechanics including hooks, events (like on_hook_created, on_hook_item), loot table management, and entity handling.
– The enchantment system and custom enchantment modules (in both BP/scripts and src/enchantment_system/custom_enchantment) extend vanilla enchantments and integrate special effects.
– Command handling (found in BP/scripts/commands and src/commands) lets players and servers configure the addon dynamically, triggering certain functions or refreshing configurations.
– Overrides (e.g., player, dimension, container) ensure that custom behaviors are injected where vanilla behavior would normally be.
• Utility modules (src/utils and BP/scripts/utils) support the core systems by offering common functionalities like pathfinding, randomization, logging, and even specialized math utilities (vector operations).
Architectural patterns and principles
• Modularization: Each system (fishing, enchantment, command, overrides, and utilities) is separated into its own module, making unit testing and maintenance easier.
• Separation of concerns: Visual and behavioral changes are divided between the Resource Pack (assets and visuals) and Behavior Pack/Source Code (logic and game mechanics).
• Consistent naming and parallel structure: Notice how similar features exist in both BP (often with compiled JavaScript files) and src (the original TypeScript files), which indicates a build process that compiles and syncs these modules.
• Event-driven / data flow design: Several event modules (e.g., on_hook_created, on_hook_item) indicate that the system reacts to in-game events, triggering various scripts.
Technology and frameworks
• Minecraft Bedrock Addon system: The entire project is built around enhancing and customizing Minecraft Bedrock’s FPS gameplay.
• JavaScript/TypeScript: The source code is primarily written in TypeScript (in src) and compiled to JavaScript (in BP/scripts). NodeJS build tools are likely in play (given the presence of package.json and tsconfig.json).
• Scripting and customization: The project uses custom configuration files (JSON) for items, entities, recipes, and loot tables that adhere to Minecraft’s asset format.
Elements
• Clear labels with descriptive names for each component (e.g., “Fishing System Module”, “Enchantment Module”, “Resource Pack – Models & Animations”, etc.).
• Annotations noting architectural patterns (modularity, event-driven design, separation of concerns) alongside the corresponding modules.