• Stars
    star
    102
  • Rank 325,035 (Top 7 %)
  • Language
    Java
  • Created over 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A template for Java (16-17) Mindustry mods.

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.

More Repositories

1

Mindustry

The automation tower defense RTS
Java
21,240
star
2

MindustryBuilds

Latest builds for Mindustry
451
star
3

Arc

A Java game development framework based off of libGDX.
Java
291
star
4

animdustry

the anime gacha rhythm game
Nim
212
star
5

MindustryMods

A public auto-generated list of mods used in Mindustry. Updates every 2 hours.
Java
194
star
6

Mindustry-Suggestions

Repository for Mindustry suggestions and feedback
121
star
7

Koru

A 2D multiplayer sandbox game.
Java
87
star
8

Anuken

86
star
9

nimdustry

Experimental nim version of Mindustry
Nim
50
star
10

fau

WIP Nim game framework - currently in the early prototype phase, no documentation.
Nim
48
star
11

Mindustry-Classic

The classic version of Mindustry
Java
48
star
12

CoreBot

Bot for the Mindustry Discord.
Java
38
star
13

GDXGifRecorder

A utility class for libGDX that records a GIF and saves it automatically.
Java
38
star
14

Novix

A pixel art editor for Android.
Java
32
star
15

HexedPlugin

A custom battle-royale-like gamemode for Mindustry. Spawns players in hexagonal arenas.
Java
31
star
16

Egg

egg
Nim
29
star
17

MindustryPluginTemplate

The template & example repository for Mindustry server plugins
Java
28
star
18

anuken.github.io

My website.
JavaScript
25
star
19

wind3

it was just the wind
Nim
23
star
20

MindustryJitpack

mindustry """mirror""" for stupid jitpack reasons, please ignore
Java
20
star
21

absume

48-hour game jam project for new year's
Nim
19
star
22

MindustryKotlinModTemplate

A sample Mindustry mod written in Kotlin.
Kotlin
18
star
23

Mirage

An image-based sound visualizer.
Java
13
star
24

Novi

A 2D multiplayer shooter.
Java
13
star
25

AuthorizePlugin

A plugin that prevents world interaction without authorization
Java
12
star
26

Inferno

Unfinished bullet hell bossfight
Java
12
star
27

L-Systems

An L-system editor
Java
11
star
28

uCore

The core for all my libGDX projects. Discontinued.
Java
11
star
29

nimovi

WIP Nim pixel editor for mobile
Nim
10
star
30

LudumDare46

Ludum Dare 46 entry
Java
9
star
31

ld48

Ludum Dare 48 entry
Nim
8
star
32

Mindustry-Legacy

Legacy code from Mindustry organized by branches
8
star
33

BoardControl

A C# application that allows translating Wii balance board interaction to keystrokes
C#
7
star
34

CurseFilterPlugin

Mindustry plugin for filtering inappropriate words
Java
6
star
35

Fluxe

Tool that makes 2D pixel art out of procedurally generated voxel models.
Java
6
star
36

ProceduralGDX

Various procedural generation experiments in libGDX
Java
5
star
37

Sanctre

A hack-n-slash shooter
Java
5
star
38

Starflux

A procedural planet generator add-on for Galacticraft.
Java
5
star
39

SevenSwords

A chat game about leveling up and fighting monsters.
Java
5
star
40

GDXLayered3D

A library for libGDX that renders pseudo-3D voxel objects with 2D textures stacked on top of each other.
Java
5
star
41

ProjectHome

An entry for RemakeJam
Java
5
star
42

RateLimitPlugin

Mindustry plugin for limiting interaction with blocks
Java
4
star
43

ArcSetup

Small project templating tool for Arc
Java
4
star
44

Pixtigen

Application that generates pixel trees out of polygons.
Java
4
star
45

ggj2021

Nim
3
star
46

fourspire

A game written in Nim, using SDL2.
Nim
3
star
47

CodeTesting

A project for testing various concepts and game mechanics.
Java
3
star
48

Myri

An experiment with dynamic animation and soft meshes.
Java
3
star
49

nimsoloud

Static, minimal wrapper of Soloud
Nim
3
star
50

Duel

An entry for LD38 - Duel an AI 1v1 in a bullet hell shooter.
Java
2
star
51

EmpireBuilder

Repository for SSRP 2019, Empire Builder/Eurorails AI implementation
Java
2
star
52

Plasmo

A shoot-em-up made for the GDL Boss Jam.
Java
2
star
53

LudumDare42

Vita Magicae - Ludum Dare 42 entry
Java
2
star
54

EvalPlugin

(Deprecated) A Mindustry plugin to evaluate server-side Java code
Java
2
star
55

Wobble

An entry for the GDL July Jam
Java
2
star
56

PxlCubes

An isometric visualizer for pxls.space
JavaScript
2
star
57

Permute

An entry for the GDL June Gene Jam
Java
1
star
58

uCoreSetup

Custom libGDX setup for use with uCore
Java
1
star
59

teavm-gradle

TeaVM Gradle plugin
Java
1
star