-
Notifications
You must be signed in to change notification settings - Fork 14
Developing
This is a guide for add-on developers. This is not a Java tutorial nor a "how to make a mod" tutorial. Basic knowledge is required. The guide is made for the Forge version of Advanced Netherite, Fabric add-ons are currently not supported.
- Basic knowledge of the Java programming language + experience with the Forge Modding API
- IDE (Integrated Development Environment), preferably IntelliJ IDEA
- JDK (Java Development Kit)
First, download a new MDK from te Forge website.
Extract the .zip
file and import it as a project into your IDE.
There are countless methods to add Advanced Netherite to your development environment, but I will cover two of them.
Pros | Cons | |
---|---|---|
Jitpack.io | Includes javadocs | More work to add |
CurseMaven | Works with every mod on CurseForge | Does not include javadocs |
It is recommended for add-on developers to use Jitpack.io. Both methods are explained below.
Add the code below to your build.gradle
:
/* This block goes at the top of your buildscript! */
buildscript {
repositories {
/* MinecraftForge repository here */
maven { url = "https://jitpack.io" }
/* MavenCentral repository here */
}
/* ForgeGradle dependency here */
}
/* This block should be above the dependencies {} block (as seen below) */
repositories {
maven {
url = "https://jitpack.io"
}
}
dependencies {
/* Minecraft dependency here! */
implementation fg.deobf('com.github.Autovw:AdvancedNetherite:<version_tag>')
}
You can find all the existing version tags here!
The CurseMaven method. Use the Jitpack.io method if you are creating an add-on.
First, we will need to add some code to the build.gradle
:
/* This block should be above the dependencies {} block (as seen below) */
repositories {
maven {
url = "https://www.cursemaven.com"
}
}
// <file_id>
// 1.11.1-1.18.2: 3780624
// 1.10.2-1.18.1: 3670770
// 1.10.2-1.17.1: 3670769
// 1.11.0-1.16.5: 3772641
dependencies {
/* Minecraft dependency here! */
implementation fg.deobf('curse.maven:advancednetherite-495336:<file_id>')
}
More information about adding a Cursemaven project to the build.gradle
can be found here!
A full list of Advanced Netherite versions can be found here!
When creating an add-on for Advanced Netherite you will also need to add some code to your mods.toml
which will tell Forge that your mod requires Advanced Netherite.
# Minecraft and Forge dependency should be above here!
[[dependencies.your_mod_id]]
modId="advancednetherite"
mandatory=true #or false if this mod is not required on the user end.
versionRange="[1.10.2,)"
ordering="NONE"
side="BOTH"
More information about the mods.toml
can be found here!
The development of an add-on will be similar to that of making a standalone mod, but with some additional features that will make the development easier.
Do's and Dont's
- Try to avoid using classes from
com.autovw.advancednetherite.content.*
as they are meant for internal usage, feel free to use them as an example, however. Instead it is recommended to use/extend the classes fromcom.autovw.advancednetherite.common.*
instead. - You can create a simple translatable tooltip using the
Tooltips
class, located inside theapi
package. Deprecated in 1.12.0, replaced byTooltipBuilder
-
Creating new tools and/or armor? It is recommended to create your own
enum
containing the tiers/materials instead of using the internal ones from Advanced Netherite. -
Use data generators! You don't need to write item models, blockstates, recipes etc. yourself, you can just use a data generator which does that for you!
Take a look at the classes inside
com.autovw.advancednetherite.datagen.*
for examples/providers! - Extending classes from the
common
package? Avoid overriding methods marked as@Internal
, instead use the alternative linked in the javadoc. This way you'll still keep compatibility with special, configurable, features from Advanced Netherite. - Want to add perks from the mod to armor without extending one of the classes provided by the mod? Implement
IAdvancedHooks
. (v1.12.0 and above)
Read the code/javadocs for more documentation!
The source code of the mod can be viewed here!
Join Autovw's Modding Community Discord Server to get notified about updates, mod support and more!
Getting started
Everything you need to know
Development/Technical stuff