Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +0,0 @@
# Example Mod

Template for making Babric mods for BTA!

**Note: *DO NOT fork this repository unless you want to contribute!***

## Prerequisites
- JDK for Java 21 ([Eclipse Temurin](https://adoptium.net/temurin/releases/) recommended)
- [Intellij IDEA](https://www.jetbrains.com/idea/download/) (Scroll down for the free community edition, if using linux **DO NOT** use the flatpak distribution)
- Minecraft Development plugin (Optional, but highly recommended)

## Setup instructions


1. Click the `Use this template` button on this repo's page above (Will only appear if logged in). Choose `Create a new repository`, you will be redirected to a new page. Enter your repo's name and description, and hit `Create repository`.
To get your project, open IntelliJ IDEA and click `Clone Repository` (`Get from VCS` on older versions). Select `Repository URL` and enter your repo's url

2. After the project has finished importing, close it and open it again.
If that does not work, open the right sidebar with `Gradle` on it, open `Tasks` > `fabric` and run `ideaSyncTask`.

3. Create a new run configuration by going in `Run > Edit Configurations`.
Then click on the plus icon and select Gradle. In the `Tasks and Arguments` field enter `build`.
Running it will build your finished jar files and put them in `build/libs/`.

4. Lastly, open `File` > `Settings` and head to `Build, Execution, Development` > `Build Tools` > `Gradle`.
Make sure `Build and run using` and `Run tests using` is set to `Gradle`.

5. Done! Now, all that's left is to change every mention of `examplemod` and `turniplabs` to your own mod id and mod group, respectively. Happy modding!

## Tips

1. If you haven't already you should join the BTA modding discord! https://discord.gg/FTUNJhswBT
2. You can set your username when launching the client run configuration by setting `--username <username>` in your program arguments.
3. When launching the server run configuration you may want to remove the `nogui` program argument in order to see the regular server GUI.
4. In Intellij you can double press shift or press ctrl+N to search class files, change the search from the default `Project Files` to `All Places` you can easily explore the classes for your dependencies and even BTA itself.
5. In Intellij if ctrl+left-click on a field or method you can quickly get information on when and where that field or method is assign or used.
6. Ensure IntelliJ is updated to the latest version. This is important because this template uses the latest Gradle version and if your IntelliJ installation is outdated, it may not support the latest version.
7. In the `examplemod.mixins.json` you'll see `"compatibilityLevel": "JAVA_${java}",` along with an error message from the `Minecraft Development` plugin stating `Cannot resolve compatibility level 'JAVA_${java}'`. You can safely ignore this. The Gradle build system has been set up to grab the Java version from your `gradle.properties` and replace `${java}` with it. So the compiled binary will properly have it as `JAVA_8`.

69 changes: 47 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,43 @@ loom {
customMinecraftMetadata.set("https://downloads.betterthanadventure.net/bta-client/${libs.versions.btaChannel.get()}/v${libs.versions.bta.get()}/manifest.json")
}
repositories {
mavenCentral()
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.fabricmc.net/") { name = "Fabric" }
maven("https://maven.thesignalumproject.net/infrastructure") { name = "SignalumMavenInfrastructure" }
maven("https://maven.thesignalumproject.net/releases") { name = "SignalumMavenReleases" }
ivy("https://github.com/Better-than-Adventure") {
patternLayout { artifact("[organisation]/releases/download/v[revision]/[module].jar") }
metadataSources { artifact() }
}
ivy("https://downloads.betterthanadventure.net/bta-client/${libs.versions.btaChannel.get()}/") {
patternLayout { artifact("/v[revision]/client.jar") }
metadataSources { artifact() }
}
ivy("https://downloads.betterthanadventure.net/bta-server/${libs.versions.btaChannel.get()}/") {
patternLayout { artifact("/v[revision]/server.jar") }
metadataSources { artifact() }
}
ivy("https://piston-data.mojang.com") {
patternLayout { artifact("v1/[organisation]/[revision]/[module].jar") }
metadataSources { artifact() }
}
maven("https://maven.fabricmc.net/") { name = "Fabric" }
maven("https://maven.thesignalumproject.net/infrastructure") { name = "SignalumMavenInfrastructure" }
maven("https://maven.thesignalumproject.net/releases") { name = "SignalumMavenReleases" }
ivy("https://github.com/Better-than-Adventure") {
patternLayout { artifact("[organisation]/releases/download/v[revision]/[module].jar") }
metadataSources { artifact() }
}
ivy("https://downloads.betterthanadventure.net/bta-client/${libs.versions.btaChannel.get()}/") {
patternLayout { artifact("/v[revision]/client.jar") }
metadataSources { artifact() }
}
ivy("https://downloads.betterthanadventure.net/bta-server/${libs.versions.btaChannel.get()}/") {
patternLayout { artifact("/v[revision]/server.jar") }
metadataSources { artifact() }
}
ivy("https://piston-data.mojang.com") {
patternLayout { artifact("v1/[organisation]/[revision]/[module].jar") }
metadataSources { artifact() }
}
ivy("https://github.com/") {
patternLayout { artifact("v1/[organisation]/[revision]/[module].jar") }
metadataSources { artifact() }
}
ivy ("https://github.com/"){
patternLayout { artifact("[organization]/[module]/releases/download/[revision]/[module]-[revision].jar")}
metadataSources { artifact() }
}
repositories {
exclusiveContent {
forRepository {
maven("https://api.modrinth.com/maven") { name = "Modrinth" }
}
filter { includeGroup("maven.modrinth") }
}
}
}
lwjgl {
version = libs.versions.lwjgl
Expand All @@ -48,11 +64,19 @@ dependencies {

runtimeOnly(libs.clientJar)
implementation(libs.loader)
// If you do not need Halplibe you can comment out or delete this line.
implementation(libs.halplibe)
implementation(libs.modMenu)
implementation(libs.legacyLwjgl)

compileOnly(libs.btwaila)
compileOnly(libs.commandly)

implementation(libs.dragonfly)
implementation(libs.catalyst.core)
implementation(libs.catalyst.effects)
implementation(libs.uselessNumerical.get().let { "${it.group}:${it.name}:${it.version}-${libs.versions.bta.get()}" })
implementation(libs.aether)

implementation(libs.slf4jApi)
implementation(libs.guava)
implementation(libs.log4j.slf4j2.impl)
Expand Down Expand Up @@ -118,7 +142,8 @@ tasks {
"fabricloader" to libs.versions.loader.get(),
"halplibe" to libs.versions.halplibe.get(),
"java" to libs.versions.java.get(),
"modmenu" to libs.versions.modMenu.get()
"modmenu" to libs.versions.modMenu.get(),
"aether" to libs.versions.aether.get()
)
inputs.properties(resourceMap)
filesMatching("fabric.mod.json") { expand(resourceMap) }
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ org.gradle.configuration-cache = false
##########################################################################
# Mod Properties
mod_version = 1.0.0
mod_group = turniplabs
mod_name = examplemod
mod_group = teamport
mod_name = aethersedge
##########################################################################
# Plugin Dependency
# Check this on https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention/
Expand Down
21 changes: 21 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ modMenu = "4.0.0"
halplibe = "5.3.3"
# Check this on https://github.com/Better-than-Adventure/legacy-lwjgl3/releases/latest/
legacyLwjgl = "1.0.6"
# Check this on https://maven.thesignalumproject.net/#/releases/sunsetsatellite/catalyst-core/
catalyst-core = "2.2.0"
# Check this on https://maven.thesignalumproject.net/#/releases/sunsetsatellite/catalyst-effects/
catalyst-effects = "2.5.3"
# Check this on https://maven.thesignalumproject.net/#/releases/useless/btwaila/
btwaila = "1.2.2-7.3_04"
# Check this on https://modrinth.com/mod/bta-uselessnumerical/versions/
uselessNumerical = "1.1.0"
# Check this on https://maven.thesignalumproject.net/#/releases/useless/dragonfly/
dragonfly = "1.7.0-alpha.7"
# Check this on https://github.com/Redart15/Commandly/releases/
commandly = "1.1.3+7.3_04"
# Check this on https://github.com/bta-team-port/better-with-aether/releases
aether = "1.0.0+7.3_04"
##########################################################################
# Dependencies
# Check this on https://central.sonatype.com/artifact/org.slf4j/slf4j-api/
Expand All @@ -46,6 +60,13 @@ loader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "loader
halplibe = { group = "turniplabs", name = "halplibe", version.ref = "halplibe" }
modMenu = { group = "turniplabs", name = "modmenu-bta", version.ref = "modMenu" }
legacyLwjgl = { group = "com.github.Better-than-Adventure", name = "legacy-lwjgl3", version.ref = "legacyLwjgl" }
dragonfly = { group = "useless", name = "dragonfly", version.ref = "dragonfly" }
catalyst-core = { group = "sunsetsatellite", name = "catalyst-core", version.ref = "catalyst-core" }
catalyst-effects = { group = "sunsetsatellite", name = "catalyst-effects", version.ref = "catalyst-effects" }
uselessNumerical = { group = "gungun974", name = "uselessnumerical", version.ref = "uselessNumerical" }
btwaila = { group = "useless", name = "btwaila", version.ref = "btwaila" }
commandly = { group = "redart15", name = "Commandly", version.ref = "commandly" }
aether = { group = "maven.modrinth", name = "better-with-aether-bta", version.ref = "aether" }
slf4jApi = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4jApi" }
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
log4j-slf4j2-impl = { group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version.ref = "log4j" }
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/teamport/aethersedge/AetherEdgeClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package teamport.aethersedge;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import turniplabs.halplibe.util.ClientStartEntrypoint;

import static teamport.aether.AetherMod.LOGGER;

@Environment(EnvType.CLIENT)
public class AetherEdgeClient implements ClientModInitializer, ClientStartEntrypoint {
@Override
public void onInitializeClient() {

}

@Override
public void beforeClientStart() {

}

@Override
public void afterClientStart() {
LOGGER.info("Aether's Edge client initialized.");
}
}
26 changes: 26 additions & 0 deletions src/main/java/teamport/aethersedge/AetherEdgeMod.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package teamport.aethersedge;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import teamport.aethersedge.item.AetherEdgeItems;
import turniplabs.halplibe.util.GameStartEntrypoint;

public class AetherEdgeMod implements ModInitializer, GameStartEntrypoint {
public static final String MOD_ID = "aethersedge";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

@Override
public void onInitialize() {
LOGGER.info("Aether's Edge initialized.");
}

@Override
public void beforeGameStart() {
AetherEdgeItems.init();
}

@Override
public void afterGameStart() {
}
}
43 changes: 43 additions & 0 deletions src/main/java/teamport/aethersedge/AetherEdgeModels.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package teamport.aethersedge;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.EntityRenderDispatcher;
import net.minecraft.client.render.TileEntityRenderDispatcher;
import net.minecraft.client.render.block.color.BlockColorDispatcher;
import net.minecraft.client.render.block.model.BlockModelDispatcher;
import net.minecraft.client.render.item.model.ItemModelDispatcher;
import net.minecraft.client.render.item.model.ItemModelStandard;
import teamport.aethersedge.item.AetherEdgeItems;
import turniplabs.halplibe.util.ModelEntrypoint;

@Environment(EnvType.CLIENT)
public class AetherEdgeModels implements ModelEntrypoint {
@Override
public void initBlockModels(BlockModelDispatcher dispatcher) {

}

@Override
public void initItemModels(ItemModelDispatcher dispatcher) {
dispatcher.addDispatch(new ItemModelStandard(AetherEdgeItems.TOOL_SWORD_PHOENIX, null).setIcon("aethersedge:item/tool_sword_phoenix").setFull3D().setFullBright());
dispatcher.addDispatch(new ItemModelStandard(AetherEdgeItems.TOOL_AXE_PHOENIX, null).setIcon("aethersedge:item/tool_axe_phoenix").setFull3D().setFullBright());
dispatcher.addDispatch(new ItemModelStandard(AetherEdgeItems.TOOL_PICKAXE_PHOENIX, null).setIcon("aethersedge:item/tool_pickaxe_phoenix").setFull3D().setFullBright());
dispatcher.addDispatch(new ItemModelStandard(AetherEdgeItems.TOOL_SHOVEL_PHOENIX, null).setIcon("aethersedge:item/tool_shovel_phoenix").setFull3D().setFullBright());
}

@Override
public void initEntityModels(EntityRenderDispatcher dispatcher) {

}

@Override
public void initTileEntityModels(TileEntityRenderDispatcher dispatcher) {

}

@Override
public void initBlockColors(BlockColorDispatcher dispatcher) {

}
}
18 changes: 18 additions & 0 deletions src/main/java/teamport/aethersedge/AetherEdgeRecipes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package teamport.aethersedge;

import turniplabs.halplibe.helper.RecipeBuilder;
import turniplabs.halplibe.util.RecipeEntrypoint;

import static teamport.aether.AetherMod.MOD_ID;

public class AetherEdgeRecipes implements RecipeEntrypoint {
@Override
public void onRecipesReady() {

}

@Override
public void initNamespaces() {
RecipeBuilder.initNameSpace(MOD_ID);
}
}
16 changes: 16 additions & 0 deletions src/main/java/teamport/aethersedge/AetherEdgeServer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package teamport.aethersedge;

import net.fabricmc.api.DedicatedServerModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

import static teamport.aether.AetherMod.LOGGER;

@Environment(EnvType.SERVER)
public class AetherEdgeServer implements DedicatedServerModInitializer {

@Override
public void onInitializeServer() {
LOGGER.info("Aether's Edge server initialized.");
}
}
64 changes: 64 additions & 0 deletions src/main/java/teamport/aethersedge/item/AetherEdgeItems.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package teamport.aethersedge.item;

import net.minecraft.core.item.Item;
import net.minecraft.core.item.material.ToolMaterial;
import net.minecraft.core.item.tag.ItemTags;
import turniplabs.halplibe.helper.ItemBuilder;

import static teamport.aether.AetherConfig.itemID;
import static teamport.aethersedge.AetherEdgeMod.MOD_ID;

@SuppressWarnings({"java:S1104", "java:S1444", "java:S3008"})
public final class AetherEdgeItems {
public static final ToolMaterial phoenix = (new ToolMaterial()).setDurability(1536).setEfficiency(8.0F, 10.0F).setMiningLevel(3);

public static Item TOOL_PICKAXE_PHOENIX;
public static Item TOOL_SHOVEL_PHOENIX;
public static Item TOOL_AXE_PHOENIX;
public static Item TOOL_SWORD_PHOENIX;

private static boolean hasInit = false;

private AetherEdgeItems() {
}

public static void init() {
if (!hasInit) {
hasInit = true;
initializeItems();
}
}

public static String itemKey(String string) {
return MOD_ID + ":item/" + string;
}

public static void initializeItems() {
registerArmor();
registerTool();
registerOther();
}

public static void registerOther() {

}

public static void registerTool() {
TOOL_SWORD_PHOENIX = new ItemBuilder(MOD_ID)
.setTags(ItemTags.PREVENT_CREATIVE_MINING)
.build(new ItemToolSwordPhoenix("tool.sword.phoenix", itemKey("tool_sword_phoenix"), itemID("TOOL_SWORD_PHOENIX"), phoenix));

TOOL_SHOVEL_PHOENIX = new ItemBuilder(MOD_ID)
.build(new ItemToolShovelPhoenix("tool.shovel.phoenix", itemKey("tool_shovel_phoenix"), itemID("TOOL_SHOVEL_PHOENIX"), phoenix));

TOOL_PICKAXE_PHOENIX = new ItemBuilder(MOD_ID)
.build(new ItemToolPickaxePhoenix("tool.pickaxe.phoenix", itemKey("tool_pickaxe_phoenix"), itemID("TOOL_PICKAXE_PHOENIX"), phoenix));

TOOL_AXE_PHOENIX = new ItemBuilder(MOD_ID)
.build(new ItemToolAxePhoenix("tool.axe.phoenix", itemKey("tool_axe_phoenix"), itemID("TOOL_AXE_PHOENIX"), phoenix));
}

public static void registerArmor() {

}
}
Loading
Loading