From ad5f8f848629b659aef9a7867f22189e2b71e06a Mon Sep 17 00:00:00 2001 From: enjarai Date: Sat, 12 Oct 2024 12:38:01 +0200 Subject: [PATCH] Sigh... --- CHANGELOG.md | 3 +- build.gradle.kts | 6 ++ gradle.properties | 3 +- .../cameraoverhaul/CameraOverhaulPlugin.java | 14 ---- .../mixin/CameraSystemMixin.java | 71 ------------------- ...rel_roll.compat.cameraoverhaul.mixins.json | 16 ----- src/main/resources/fabric.mod.json | 1 - versions/1.21-fabric/gradle.properties | 3 +- versions/1.21-neoforge/gradle.properties | 1 + 9 files changed, 12 insertions(+), 106 deletions(-) delete mode 100644 src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/CameraOverhaulPlugin.java delete mode 100644 src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/mixin/CameraSystemMixin.java delete mode 100644 src/main/resources/do_a_barrel_roll.compat.cameraoverhaul.mixins.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 185a17e..8770e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1 @@ -- Fixed a critical crash at startup. -- Fixed some other minor issues. +- Removed broken compatibility with Camera Overhaul. diff --git a/build.gradle.kts b/build.gradle.kts index fba02b2..23e8a16 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -93,6 +93,12 @@ dependencies { val (modid, version) = it.split('=') modCompileOnly(modrinth(modid, version)) } + for (it in property("deps.compat_runtime").toString().split(',')) { + @Suppress("UselessCallOnNotNull") + if (it.isNullOrBlank()) continue + val (modid, version) = it.split('=') + modLocalRuntime(modCompileOnly(modrinth(modid, version))!!) + } } // Loom config diff --git a/gradle.properties b/gradle.properties index db5486f..ff65551 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ org.gradle.caching.debug=false org.gradle.configureondemand=true # Mod Properties -mod.version=3.7.1 +mod.version=3.7.2 mod.group=nl.enjarai mod.id=do_a_barrel_roll mod.name=Do a Barrel Roll @@ -26,6 +26,7 @@ deps.fapi=[VERSIONED] deps.modmenu=[VERSIONED] deps.fml=[VERSIONED] deps.compat=[VERSIONED] +deps.compat_runtime=[VERSIONED] mod.mc_dep=[VERSIONED] mod.mc_title=[VERSIONED] mod.mc_targets=[VERSIONED] diff --git a/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/CameraOverhaulPlugin.java b/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/CameraOverhaulPlugin.java deleted file mode 100644 index 657c3e5..0000000 --- a/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/CameraOverhaulPlugin.java +++ /dev/null @@ -1,14 +0,0 @@ -//? if fabric { -package nl.enjarai.doabarrelroll.compat.cameraoverhaul; - -import nl.enjarai.cicada.api.compat.CompatMixinPlugin; - -import java.util.Set; - -public class CameraOverhaulPlugin implements CompatMixinPlugin { - @Override - public Set getRequiredMods() { - return Set.of("cameraoverhaul"); - } -} -//?} diff --git a/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/mixin/CameraSystemMixin.java b/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/mixin/CameraSystemMixin.java deleted file mode 100644 index 402fa5e..0000000 --- a/src/main/java/nl/enjarai/doabarrelroll/compat/cameraoverhaul/mixin/CameraSystemMixin.java +++ /dev/null @@ -1,71 +0,0 @@ -package nl.enjarai.doabarrelroll.compat.cameraoverhaul.mixin; - -import net.minecraft.client.MinecraftClient; -import nl.enjarai.doabarrelroll.api.RollEntity; -import org.spongepowered.asm.mixin.Dynamic; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Pseudo; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyArg; - -@Pseudo -@Mixin(targets = "mirsario.cameraoverhaul.common.systems.CameraSystem") -public abstract class CameraSystemMixin { - @Unique - private boolean allowModifications() { - return !(MinecraftClient.getInstance().getCameraEntity() instanceof RollEntity rollEntity && rollEntity.doABarrelRoll$isRolling()); - } - - @Dynamic - @ModifyArg( - method = "OnCameraUpdate(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Camera;Lmirsario/cameraoverhaul/core/structures/Transform;F)V", - at = @At( - value = "INVOKE", - target = "Lmirsario/cameraoverhaul/common/systems/CameraSystem;VerticalVelocityPitchOffset(Lmirsario/cameraoverhaul/core/structures/Transform;Lmirsario/cameraoverhaul/core/structures/Transform;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec2f;DFF)V" - ), - index = 5 - ) - private float doABarrelRoll$cancelVerticalVelocityPitchOffset(float original) { - return allowModifications() ? original : 0f; - } - - @Dynamic - @ModifyArg( - method = "OnCameraUpdate(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Camera;Lmirsario/cameraoverhaul/core/structures/Transform;F)V", - at = @At( - value = "INVOKE", - target = "Lmirsario/cameraoverhaul/common/systems/CameraSystem;ForwardVelocityPitchOffset(Lmirsario/cameraoverhaul/core/structures/Transform;Lmirsario/cameraoverhaul/core/structures/Transform;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec2f;DFF)V" - ), - index = 5 - ) - private float doABarrelRoll$cancelForwardVelocityPitchOffset(float original) { - return allowModifications() ? original : 0f; - } - - @Dynamic - @ModifyArg( - method = "OnCameraUpdate(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Camera;Lmirsario/cameraoverhaul/core/structures/Transform;F)V", - at = @At( - value = "INVOKE", - target = "Lmirsario/cameraoverhaul/common/systems/CameraSystem;YawDeltaRollOffset(Lmirsario/cameraoverhaul/core/structures/Transform;Lmirsario/cameraoverhaul/core/structures/Transform;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec2f;DFFF)V" - ), - index = 5 - ) - private float doABarrelRoll$cancelYawDeltaRollOffset(float original) { - return allowModifications() ? original : 0f; - } - - @Dynamic - @ModifyArg( - method = "OnCameraUpdate(Lnet/minecraft/entity/Entity;Lnet/minecraft/client/render/Camera;Lmirsario/cameraoverhaul/core/structures/Transform;F)V", - at = @At( - value = "INVOKE", - target = "Lmirsario/cameraoverhaul/common/systems/CameraSystem;StrafingRollOffset(Lmirsario/cameraoverhaul/core/structures/Transform;Lmirsario/cameraoverhaul/core/structures/Transform;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec2f;DFF)V" - ), - index = 5 - ) - private float doABarrelRoll$cancelStrafingRollOffset(float original) { - return allowModifications() ? original : 0f; - } -} diff --git a/src/main/resources/do_a_barrel_roll.compat.cameraoverhaul.mixins.json b/src/main/resources/do_a_barrel_roll.compat.cameraoverhaul.mixins.json deleted file mode 100644 index ffd8fd9..0000000 --- a/src/main/resources/do_a_barrel_roll.compat.cameraoverhaul.mixins.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "nl.enjarai.doabarrelroll.compat.cameraoverhaul.mixin", - "plugin": "nl.enjarai.doabarrelroll.compat.cameraoverhaul.CameraOverhaulPlugin", - "refmap": "do_a_barrel_roll.refmap.json", - "compatibilityLevel": "JAVA_17", - "client": [ - "CameraSystemMixin" - ], - "mixins": [ - ], - "injectors": { - "defaultRequire": 1 - } -} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 5bef126..36cd0a6 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -40,7 +40,6 @@ }, "mixins": [ "do_a_barrel_roll.mixins.json", - "do_a_barrel_roll.compat.cameraoverhaul.mixins.json", "do_a_barrel_roll.compat.modmenu.mixins.json" ], "accessWidener": "do_a_barrel_roll.accesswidener", diff --git a/versions/1.21-fabric/gradle.properties b/versions/1.21-fabric/gradle.properties index e325728..45def5b 100644 --- a/versions/1.21-fabric/gradle.properties +++ b/versions/1.21-fabric/gradle.properties @@ -3,7 +3,8 @@ loom.platform=fabric # Global deps.yarn_build=9 deps.compat=\ - controlify=2.0.0-beta.14+1.21-fabric + controlify=2.0.0-beta.14+1.21-fabric +deps.compat_runtime= # Fabric deps.fapi=0.102.0+1.21 diff --git a/versions/1.21-neoforge/gradle.properties b/versions/1.21-neoforge/gradle.properties index 1cbdf8c..b8cd726 100644 --- a/versions/1.21-neoforge/gradle.properties +++ b/versions/1.21-neoforge/gradle.properties @@ -3,6 +3,7 @@ loom.platform=neoforge # Global deps.yarn_build=9 deps.compat= +deps.compat_runtime= # Forge deps.fapi=0.101.2+2.0.10+1.21