Skip to content

Java API

fishstiz edited this page Mar 12, 2025 · 3 revisions

Important

The Minecraft Cursor Wiki has moved to:
https://fishstiz.github.io/minecraft-cursor-wiki/.

This page will no longer be updated.



Add Minecraft Cursor to your project.

Starting from 3.2.0, Minecraft Cursor artifacts will be hosted on GitHub (no authentication required).

Note: For versions older than 3.2.0, use the Modrinth Maven and add it to your project using modImplementation.

Add to Repositories

build.gradle:

repositories {
    maven {
        url = "https://raw.githubusercontent.com/fishstiz/maven/m2"
    }
}

Add Minecraft Cursor to your Dependencies

All available versions of minecraft-cursor-<loader> and minecraft-cursor-<loader>-api can be seen here: https://github.com/fishstiz/maven/tree/m2/io/github/fishstiz

Artifacts:

Note: The full mod includes the API as a nested JAR (jar-in-jar).

Artifact Name Description
minecraft-cursor-fabric Full mod compatible with Fabric.
minecraft-cursor-fabric-api API compatible with Fabric.
minecraft-cursor-neoforge Full mod compatible with Neoforge.
minecraft-cursor-forge Full mod compatible with Forge.
minecraft-cursor-common-api API compatible with Forge & Neoforge.

Fabric Loom (Fabric):

build.gradle:

dependencies {
    modCompileOnly "io.github.fishstiz:minecraft-cursor-fabric-api:<version>"
    modRuntimeOnly "io.github.fishstiz:minecraft-cursor-fabric:<version>"
}

ModDevGradle (NeoForge)

build.gradle:

dependencies {
    compileOnly "io.github.fishstiz:minecraft-cursor-common-api:<version>"
    runtimeOnly "io.github.fishstiz:minecraft-cursor-neoforge:<version>"
}

ForgeGradle (Forge)

Make sure to apply the MixinGradle plugin to make Minecraft Cursor work in dev environment of Forge.

build.gradle:

dependencies {
    compileOnly fg.deobf("io.github.fishstiz:minecraft-cursor-common-api:<vesion>")
    runtimeOnly fg.deobf("io.github.fishstiz:minecraft-cursor-forge:<version>")
}

ModDevGradle Legacy (Forge)

build.gradle:

dependencies {
    modCompileOnly "io.github.fishstiz:minecraft-cursor-common-api:<version>"
    modRuntimeOnly "io.github.fishstiz:minecraft-cursor-forge:<version>"
}

Minecraft Cursor Mod ID

Fabric: minecraft-cursor

Forge & NeoForge: minecraft_cursor

Why is the Mod ID different? Minecraft Cursor was initially only in Fabric, which supported dashes in the mod id. Forge & NeoForge does not, so the mod id was changed for both.

minecraft-cursor is still used for most identifiers such as the namespace and file names to avoid breaking changes.

Mojang Mappings

This wiki is written in yarn mappings. If you are using Mojang mappings, the most you need to know is this:

Yarn Mojang
Element GuiEventListener
ParentElement ContainerEventListener
HandledScreen AbstractContainerScreen

Next: Create Cursor Types
Create your own custom cursor types.

Clone this wiki locally