Skip to content

Getting started

Crystal Spider edited this page Dec 31, 2024 · 6 revisions

Add as a dependency

Since HWE is built on a MultiLoader environment, you can depend on it regardless of whether you use a MultiLoader environment too or not.

Note: if you're not using a MultiLoader environment, the root build.gradle and the loader-specific build.gradle are the same, and you don't need HWE common module.

Crystal Nest Maven repository

In your root build.gradle add the following repository:

repositories {
  // Required only for 1.18.2
  maven { url = "https://jitpack.io" }
  // Crystal Nest repository where Harvest with ease is hosted.
  exclusiveContent {
    forRepository {
      maven {
        name = "Crystal Nest"
        url = "https://maven.crystalnest.it"
      }
    }
    filter {
      includeGroup "it.crystalnest"
    }
  }
  // Fuzs repository where Harvest with ease required dependency FCAP is hosted.
  maven {
    name = "Fuzs Mod Resources"
    url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
  }
}

Specify HWE version

In your gradle.properties add this line:

hwe_version = 9.4.0

Make sure to point to the latest version.

Import HWE common module

In your common build.gradle add the following dependency:

dependencies {
  implementation "it.crystalnest:harvest-with-ease-common:$minecraft_version-$hwe_version"
}

Import HWE loader-specific modules

Fabric

In your fabric build.gradle add the following dependency:

dependencies {
  modImplementation "it.crystalnest:harvest-with-ease-fabric:$minecraft_version-$hwe_version"
}
NeoForge

In your neoforge build.gradle add the following dependency:

dependencies {
  implementation "it.crystalnest:harvest-with-ease-neoforge:$minecraft_version-$hwe_version"
}
The NeoForge module is available since version 1.20.2.
Forge

In your forge build.gradle add the following dependency:

dependencies {
  // Forge deobfuscation strips dependencies, so you need to import Cobweb too. If missing, add the version property and set it to 1.0.0
  implementation fg.deobf("it.crystalnest:cobweb-forge:$minecraft_version-$cobweb_version")
  implementation fg.deobf("it.crystalnest:harvest-with-ease-forge:$minecraft_version-$hwe_version")
}
The Forge module is unavailable since version 1.21.

Declare HWE dependency

Depending on the mod loader, you need to declare HWE dependency in different ways.

Fabric

In your fabric.mods.json add the following dependency:

"depends": {
  "harvest_with_ease": "^${hwe_version}"
}
NeoForge

In your mods.toml (neoforge.mods.toml since 1.20.5) add the following dependency:

[[dependencies.${mod_id}]]
  modId = "harvest_with_ease"
  # Change this to "optional" if Harvest with ease is not required.
  # Change this field to use Forge syntax if on 1.20.2
  type = "required"
  versionRange = "[${hwe_version},)"
  ordering = "AFTER"
  side = "BOTH"
Forge

In your mods.toml add the following dependency:

[[dependencies.${mod_id}]]
  modId = "harvest_with_ease"
  mandatory = true # Change this to false if Harvest with ease is not required.
  versionRange = "[${hwe_version},)"
  ordering = "AFTER"
  side = "BOTH"