-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_check.py
More file actions
138 lines (118 loc) · 3.79 KB
/
setup_check.py
File metadata and controls
138 lines (118 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/env python3
"""
Quick setup verification and instructions for Minecraft control.
"""
import sys
import os
from pathlib import Path
# Add src directory to path
sys.path.insert(0, str(Path(__file__).parent / "src"))
def check_dependencies():
"""Check if required dependencies are installed."""
print("🔍 Checking Dependencies...")
print("-" * 30)
missing_deps = []
# Check core control libraries
try:
import pyautogui
print("✅ pyautogui - OK")
except ImportError:
print("❌ pyautogui - MISSING")
missing_deps.append("pyautogui")
try:
import pynput
print("✅ pynput - OK")
except ImportError:
print("❌ pynput - MISSING")
missing_deps.append("pynput")
try:
import mss
print("✅ mss - OK")
except ImportError:
print("❌ mss - MISSING")
missing_deps.append("mss")
try:
from PIL import Image
print("✅ pillow - OK")
except ImportError:
print("❌ pillow - MISSING")
missing_deps.append("pillow")
# Check optional AI libraries
try:
import openai
print("✅ openai - OK (enhanced chat available)")
except ImportError:
print("⚠️ openai - MISSING (basic mode only)")
try:
import pygetwindow
print("✅ pygetwindow - OK (better window detection)")
except ImportError:
print("⚠️ pygetwindow - MISSING (fallback focus methods)")
print()
if missing_deps:
print("❌ Missing required dependencies!")
print(f"Install with: pip install {' '.join(missing_deps)}")
return False
else:
print("✅ All required dependencies installed!")
return True
def show_minecraft_setup():
"""Show Minecraft setup instructions."""
print("\n🎮 Minecraft Setup Instructions")
print("=" * 35)
print()
print("1. 📱 CRITICAL SETTING:")
print(" • Open Minecraft")
print(" • Go to: Options → Controls")
print(" • Find: 'Pause on Lost Focus'")
print(" • Set to: OFF")
print(" This prevents pause menu when switching to terminal!")
print()
print("2. 🖥️ RECOMMENDED SETTINGS:")
print(" • Use Windowed mode (not fullscreen)")
print(" • Position Minecraft and terminal side-by-side")
print(" • Make sure Minecraft window is visible")
print()
print("3. 🎯 FOCUS COMMANDS:")
print(" • 'focus minecraft' - Brings Minecraft to front")
print(" • 'unpause' - Closes pause menu if it opens")
print(" • 'close menu' - Same as unpause")
def show_usage_examples():
"""Show usage examples."""
print("\n💬 Example Commands")
print("=" * 20)
print()
print("Basic Movement:")
print(" • 'go forward'")
print(" • 'turn left'")
print(" • 'jump'")
print()
print("Actions:")
print(" • 'mine this block'")
print(" • 'place a block'")
print(" • 'look around'")
print()
print("Focus Management:")
print(" • 'focus minecraft'")
print(" • 'unpause'")
print()
print("Complex Tasks:")
print(" • 'build a 3x3 platform'")
print(" • 'mine that tree'")
print(" • 'find some animals'")
def main():
"""Main setup check."""
print("🤖 SIMA Minecraft Agent - Setup Check")
print("=" * 40)
# Check dependencies
deps_ok = check_dependencies()
# Show Minecraft setup regardless
show_minecraft_setup()
# Show usage examples
show_usage_examples()
print(f"\n🚀 {'Ready to start!' if deps_ok else 'Install missing dependencies first'}")
print()
print("Start the agent with:")
print(" python minecraft_chat.py")
if __name__ == "__main__":
main()