Mindustry Java Mod Template

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 17.
  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...

A Spigot latest maven starter template.

NAME One sentence to describe your plugin. Introduction Describe your plugin clearly. Features Feature 1 Dependencies Commands /command Command functi

Jul 1, 2022

A template repository for new extensions.

SAP CX Template The sapcxtemplate extension improves ... FEATURE DESCRIPTION COPY-TEXT INTRODUCTION How to activate and use COPY-TEXT ACTIVATION / SET

Dec 15, 2022

JavaFX or Swing + jpackage + Maven template project for generating native desktop applications.

Java + Maven + GitHub Actions = Native Desktop Apps JavaFX or Swing + jpackage + Maven template project for generating native desktop applications. Go

Dec 24, 2022

This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap

This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap

This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap. It has an automatic database creation, auto initial load of the data, with different variety of users. It also has a checkstyle to check the proper coding of your project immediately right after you enter the code.

Oct 21, 2022

A supercharged gradle template for developing Minecraft plugins with multi platform support.

Minecraft Multi-Platform Template You can use this template to develop your own high quality Minecraft plugins for multiple platforms using Gradle wit

Nov 23, 2022

This application will help you to generate Elasticsearch template based on your data

Welcome to templates generator application for Elasticsearch This application will help you to generate the template and/or test index, based on your

Jan 2, 2023

A template for a Forge + Fabric project setup using a Common source set.

MultiLoader Template This project provides a Gradle project template that can compile mods for both Forge and Fabric using a common sourceset. This pr

Jan 5, 2023

A React Native Template for installing a working ClojureScript, Krell, and Storybook environment

A React Native Template for ClojureScript, Krell, and Storybook Getting Started npx react-native init YourProjectName --template react-native-template

Dec 23, 2022

This bare project template includes a minimal setup for using unimodules with React Native tvOS.

What This is a clone of expo's bare minimal template which includes a minimal setup for using unimodules with React Native. Additionally, this templat

Dec 25, 2022
Comments
  • Turretporting

    Turretporting

    coilgun should be "Fires powerful bullets at a somewhat slow rate" instead of "An upgraded Ripple. Fires large amounts of bullets at once."

    "Glass doped with radium." should be changed to "Glass infused with radium"

    firenado's "Floods thick lava on the enemies." should be changed to "Shoots high amounts of molten slag at enemies"

    opened by meowkitty9694e 1
Owner
IvyX
IvyX
a mindustry v7 mod written in java. made by 12three7#5723.

Binary0011 a binary themed mod for mindustry v7. the "Java port" and complete rework of my old (hjson) mod "Binary0011". the way you can compile/imple

1237 16 Sep 1, 2022
Template mod to make an addon mod for Create fabric.

Create Fabric Addon Template This template mod comes pre-configured for developing an addon mod for Create on Fabric. Setup For environment setup inst

null 14 Dec 29, 2022
Official Quilt template mod.

Quilt Template Mod The official Quilt template Mod. You can use it as a template for your own mods! Usage In order to use this mod as a template: Crea

null 117 Jan 2, 2023
Official Quilt template mod.

Quilt Template Mod The official Quilt template Mod. You can use it as a template for your own mods! Usage In order to use this mod as a template: Crea

null 32 May 7, 2022
A Java-based template project for the FastJ Game Engine.

FastJ Java Template Program Requirements Java 16 JDK Basic understanding of Java Initial Setup Download the Template You have a few options for gettin

Andrew Dey 13 May 15, 2022
The shortest possible maven template / quickstarter for Java 16

The shortest possible Java 16 maven quickstarter The shortest possible Apache Maven template for Java 16 usage git clone https://github.com/AdamBien/j

Adam Bien 6 Nov 8, 2021
Spring Cloud Netflix Hystrix Dashboard template resolution vulnerability CVE-2021-22053

CVE-2021-22053: Spring Cloud Netflix Hystrix Dashboard template resolution vulnerability Severity High Vendor Spring by VMware Description Application

SCSL 38 Dec 16, 2022
A boilerplate project designed to work as a template for new microservices and help you get in touch with various useful concepts.

Microservice Reference Project This project is inspired by the idea to quickly create a production ready project with all the required infrastructure

Innovation & Tech 4 Dec 17, 2022
Template to speed up your development in React Native projects.

React Native SpaceShip I created this template with the purpose of leaving the development environment already configured for use. ?? How to use it in

Lucas Augusto 3 Mar 23, 2022
With this template, you are ste to deploy your application to Heroku

Template for deployment With this template, you are ste to deploy your application to Heroku. I´m using a Spring backend, React JS Frontend with Mongo

Thomas Kittlaus 4 Jun 23, 2022