GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HypixelDev/ForgeModAPI: Implementation of the Hypixel Mod API for the Forge Loader in 1.8.9

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
src/main
src/main
 
 
tweaker
tweaker
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Forge Mod API

This repository contains the implementation of the Hypixel Mod API for the Forge Mod Loader in 1.8.9 for end-users. If you are a developer, and are looking to utilise the API you should look at the core Hypixel Mod API repository.

Usage

Add the Hypixel Maven repository to your build:

repositories {
    maven("https://repo.hypixel.net/repository/Hypixel/")
}

Then depend on the Forge Mod API. This will automatically pull in dependencies too.

val version = "1.0.2"
dependencies {
    modImplementation("net.hypixel:mod-api-forge:$version")
    // If you use ForgeGradle 2 you might need to use fg.deobf or deobfCompile instead. Consult your MDK for tips on how
    // to depend on an obfuscated dependency
}

From here on out you can use the Hypixel Mod API directly.

Bundling the Hypixel Mod API

When using the Hypixel Mod API you need to instruct your users to download the mod api and put it in their mods folders.

Alternatively you can bundle a loading tweaker instead. This involves a bit more setup, but will result in your mod containing a copy of the mod api and at runtime selecting the newest available version of the mod api.

First you need to have a shadow plugin in your gradle setup. Note that normal fileTree based JAR copying does not work, since we will need to relocate some files. Instead, use the shadow plugin or make use of a template with the plugin already set up.

Once you have your shadow plugin set up you will need to include a new dependency:

dependencies {
    modImplementation("net.hypixel:mod-api-forge:$version") // You should already have this dependency from earlier
    shadowImpl("net.hypixel:mod-api-forge-tweaker:$version") // You need to add this dependency
}

Make sure to relocate the net.hypixel.modapi.tweaker package to a unique location such as my.modid.modapitweaker.

Finally, add a manifest entry to your JAR pointing the TweakClass to my.modid.modapitweaker.HypixelModAPITweaker (or otherwise load the tweaker using delegation).

tasks.shadowJar {
	configurations = listOf(shadowImpl)
    relocate("net.hypixel.modapi.tweaker", "my.modid.modapitweaker.HypixelModAPITweaker")
}

tasks.withType(org.gradle.jvm.tasks.Jar::class) {
	manifest.attributes.run {
		this["TweakClass"] = "my.modid.modapitweaker.HypixelModAPITweaker"
	}
}

Now your users will automatically use the bundled version of the mod api.

Contributing

If you wish to contribute to this implementation of the Mod API to offer improvements or fixes, you can do so by forking the repository and creating a pull request.

Important

Run gradlew setupDecompWorkspace after importing the project to generate the files required to build it

If IntelliJ still shows unknown symbol errors after running the command, you may need to clear the filesystem cache.

Testing Your Changes

You can enable DevAuth to log in to the Hypixel server with your Minecraft account. Please see the DevAuth docs for more details.

About

Implementation of the Hypixel Mod API for the Forge Loader in 1.8.9

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

4 watching

Forks

6 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.