Skip to content

Commit

Permalink
Oh boy
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jan 21, 2024
1 parent d9f4b2a commit 5b9d53f
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 13 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ plugins {
id 'me.fallenbreath.yamlang' version '1.2.1' apply(false)
}

version = "${mod_version}+${minecraft_version}";
version = "${mod_version}+${minecraft_version}"

subprojects {
apply plugin: 'java'
apply plugin: 'me.fallenbreath.yamlang'

version = "${mod_version}+${minecraft_version}"

repositories {
// Personal maven for cicada and backup mirrors of some dependencies.
maven { url "https://maven.enjarai.dev/mirrors" }
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

base {
archivesName = "${mod_name}-common-${minecraft_version}"
archivesName = "${mod_id}-common"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public abstract class DebugHudMixin {
@Shadow @Final private MinecraftClient client;

@ModifyArgs(
@ModifyArgs( // TODO froge
method = "getLeftText",
at = @At(
value = "INVOKE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ public class Services {
// Inside the file you should write the fully qualified class name of the implementation to load for the platform. For
// example our file on Forge points to ForgePlatformHelper while Fabric points to FabricPlatformHelper.
public static <T> T load(Class<T> clazz) {
final T loadedService = ServiceLoader.load(clazz)
return ServiceLoader.load(clazz)
.findFirst()
.orElseThrow(() -> new NullPointerException("Failed to load service for " + clazz.getName()));
DoABarrelRoll.LOGGER.debug("Loaded {} for service {}", loadedService, clazz);
return loadedService;
}
}
2 changes: 1 addition & 1 deletion common/src/main/resources/do_a_barrel_roll.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"client.key.KeyBindingEntryMixin",
"client.key.KeyBindingMixin",
"client.roll.CameraMixin",
"client.roll.DebugHudMixin",

"client.roll.GameRendererMixin",
"client.roll.MouseMixin",
"client.roll.PlayerEntityRendererMixin",
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'dev.architectury.loom'
}
base {
archivesName = "${mod_name}-fabric-${minecraft_version}"
archivesName = "${mod_id}-fabric"
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
Expand Down
4 changes: 2 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

base {
archivesName = "${mod_name}-forge-${minecraft_version}"
archivesName = "${mod_id}-forge"
}

loom {
Expand Down Expand Up @@ -56,7 +56,7 @@ dependencies {

compileOnly project(":common")

modImplementation("dev.isxander.yacl:yet-another-config-lib-forge:${project.yacl_version}")
modCompileOnly("dev.isxander.yacl:yet-another-config-lib-forge:${project.yacl_version}")

implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${project.mixin_extras_version}"))
implementation(include("io.github.llamalad7:mixinextras-forge:${project.mixin_extras_version}"))
Expand Down
1 change: 0 additions & 1 deletion forge/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
loom.platform=forge
mod_version=${file.jarVersion}
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
package nl.enjarai.doabarrelroll;

import net.minecraftforge.client.ConfigScreenHandler;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLLoader;
import nl.enjarai.doabarrelroll.config.ModConfigScreen;

@Mod(DoABarrelRoll.MODID)
public class DoABarrelRollForge {
public DoABarrelRollForge() {
DoABarrelRoll.init();
if (FMLLoader.getDist().isClient()) {
DoABarrelRollClient.init();
}

ModLoadingContext.get().registerExtensionPoint(
ConfigScreenHandler.ConfigScreenFactory.class,
() -> new ConfigScreenHandler.ConfigScreenFactory(
(minecraft, parent) -> ModConfigScreen.create(parent)
)
);
}
}
2 changes: 1 addition & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ displayName = "${mod_name}" #mandatory
# A URL for the "homepage" for this mod, displayed in the mod UI
#displayURL="${mod_url}" #optional (displayed in the mod UI)
# A file name (in the root of the mod JAR) containing a logo for display
logoFile = "multiloader.png" #optional
logoFile = "assets/do_a_barrel_roll/icon.png" #optional
# A text field displayed in the mod UI
credits = "${mod_credits}" #optional
# A text field displayed in the mod UI
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.daemon=false

# Project
mod_version=3.4.0
group=com.example.examplemod
group=nl.enjarai

# Common
minecraft_version=1.20.1
Expand Down

0 comments on commit 5b9d53f

Please sign in to comment.