# miaomiaomax/meowfish architecture

> Architecture diagram of the GitHub repository miaomiaomax/meowfish, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/miaomiaomax/meowfish
- Repository: https://github.com/miaomiaomax/meowfish

## Overview

MeowFish is a Minecraft Bedrock behavior-pack script for automating fishing. Players trigger it by crouch-casting a fishing rod (or using compulsory-auto mode); the script tracks hook and fishing events, handles catches and rod durability, then positions loot and applies effects. Players can also open a paper-based settings form to configure language and fishing behavior. The README documents additional loot, particle, sound, and reminder options; those branches are represented at the runtime entry point, though the supplied main.js excerpt is incomplete.

Main entry points: [`scripts/main.js`](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js) (Fishing automation), [`scripts/lib/meow/fishing_event.js`](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/fishing_event.js) (Fishing event manager), [`scripts/lib/index.js`](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/index.js) (Library exports), [`scripts/lib/meow/language.js`](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/language.js) (Localization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_entry["Fishing automation<br/>[main.js]"]
  node_config["Default settings<br/>[SystemSettings.js]"]
end

subgraph group_fishing["Fishing lifecycle"]
  node_events["Fishing event manager<br/>[fishing_event.js]"]
  node_signals["Event signals<br/>[event_signal.js]"]
  node_automation["Auto-fishing control<br/>[main.js]"]
  node_durability["Rod durability<br/>[main.js]"]
  node_loot["Loot handling<br/>[main.js]"]
end

subgraph group_player["Player controls"]
  node_settingsui["Personal settings<br/>[main.js]"]
  node_reminders["Player reminders<br/>[main.js]"]
end

subgraph group_shared["Shared services"]
  node_api["Library exports<br/>[index.js]"]
  node_language["Localization<br/>[language.js]"]
  node_methods["Runtime utilities<br/>[methods.js]"]
  node_logging["Logging<br/>[logging.js]"]
end

node_angler(("Player"))
node_bedrock["Minecraft Bedrock"]

node_angler -->|"uses"| node_bedrock
node_bedrock -->|"dispatches fishing events"| node_events
node_events -->|"triggers signals"| node_signals
node_events -->|"observes hook state"| node_bedrock
node_entry -->|"loads"| node_api
node_api -->|"creates manager"| node_events
node_entry -->|"subscribes to"| node_events
node_entry -->|"reads defaults"| node_config
node_entry -->|"runs"| node_automation
node_entry -->|"runs"| node_durability
node_entry -->|"runs"| node_loot
node_entry -->|"opens and saves"| node_settingsui
node_entry -->|"displays"| node_reminders
node_automation -->|"controls fishing"| node_bedrock
node_durability -->|"updates rod"| node_bedrock
node_loot -->|"positions loot"| node_bedrock
node_settingsui -->|"shows form"| node_bedrock
node_angler -->|"casts or configures"| node_entry
node_entry -->|"gets translations"| node_language
node_entry -->|"uses helpers"| node_methods
node_methods -->|"logs command errors"| node_logging
node_language -->|"uses default language"| node_config
node_reminders -->|"sends tips"| node_angler
node_loot -.->|"plays effects"| node_bedrock

click node_entry "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_config "https://github.com/miaomiaomax/meowfish/blob/main/scripts/SystemSettings.js"
click node_events "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/fishing_event.js"
click node_signals "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/event_signal.js"
click node_automation "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_durability "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_loot "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_settingsui "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_reminders "https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js"
click node_api "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/index.js"
click node_language "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/language.js"
click node_methods "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/methods.js"
click node_logging "https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/logging.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_config toneBlue
class node_events,node_signals,node_automation,node_durability,node_loot toneAmber
class node_settingsui,node_reminders toneMint
class node_api,node_language,node_methods,node_logging toneRose
class node_angler,node_bedrock toneIndigo
```

## Components

### Runtime orchestration

- [Fishing automation](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`
- [Default settings](https://github.com/miaomiaomax/meowfish/blob/main/scripts/SystemSettings.js): `scripts/SystemSettings.js`

### Fishing lifecycle

- [Fishing event manager](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/fishing_event.js): `scripts/lib/meow/fishing_event.js`
- [Event signals](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/event_signal.js): `scripts/lib/meow/event_signal.js`
- [Auto-fishing control](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`
- [Rod durability](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`
- [Loot handling](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`

### Player controls

- [Personal settings](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`
- [Player reminders](https://github.com/miaomiaomax/meowfish/blob/main/scripts/main.js): `scripts/main.js`

### Shared services

- [Library exports](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/index.js): `scripts/lib/index.js`
- [Localization](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/language.js): `scripts/lib/meow/language.js`
- [Runtime utilities](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/methods.js): `scripts/lib/meow/methods.js`
- [Logging](https://github.com/miaomiaomax/meowfish/blob/main/scripts/lib/meow/logging.js): `scripts/lib/meow/logging.js`

### Other components

- **Player**
- **Minecraft Bedrock**

## Connections

- Player → Minecraft Bedrock: uses
- Minecraft Bedrock → Fishing event manager: dispatches fishing events
- Fishing event manager → Event signals: triggers signals
- Fishing event manager → Minecraft Bedrock: observes hook state
- Fishing automation → Library exports: loads
- Library exports → Fishing event manager: creates manager
- Fishing automation → Fishing event manager: subscribes to
- Fishing automation → Default settings: reads defaults
- Fishing automation → Auto-fishing control: runs
- Fishing automation → Rod durability: runs
- Fishing automation → Loot handling: runs
- Fishing automation → Personal settings: opens and saves
- Fishing automation → Player reminders: displays
- Auto-fishing control → Minecraft Bedrock: controls fishing
- Rod durability → Minecraft Bedrock: updates rod
- Loot handling → Minecraft Bedrock: positions loot
- Personal settings → Minecraft Bedrock: shows form
- Player → Fishing automation: casts or configures
- Fishing automation → Localization: gets translations
- Fishing automation → Runtime utilities: uses helpers
- Runtime utilities → Logging: logs command errors
- Localization → Default settings: uses default language
- Player reminders → Player: sends tips
- Loot handling → Minecraft Bedrock: plays effects
