Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itrooz/appliedoverinternet
Applied energistics 2 viewer on a website
https://github.com/itrooz/appliedoverinternet
ae2 applied-energistics appliedenergistics minecraft
Last synced: about 2 months ago
JSON representation
Applied energistics 2 viewer on a website
- Host: GitHub
- URL: https://github.com/itrooz/appliedoverinternet
- Owner: iTrooz
- License: mpl-2.0
- Created: 2024-03-27T14:03:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-01T00:06:42.000Z (7 months ago)
- Last Synced: 2024-10-31T05:51:16.390Z (about 2 months ago)
- Topics: ae2, applied-energistics, appliedenergistics, minecraft
- Language: Python
- Homepage:
- Size: 1.96 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Applied Over Internet
![](images/website.png)
![](images/stats.png)The goal of this project is to be able to see the contents of an Applied Energistics 2 (Minecraft mod) inventory through a website.
# Installation instructions
## Prerequisites
- Minecraft Server that you can access (you will need to modify configs)
- CC:Tweaked mod (ComputerCraft)
- Advanced Peripherical mod
- already usable AE2 setup
- Actual server to run the python webserver on (Preferably the server hosting the Minecraft server itself)
- Being able to mess around with stuff, because this tutorial isn't fool-proof## Setup
### Retrieve the textures
- Install the mod https://github.com/CyclopsMC/IconExporter (https://www.curseforge.com/minecraft/mc-mods/iconexporter) and run the command `/iconexporter export` (in singleplayer, not on a physical server) to export the icons
- Find the output folder in your .minecraft directory, move it to the root of this cloned repository and rename it `input`
- Run the `reorder.py ` script, which will organise the textures in the `textures` folder.
- Move that `textures` folder to the server (hint: compress it for faster transfer)### Setup the webserver
- Create the .env file (see .env.example template) and modify the passwords
- Setup the python webserver
- (Easiest + Stats support) Either run `docker compose --profile app up`
- (Hardest + No stats support) Or run the `server.py` script (as a background program, with say `tmux` or `screen`) with `gunicorn -b 0.0.0.0:5000 server:app` (Don't use the flask default development server, for me it caused memory leaks due to creating a thread per request for some reason)
- (Optional) if you have an already existing nginx server (and/or want to go through to enable SSL), [here's a virtual host template](nginx_template.conf). And then do your stuff with Certbot### Setup the Minecraft server
- Modify the server CC:Tweaked configuration file to enable the HTTP API and restart your server
- the config can be found at `{world}/serverconfig/computercraft-server.toml`, set `enabled` to `true` in the `http` section
- if you are going to run the python webserver on your local machine/network, you also need to remove the rule that disables access to private IPs later in the file. It is the one with `host = "$private"`. [Click here for more info](https://tweaked.cc/guide/local_ips.html#cc-1.87.0)### In Minecraft
![](images/ingame.png)
*screenshot from the modpack ATM9*- Place your computer and your [ME bridge](https://advancedperipherals.madefor.cc/peripherals/me_bridge/) next to the AE2 network (the ME bridge must be connected to the AE2 network)
- Import [the following script](./send_request.lua) in the computer as the startup.lua script (either put it through `{world}/computercraft/computer/{id}` or upload it on pastebin)# Requests graph
```mermaid
flowchart TD
subgraph Server
webserver[Python webserver]
db[InfluxDB]
subgraph Minecraft
AE
CC[CC:Tweaked script]
CC -->|Requests data| AE
end
CC -->|Sends data| webserver
webserver -->|Sends data| dbgrafana[Grafana]
grafana -->|Requests data| db
end
user[User]
user -->|Requests inventory HTML| webserver
user -->|Requests stats HTML| grafana
```
Legend: Arrows going from A to B (A->B) means that A **sends a request** to B. It sends nothing about which way the data transits, it could go from A to B or B to A# Why ?
Because