Optimization & Architecture
The library is designed to be lightweight and modular.
Optimization Tips
- Avoid Heavy Logic in Animation: The
animateblock runs every tick (or specified interval). Keep it lightweight. - Reuse Menus: You can define a
Menuinstance once andopen(player)it for multiple players (stateless) or create per-player instances (stateful). - Packet Handling:
refreshtries to minimize packet spam by only updating changed items.
Architecture
- Menu: The high-level DSL aggregator.
- InventoryGUI: Handles Minestom
Inventoryinteractions. - Form: Handles Bedrock packet construction and sending.