1
0
This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2023-06-17 15:24:48 +02:00
javadoc add javadoc 2023-06-17 09:48:38 +02:00
out/artifacts/MinecraftController_jar add JAR 2023-06-17 15:24:48 +02:00
src add token parameter 2023-06-17 14:58:10 +02:00
.gitignore some tests 2023-05-05 16:26:16 +02:00
LICENSE Field & Web componnent (#13) 2023-06-02 14:26:46 +02:00
Minecraft.iml Initial commit 2023-05-02 11:57:51 +00:00
pom.xml Initial commit 2023-05-02 11:57:51 +00:00
README.md Update README.md 2023-06-17 09:33:56 +02:00

Minecraft Base Project

IntelliJ base project related to Minecraft Lab of 221_SIn & 231_SIn course

Purpose

This project is made during the 4th semester of study in Industrial Systems at the University of Engineering in Sion, Wallis, Switzerland. It is used to learn the basics of DevOps, Database, web development and modbus communication. This project is made by a group of 2 students. This project was made during 7 weeks and cut into 6 parts. The goal of this project is to interface a Minecraft mod. This mod is a simulation of a micro-gri. Our goal is to read electrical value from the Minecraft world and save it in database, display it on a web page and finally send regulation value to the Minecraft world for keep the micro-gri stable. To reach this goal, we have to use a modbus communication between the Minecraft world and our program. The program is divided into 6 parts:

Core part

The core part is the main part of the project. It is the part that will be used to communicate with the other parts. In Core, we have the management of DataPoints. A DataPoint is a virtual copy of a Minecraft input or output. In Core, we have a static Map of DataPoints. The key of the map is the name of the DataPoint and the value is the DataPoint itself. The DataPoint class is an abstract class. It has 2 subclasses, FloatDataPoint and BooleanDataPoint.

Database part

The database part is the part that will be used to store the DataPoints. All DataPoints are send with a http POST request to the database. The database use in this project is InfluxDB. InfluxDB is a time series database. We use after Grafana to display the data. Database part can also erase all the data in the database. The time management is also on this class. The goal of this class is to convert the time from the Minecraft server to the real time. We start to send data to the database only when the Minecraft server is started.

Web part

The web part is the part that will be used to display the data from the database. We already have a web page that is given by teacher. We use a websocket to interface with web page. With this web page we can read Minecraft data and set some regulation value. We also add a switch to start or stop the smart part.

Modbus part

The modbus part is the part that will be used to communicate with the Minecraft world. We use the modbus TCP communication. We use the library modbus4j.

Field part

The field part is the part that will be used to connect modbus part to the core part. We read a csv file to know all the modbus address and the name of the DataPoint. With this file, we can link DataPoint to minecraft input or output.

Smart part

The smart part is the part that will be used to send regulation value to the Minecraft world. We make a very simple regulation just for keep the grid alive during the time of the simulation. We stop our program when the Minecraft simulation send a score. This score is how many production we have made with the factory during the simulation. So the goal is to maximize this score. We didn't have time to make a better regulation.

How to use

To use this project you can just download the last release and run the JAR file with some arguments. The arguments are: