[1.12] [forDevs] (facBank) HTTP Server To Client Controller
Posts 1–15 of 16 · Page 1 of 2
[1.12] [forDevs] (facBank) HTTP Server To Client Controller
What is this? A hacked client that allows for control from an http server. How does this work? The client will make a POST request to a http server along with hosting its own http server that accepts GET requests.
Alright lets get into the features :
Open Source
Posts chat to http server
Clicks with item on specified slot
Click chest slots
Easy to expand
Default Server Ports : 3000 for posting server & hosts server on port 8000
Default Chat request : https://127.0.0.1:8000/chat-Message
Default Inventory Selector and Clicker request : https://127.0.0.1:8000/inv-0 (Inventory ranges from 0-8)
Default Container Slot Clicker (stuff like chests) : https://127.0.0.1:800/cont-0 (Replace 0 with slot #. Slot # starts at 0 and goes left to right.)
Alright so why did I make this? I made it so I could control a minecraft account on a server from a website. The original intent was to have this serve as a bank for my faction and I could allow other players on my faction to retrieve money from it via a website. It is hyper-specific but I wish I had something like this when I was starting out 2 days ago.
How Do You Modify This? After opening eclipse navigate to Client > src > modController. The modServer class starts the server (Server class) and the modServerHandle function handles all GET requests to the client. Modify how the client handles GET requests in modServerHandle. To modify the server port change it in the Server class (default is 8000). The chat handler is in net.minecraft.client.gui.chat NormalChatListener class. It is marked with the comment "// BankBot". There you can see a POST example using the com.journaldev.utils HttpURLConnectionExample class. This is just some example code for a http requester but it works great for our purposes. The initializer for modServer runModServer is in net.minecraft.client Minecraft class marked by the comment "// facBank". This is initialized as soon as minecraft starts so feel free to initialize anything else there aswell.
1.12 Assets (For when recompiling and turning into playable .jar)
How to recompile :
How to open with eclipse :
SIDE NOTES :The example server code is a mess and is specialized for the mc.blockdrop.org server. Sorry if it gives you a hard time. Also I am very knew to Java programing and the client code has tons of unnecessary logs and weird code in the package I made. The client may freeze at times when terrain is loading, close and reopen server (Only had issue twice, can't reproduce). More features may never come, sorry ;(