Home›Java›Mods›PythonConnectMod
PythonConnectMod
ModsJava

PythonConnectMod

Java mod listed for Minecraft 1.21. Downloads from the MC Java Mods app on Android.

by AliaNormal · on Modrinth

⬇ Download on Modrinth

A simple mod to connect to apps. This mod allows your code to easily interact with your Minecraft client by sending / commands to localhost:2542.

An example in Python:

from socket import socket, AF_INET, SOCK_STREAM

client = socket(AF_INET, SOCK_STREAM)
client.connect(("localhost", 2542))

client.sendall("/give @s minecraft:diamond 64\x00".encode("utf-8"))
# Use \x00 (\u0000, ...) to seperate messages

client.close()
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more