MindustryExtension

public class MindustryExtension

The main extension of Mgpp. It provides many configurations for Mindustry modding development:

  • meta: the mod.(h)json that will be included in the :jar task. You can modify this, but it only affects the output file.

Constructors

Link copied to clipboard
public MindustryExtension MindustryExtension(Project target)

Functions

Link copied to clipboard
public final Unit client(Function1<ClientSpec, Unit> func)
public final Unit client(Action<ClientSpec> func)

Configure the client to run and debug your mod on

Link copied to clipboard
public final Unit dependency(Function1<DependencySpec, Unit> func)
public final Unit dependency(Action<DependencySpec> func)

Configure the mindustry and arc dependency. You should call mindustryRepo and importMindustry to apply the configuration.

Link copied to clipboard
public final Unit deploy(Function1<DeploySpec, Unit> func)
public final Unit deploy(Action<DeploySpec> func)

Configure how to deploy your artifacts.

Link copied to clipboard
public final Property<ProjectType> get_projectType()
Link copied to clipboard
public final ModMeta getMeta()
Link copied to clipboard
public final Integer getOutOfDateTime()
Link copied to clipboard
public final ProjectType getProjectType()
Link copied to clipboard
public final Boolean isLib()
Link copied to clipboard
public final ModMeta ModMeta(Map<String, Object> info)
public final ModMeta ModMeta(    String name,     String displayName,     String author,     String description,     String subtitle,     String version,     String main,     String minGameVersion,     String repo,     List<String> dependencies,     Boolean hidden,     Boolean java,     Boolean keepOutlines)
Link copied to clipboard
public final Unit mods(Function1<ModsSpec, Unit> func)
public final Unit mods(Action<ModsSpec> func)

Configure what mod you want to work with.

Link copied to clipboard
public final Unit run(Function1<RunSpec, Unit> func)
public final Unit run(Action<RunSpec> func)

Configure how to run and debug the game.

Link copied to clipboard
public final Unit server(Function1<ServerSpec, Unit> func)
public final Unit server(Action<ServerSpec> func)

Configure the server to run and debug your mod on

Link copied to clipboard
public final Unit setLib(@InheritFromParent() Boolean isLib)
Link copied to clipboard
public final Unit setMeta(ModMeta meta)
Link copied to clipboard
public final Unit setOutOfDateTime(Integer outOfDateTime)
Link copied to clipboard
public final Unit setProjectType(ProjectType projectType)

Properties

Link copied to clipboard
public final ClientSpec _client
Link copied to clipboard
public final DependencySpec _dependency
Link copied to clipboard
@DisableIfWithout(plugin = "java")
public final DeploySpec _deploy
Link copied to clipboard
public final Property<Boolean> _isLib
Link copied to clipboard
public final Property<ModMeta> _modMeta
Link copied to clipboard
public final ModsSpec _mods
Link copied to clipboard
private final Property<ProjectType> _projectType
Link copied to clipboard
public final RunSpec _run
Link copied to clipboard
public final ServerSpec _server
Link copied to clipboard
private Boolean isLib

If this project is a library, its jar won't contain something a mod needs

Link copied to clipboard
private ModMeta meta

Configure mod.hjson for output purpose. It will automatically fetch the mod.(h)json from the following paths in order:

Link copied to clipboard
public final ProjectType Mod
Link copied to clipboard
private Integer outOfDateTime

The check time(sec) for latest version.

Link copied to clipboard
public final ProjectType Plugin
Link copied to clipboard
private ProjectType projectType

The project type will influence dependency resolution.