Skip to content

Java API

fishstiz edited this page Feb 25, 2025 · 3 revisions

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://github.com/fishstiz/maven/raw/m2"
    }
}

Add Minecraft Cursor to your Dependencies

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

gradle.properties:

minecraftcursor_version=<version>

build.gradle:

dependencies {
    modCompileOnly "io.github.fishstiz:minecraft-cursor-api:${project.minecraftcursor_version}"
    modRuntimeOnly "io.github.fishstiz:minecraft-cursor:${project.minecraftcursor_version}"
}

(Optional) Make Minecraft Cursor a Required Dependency

You should declare Minecraft Cursor as a required dependency if need to use it directly in your mod's code. You do not need to do this if you are only using Minecraft Cursor code within MinecraftCursorInitializer entrypoint or, outside that, properly check if the Minecraft Cursor mod is loaded before using any of its code.

fabric.mod.json:

"depends" {
    "minecraft-cursor": "<version>"
}

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

Clone this wiki locally