GasLirary
is a Mindustry java mod library for making new content type: Gas.
Gas is created in the same way as Item or Liquid, but in terms of parameters it is very similar to Liquid YourGasses.java
package example;
import arc.graphics.Color;
import gas.type.Gas;
public class YourGasses {
public static Gas oxygen;
public static void load() {
oxygen=new Gas("oxygen"){{
color = Color.valueOf("bcf9ff");
flammability = 0.7f;
explosiveness = 0.9f;
}};
}
}
Add this line
consumeGasses(GasStack.with(YourGasses.gas, amount));
to your block initialization like this:
new GasBlock("your-block"){{
consumeGasses(GasStack.with(YourGasses.gas, amount));
}};
You can see all the classes and static method added by the mod here If you did not find the class you need, then you can make a Pull request or Issues.
- Zelaux(main-programmer)
-
1.Go to releases.
-
2.Download the latest .jar file.
-
3.Launch Mindustry.
-
4.Open "Mods".
-
5."Import Mod".
-
6."Impot File"
-
7.Find file with name "GasLirary.jar" and click "load".
-
8.Play!
-
1.Go to in-game Mod Browser.
-
2.Find "GasLirary" in mod list.
-
3.Download.
-
1.Download intelijIDEA.
-
2.Clone this repository.
-
3.When importing is end, go to Intelij console and type:
Windows | MacOSX | Linux |
---|---|---|
gradlew jar | ./gradlew jar | ./gradlew jar |
- 4.When compilation is end, your build will be in "build/libs" Download
Depend via Gradle:
dependencies {
implementation 'com.github.Zelaux.GasLibrary:core:v1.7.0'
}
And don't forget to add the dependency to your mod.(h)json
dependencies: ["gas-library-java"]