S
๐
1 file
2,748 chars
๐
pasted-code-1775877300233.txt
txt
36 lines
โถ
pasted-code-1775877300233.txt
txt
36 lines
Platform: Paper 1.21.1 | Cross-Play: Geyser/Floodgate
AI Language: Hinglish (Natural & Robot-mix)
All Commands (Full Lifecycle)
/ai create : Registers a new AI profile.
/ai join : Spawns the AI to start grinding and tasks.
/ai delete : Permanently removes the AI profile.
/ai reload: Refreshes config and trade rules.
/ai data clear : Resets conversational memory (Base/Home location stays safe).
Storage & Smart Grief Detection (Fixes Included)
Chest Classification: Auto-sorts items into Valuables, Resources, and Tradeables chests.
Grief Detection Logic:
Passive Scan: Every 500โ600 seconds via NMS (direct data read) to avoid interrupting players.
Active Trade Scan: Real-time monitoring during trades.
Alert: If items vanish, AI announces: "[System Alert] Chest mismatch! Saaman gayab hai."
Memory, Auto-Reset & Task Priority
15-Minute Auto-Flush: Clears chat memory to save RAM.
Reset Alert: Chat message: "[System] [Name] ki memory reset ho gayi hai."
Conflict Fix (State Check): Reset 1โ2 minute delay hoga agar AI kisi Active Trade ya Crafting mein busy hai.
Post-Reset Behavior: AI immediately resumes Grinding/Mining after reset.
Operator Logic & Anti-Manipulation
Common Sense Guard: AI logic filter prevents any manipulation to run /stop, /op, or /ban.
Restricted OP Usage: Strictly for internal /heal, /tp, /sethome, and /home.
Illegal Item Ban: Bedrock, Command Blocks, Barrier, Enchanted Golden Apple, and Golden Apple are 100% restricted from trading/dropping.
Wireless Trading & Global Request Queue
Wireless Sync: Long-distance chat (5-min cooldown) with a 5โ6 line limit per session to save API quota.
Global Queue (Rate Limit Fix): Developer must implement a queue so bots call the API one-by-one, preventing "429 Too Many Requests" errors.
TP-Trading & Chunk Safety: Before /tp, the system must Async-load the chunk and run isSafeLocation check. After the trade, AI uses /home home.
Survival Behavior & Base Logic
No-House Rule: Open-air base with Chests, Crafting Table, and Bed.
Auto-Grind & Craft: Collects minerals/wood and crafts tools/chests automatically. (No Armor).
Charity: Drops Golden Carrots if a player says they are "Hungry" or "Bhukkad".
Developer's Critical Solutions (Implementation Guide):
Async-Sync Bridge: Gemini API aur pathfinding Async rahega. World interactions (block place/TP) Sync tasks mein wrap honge.
Database Persistence: SQLite/JSON use karna hai taaki server restart par /home aur chest data delete na ho.
Geyser Compatibility: Use ProtocolLib/PacketEvents taaki Bedrock players ko bot ki activities (sleeping/chest opening) bina glitch ke dikhein.
Thinking Animation: API response ke wait time mein bot "Thinking..." particles ya chat status dikhayega taaki player ko lag na lage.
KodariApr 11 at 3:16 am 100 (v2)
The generation was stopped before any content could be produced.
Kodari can make mistakes. Review important code before using.
Files
No files in this session
Code