diff --git a/.gitignore b/.gitignore index 435a4bc..3f91b7d 100644 --- a/.gitignore +++ b/.gitignore @@ -155,3 +155,5 @@ gradle-app.setting .DS_Store Thumbs.db android/libs/ +.vscode/settings.json +.gitignore diff --git a/build.gradle b/build.gradle index 92bd4b2..3aa45b6 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ repositories{ java{ targetCompatibility = 8 + sourceCompatibility = JavaVersion.VERSION_17 } diff --git a/mod.hjson b/mod.hjson index 5b5614c..cd42711 100644 --- a/mod.hjson +++ b/mod.hjson @@ -1,3 +1,5 @@ +#See possible options in mindustry.mod.Mods.Mods.toString() + #the mod name as displayed in-game displayName: "Java Mod Template" @@ -21,3 +23,5 @@ minGameVersion: 145 #this is a java mod java: true + +hidden: true diff --git a/src/example/ExampleJavaMod.java b/src/example/ExampleJavaMod.java index e500367..a614285 100644 --- a/src/example/ExampleJavaMod.java +++ b/src/example/ExampleJavaMod.java @@ -1,13 +1,7 @@ package example; -import arc.*; import arc.util.*; -import mindustry.*; -import mindustry.content.*; -import mindustry.game.EventType.*; -import mindustry.gen.*; import mindustry.mod.*; -import mindustry.ui.dialogs.*; public class ExampleJavaMod extends Mod{ @@ -15,22 +9,10 @@ public ExampleJavaMod(){ Log.info("Loaded ExampleJavaMod constructor."); //listen for game load event - Events.on(ClientLoadEvent.class, e -> { - //show dialog upon startup - Time.runTask(10f, () -> { - BaseDialog dialog = new BaseDialog("frog"); - dialog.cont.add("behold").row(); - //mod sprites are prefixed with the mod name (this mod is called 'example-java-mod' in its config) - dialog.cont.image(Core.atlas.find("example-java-mod-frog")).pad(20f).row(); - dialog.cont.button("I see", dialog::hide).size(100f, 50f); - dialog.show(); - }); - }); - } - @Override - public void loadContent(){ - Log.info("Loading some example content."); + + } + }