{"id":20292821,"url":"https://github.com/groovymc/aplpkigb","last_synced_at":"2025-04-11T11:23:45.485Z","repository":{"id":41340224,"uuid":"369120923","full_name":"GroovyMC/APLPKIGB","owner":"GroovyMC","description":"The Grooviest language adapter in Forgeland","archived":false,"fork":false,"pushed_at":"2023-04-23T14:49:53.000Z","size":640,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"1.18.2","last_synced_at":"2025-03-25T07:41:43.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GroovyMC.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-20T07:32:06.000Z","updated_at":"2022-10-17T18:35:55.000Z","dependencies_parsed_at":"2023-02-14T11:02:00.192Z","dependency_job_id":null,"html_url":"https://github.com/GroovyMC/APLPKIGB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroovyMC%2FAPLPKIGB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroovyMC%2FAPLPKIGB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroovyMC%2FAPLPKIGB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GroovyMC%2FAPLPKIGB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GroovyMC","download_url":"https://codeload.github.com/GroovyMC/APLPKIGB/tar.gz/refs/heads/1.18.2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382338,"owners_count":21094559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T15:19:30.048Z","updated_at":"2025-04-11T11:23:45.464Z","avatar_url":"https://github.com/GroovyMC.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Austin's Powerful Language Provider: Keeping It Groovy Baby\n\nThe Grooviest language provider in Forgeland\n\n[![APLP version](https://img.shields.io/badge/dynamic/xml?label=Latest%20APLP%20version\u0026query=metadata//latest\u0026url=https://maven.moddinginquisition.org/releases/net/thesilkminer/mc/austin/aplp-1.18.2/maven-metadata.xml)](https://maven.moddinginquisition.org/#/releases/net/thesilkminer/mc/austin/aplp-1.18.2)\n\n## How to use\nThe recommended way to get started is to use the [1.18.2 branch of the GroovyMDK](https://github.com/GroovyMC/GroovyMDK/tree/1.18.2).\nIt contains everything you need to get started with Groovy modding in Minecraft 1.18.2. Alternatively, follow the steps below.\n\nTo use this language provider, simply add it as a dependency in your build script. The\nlanguage provider is available on Jared's maven, so you can simply add the following\nto your build script, replacing `${aplpVersion}` with the version of APLP you want to use:\n```groovy\nrepositories {\n    maven {\n        name 'Modding Inquisition Releases'\n        url = 'https://maven.moddinginquisition.org/releases'\n    }\n}\ndependencies {\n    compileOnly \"net.thesilkminer.mc.austin:aplp-1.18.2:${aplpVersion}\"\n    runtimeOnly \"net.thesilkminer.mc.austin:aplp-1.18.2:${aplpVersion}:all\"\n}\n```\n\nIn your `mods.toml`, specify `aplp` as the loader and the version of the software\nas `loaderVersion`. See the following for a bare-bones example:\n\n```toml\nmodLoader=\"aplp\"\nloaderVersion=\"[1,)\"\nlicense=\"All Rights Reserved\"\n\n[[mods]]\nmodId=\"mymojo\"\nversion=\"1.0.0\"\n```\n\nA bare-bones [mods.groovy](https://github.com/GroovyMC/ModsDotGroovy) example:\n```groovy\nModsDotGroovy.make {\n    modLoader = 'aplp'\n    loaderVersion = '[1,)'\n    license = 'All Rights Reserved'\n  \n    mod {\n        modId = 'mymojo'\n        version = '1.0.0'\n    }\n}\n```\n\nThe main mod class should have a no-arg constructor and be annotated with either\n`@Mojo` (suggested) or `@Mod` with its mod ID installed. Access to the mod and Forge\nbuses is provided respectively through the `modBus` and `forgeBus` properties:\n\n```groovy\n@Mojo(\"mymojo\")\nclass MyMojo {\n    private static final Logger LOGGER = LogManager.getLogger(MyMojo) // setup a logger\n  \n    MyMojo() {\n        LOGGER.info('Hello from Groovy-land!')\n\n        // register an FMLCommonSetupEvent listener with shorthand syntax\n        modBus.onCommonSetup {\n            LOGGER.info('Common setup!')\n        }\n      \n        // register an FMLClientSetupEvent listener with typed param closure syntax\n        if (FMLEnvironment.dist.isClient()) {\n            modBus.addListener { FMLClientSetupEvent event -\u003e\n                LOGGER.info('Client setup!')\n            }\n        }\n      \n        // register event handler classes or use APLP's @EventBusSubscriber\n        modBus.register(ModBusEventHandler)\n        forgeBus.register(ForgeBusEventHandler)\n    }\n}\n```\n\nThe `modBus` and `forgeBus` properties are added to your mod class at compile-time by the `@Mojo`/`@Mod`/`@GMod` annotation.\nFor IDE support, either install the [EnhancedGroovy](https://plugins.jetbrains.com/plugin/19844-enhancedgroovy) plugin\nor implement `BaseMojo` or `BaseMod` in your mod class, like so:\n\n```groovy\n@Mojo(\"mymojo\")\nfinal class MyMojo implements BaseMojo {\n    // ...\n}\n```\n\nAPLP also provides its own enhanced `@EventBusSubscriber` annotation. It works similar to Forge's, except it's more\nforgiving about method signatures (doesn't require static), doesn't require the mod ID to be specified, has a shorter\nsyntax and even supports registering event handlers only in certain environments (handy for dev-only testing event\nhandlers):\n\n```groovy\nimport net.thesilkminer.mc.austin.api.EventBusSubscriber\nimport net.thesilkminer.mc.austin.api.EventBus\nimport net.thesilkminer.mc.austin.api.Environment\nimport net.minecraftforge.api.distmarker.Dist\nimport net.minecraftforge.eventbus.api.SubscribeEvent\n\n// only subscribes event listeners if the mod is loaded in a development environment\n@EventBusSubscriber(bus = EventBus.MOD, dist = Dist.CLIENT, environment = Environment.DEV) // mod ID is optional\nfinal class ModBusEventHandler {\n    @SubscribeEvent\n    void onCommonSetup(final FMLCommonSetupEvent event) { // static is preferred, but not required\n      \n    }\n  \n    @SubscribeEvent\n    static void onClientSetup(final FMLClientSetupEvent event) {\n        \n    }\n}\n```\n\n### Groovy Version\n\nThe Groovy version provided by this language provider is: **4.0.11**.\n\nOnly actual releases will be supported by this language provider, not release candidates.\nMoreover, once a version of Forge is deemed to be production-ready (i.e. a Recommended\nBuild is published), both the major and minor components of the Groovy version will be\nlocked. Patch releases will instead be updated periodically.\n\n### Provided Modules\n\nThe modules that are provided by default in this language provider do not cover the\nwhole set of Groovy modules, but should still suffice for both common and some more\nparticular use cases.\n\n- **Standard Library**: The essential bits to allow Groovy to work.\n- **AST Builder**: Captures AST builders from code statements.\n- **Contracts**: Allows specification of invariants, pre-, and post-conditions.\n- **Date-Time**: Groovy extensions for the Java Date-Time library.\n- **Date-Util**: Groovy extensions for the older Java Date library.\n- **GINQ**: LINQ-style collection querying interfaces.\n- **JSON**: Read and write JSON with a Groovy-like interface.\n- **JSR223**: Allows usage of GroovyScript in the Java Scripting Engine.\n- **Macro**: Supports the usage of Groovy Macros.\n- **Macro Library**: Additional Macro extensions.\n- **NIO**: Extension methods to allow for NIO usage in a Groovy-like fashion.\n- **PicoCLI**: Allows for compact CLI interfaces.\n- **Templates**: Basic templating usage with a set of engines.\n- **TOML**: Read and write TOML with a Groovy-like interface.\n- **Type Checkers**: Allows verification of regex.\n- **XML**: Read and write XML with a Groovy-like interface.\n- **YAML**: Read and write YAML with a Groovy-like interface.\n\n### Dropped Modules\n\nSome modules have been dropped from this language provider due to various reasons. They\nare listed in the following text.\n\n- **Ant**: This module is not needed in a Minecraft environment, as ForgeGradle already\n  provides a dependency management system.\n  - Removed in version 1.1.0\n- **Binary**: Batch files to call Groovy programs are not required.\n- **BOM**: Useful only for development.\n- **BSF**: Not available.\n- **CLI Commons**: PicoCLI is already available.\n- **Compatibility with 2 \u0026 3**: No previous releases with Groovy 2 or Groovy 3 were made.\n- **Console**: Interactive execution of Groovy is outside the scope of this LP.\n- **Doc Generator**: Useful only for development.\n- **GroovyDoc**: Useful only for development.\n- **GroovySH**: Interactive execution of Groovy is outside the scope of this LP.\n- **JAXB**: Mainly used for Enterprise Development.\n- **JMX**: Profiling tools, hardly useful in production.\n- **JUnit 5 Test**\n  - Removed in version 1.2.0\n- **Servlet**: HTML web servers as MC mods?\n- **SQL**: Interacting with a SQL database is extremely rare.\n- **Swing**: Swing cannot be used in MC without major issues.\n- **Test**\n  - Removed in 1.2.0 \n- **TestNG**: Not used as much as JUnit.\n\nIf you disagree with any of these reasons, please reach out to discuss.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroovymc%2Faplpkigb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroovymc%2Faplpkigb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroovymc%2Faplpkigb/lists"}