A Java Mindustry mod template that works on Android and PC. The Kotlin version of this mod can be seen here.

Related tags

Security OldEraJava
Overview

Mindustry Java Mod Template

A Java Mindustry mod template that works on Android and PC. The Kotlin version of this mod can be seen here.

Building for Desktop Testing

  1. Install JDK 16.
  2. Run gradlew jar [1].
  3. Your mod jar will be in the build/libs directory. Only use this version for testing on desktop. It will not work with Android. To build an Android-compatible version, you need the Android SDK. You can either let Github Actions handle this, or set it up yourself. See steps below.

Building through Github Actions

This repository is set up with Github Actions CI to automatically build the mod for you every commit. This requires a Github repository, for obvious reasons. To get a jar file that works for every platform, do the following:

  1. Make a Github repository with your mod name, and upload the contents of this repo to it. Perform any modifications necessary, then commit and push.
  2. Check the "Actions" tab on your repository page. Select the most recent commit in the list. If it completed successfully, there should be a download link under the "Artifacts" section.
  3. Click the download link (should be the name of your repo). This will download a zipped jar - not the jar file itself [2]! Unzip this file and import the jar contained within in Mindustry. This version should work both on Android and Desktop.

Building Locally

Building locally takes more time to set up, but shouldn't be a problem if you've done Android development before.

  1. Download the Android SDK, unzip it and set the ANDROID_HOME environment variable to its location.
  2. Make sure you have API level 30 installed, as well as any recent version of build tools (e.g. 30.0.1)
  3. Add a build-tools folder to your PATH. For example, if you have 30.0.1 installed, that would be $ANDROID_HOME/build-tools/30.0.1.
  4. Run gradlew deploy. If you did everything correctlly, this will create a jar file in the build/libs directory that can be run on both Android and desktop.

Adding Dependencies

Please note that all dependencies on Mindustry, Arc or its submodules must be declared as compileOnly in Gradle. Never use implementation for core Mindustry or Arc dependencies.

  • implementation places the entire dependency in the jar, which is, in most mod dependencies, very undesirable. You do not want the entirety of the Mindustry API included with your mod.
  • compileOnly means that the dependency is only around at compile time, and not included in the jar.

Only use implementation if you want to package another Java library with your mod, and that library is not present in Mindustry already.


[1] On Linux/Mac it's ./gradlew, but if you're using Linux I assume you know how to run executables properly anyway.
[2]: Yes, I know this is stupid. It's a Github UI limitation - while the jar itself is uploaded unzipped, there is currently no way to download it as a single file.

You might also like...

Vigour - An Android Fitness App that rewards users with Crypto for walking a certain amount of steps.

Vigour Group Project for 2022 Mobile Application Development. Our app rewards user with crypto after walking for a certain amount of steps. We will be

Sep 12, 2022

[Fabric Mod] Building Tools and Aesthetic Technology

[Fabric Mod] Building Tools and Aesthetic Technology

Important Information This repo is for Create: Refabricated, a Fabric port of Create. This project is not complete, and we do not recommend using it y

Dec 31, 2022

A simple HWID authentication system for your minecraft mod.

HWID-Authentication-System A simple HWID authentication system for your minecraft mod. This is a simple mod which can prevent unwanted users from runn

Dec 10, 2022

A simple HWID authentication system for your minecraft mod.

HWID-Authentication-System A simple HWID authentication system for your minecraft mod. This is a simple mod which can prevent unwanted users from runn

Dec 10, 2022

Hypixel-focused Quality of Life mod.

Hypixel-focused Quality of Life mod.

Hytilities Reborn User Guide What is Hytilities Reborn? Hytilities Reborn is a Hypixel focused Forge 1.8.9 mod based on Sk1er LLC's Hytilities, adding

Dec 26, 2022

A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).

OTP-Java A small and easy-to-use one-time password generator for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP). Table of Contents Features Ins

Dec 30, 2022

Examples and HowTos for BouncyCastle and Java Cryptography Extension (JCE)

CryptographicUtilities Examples and HowTos for BouncyCastle and Java Cryptography Extension (JCE) See class "/src/main/java/de/soderer/utilities/crypt

Dec 19, 2021

A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).

OTP-Java A small and easy-to-use one-time password generator for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP). Table of Contents Features Ins

Dec 30, 2022

Java Project based on Java and Encryption using Cryptography algorithms

Symmetric-Encryption-Cryptography-in-Java Java Project based on Java and Encryption using Cryptography algorithms Project Aim Develop Java program to

Feb 3, 2022
Owner
ExplerHD
A beginner developer knows java and javascript My Youtube :
ExplerHD
shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!

alex 1.1k Dec 18, 2022
Log4Shell RCE exploit using a gadget class. Not dependent on an old JDK version to work.

Log4Shell RCE exploit using a gadget class. Not dependent on an old JDK version to work.

null 8 Jan 4, 2022
This application can recognize the sign language alphabets and help people who do not understand sign language to communicate with the speech and hearing impaired.

Sign Language Recognition App This application can recognize the sign language alphabets and help people who do not understand sign language to commun

Mihir Gandhi 12 Oct 7, 2021
Java JWT: JSON Web Token for Java and Android

Java JWT: JSON Web Token for Java and Android JJWT aims to be the easiest to use and understand library for creating and verifying JSON Web Tokens (JW

null 8.8k Dec 30, 2022
A plugin for the ja-netfilter, it can block http requests.

plugin-url A plugin for the ja-netfilter, it can block http requests. Use the mvn clean package command to compile and use url-vX.X.X-jar-with-depende

null 20 May 22, 2022
Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928

Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928, a `writeToParcel`/`createFromParcel` serialization mismatch in `OutputConfiguration`

null 52 Dec 30, 2022
Arkhota, a web brute forcer for Android.

Arkhota, a web brute forcer for Android What? Arkhota is a web (HTTP/S) brute forcer for Android. Why? A web brute forcer is always in a hacker's comp

ALW1EZ 55 Jan 6, 2023
This is an android library to represent password strength.

PasswordStrengthView This is an android library to represent password strength. Preview How to use? Add maven to your project gradle file allprojects

null 33 Jan 3, 2022
Projeto 2, app mobile de Ordens de Serviços da aula de Tópicos Especiais em Informática do curso de Análise e Desenvolvimento de Sistemas da FATEC - São Caetano do Sul, com android studio.

Projeto 2 Sistema Ordem De Serviço Tópicos Especiais em Informática TIPO DE NEGÓCIO: EMPRESA DE DESENVOLVIMENTO DE SOFTWARES OBJETIVO: Implementar um

Vicente Luz 1 Jun 28, 2022