def browse(self): path = filedialog.askopenfilename(filetypes=[("MCPack files", "*.mcpack"), ("All files", "*.*")]) if not path: path = filedialog.askdirectory() if path: self.path_var.set(path)
I'll help you create content for an — a utility that converts Minecraft Bedrock Edition addons/behavior packs ( .mcpack files) into other formats or extracts/repacks them. mcpack converter
Run GUI with:
def run(self, command): path = self.path_var.get() if not path: messagebox.showerror("Error", "Select a file or folder first") return # Call the CLI script script_dir = os.path.dirname(os.path.abspath(__file__)) script_path = os.path.join(script_dir, "mcpack_converter.py") cmd = [sys.executable, script_path, path, command] try: result = subprocess.run(cmd, capture_output=True, text=True) self.log.insert(tk.END, f"\n> {' '.join(cmd)}\n") self.log.insert(tk.END, result.stdout) if result.stderr: self.log.insert(tk.END, result.stderr) self.log.see(tk.END) except Exception as e: messagebox.showerror("Error", str(e)) if == " main ": root = tk.Tk() app = MCPackConverterGUI(root) root.mainloop() def browse(self): path = filedialog
tk.Label(root, text="MCPack Converter for Minecraft Bedrock", font=("Arial", 14)).pack(pady=10) # Input frame = tk.Frame(root) frame.pack(pady=5) tk.Label(frame, text="File/Folder:").pack(side=tk.LEFT) self.path_var = tk.StringVar() tk.Entry(frame, textvariable=self.path_var, width=50).pack(side=tk.LEFT, padx=5) tk.Button(frame, text="Browse", command=self.browse).pack(side=tk.LEFT) # Buttons btn_frame = tk.Frame(root) btn_frame.pack(pady=10) tk.Button(btn_frame, text="Extract .mcpack", command=lambda: self.run("--extract")).pack(side=tk.LEFT, padx=5) tk.Button(btn_frame, text="Pack to .mcpack", command=lambda: self.run("--pack")).pack(side=tk.LEFT, padx=5) tk.Button(btn_frame, text="→ .zip", command=lambda: self.run("--tozip")).pack(side=tk.LEFT, padx=5) tk.Button(btn_frame, text="← .mcpack", command=lambda: self.run("--tomcpack")).pack(side=tk.LEFT, padx=5) tk.Button(btn_frame, text="Extract All", command=lambda: self.run("--extract-all")).pack(side=tk.LEFT, padx=5) # Output log self.log = scrolledtext.ScrolledText(root, height=15) self.log.pack(fill=tk.BOTH, expand=True, padx=10, pady=10) "mcpack_converter.py") cmd = [sys.executable