Skip to content

Commit

Permalink
update camera overhaul reforged compat
Browse files Browse the repository at this point in the history
fixes #101
  • Loading branch information
UpcraftLP committed Jun 11, 2024
1 parent ebd1300 commit aae9b3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NeoForge/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ curios = "5.8.1+1.20.1"

caelus = "3.2.0+1.20.1"

cameraoverhaul = "5310618"
cameraoverhaul = "5416786"

[libraries]
neoforge = { module = "net.neoforged:forge", version.ref = "neoforge" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@

package dev.cammiescorner.icarus.neoforge.compat;

import com.confusingfool.cameraoverhaulneoforge.core.callbacks.CameraUpdateCallback;
import com.confusingfool.cameraoverhaulneoforge.core.callbacks.ModifyCameraTransformCallback;
import com.confusingfool.cameraoverhaulneoforge.core.structures.Transform;
import dev.cammiescorner.icarus.IcarusConfig;
import mirsario.cameraoverhaul.core.callbacks.CameraUpdateCallback;
import mirsario.cameraoverhaul.core.callbacks.ModifyCameraTransformCallback;
import mirsario.cameraoverhaul.core.structures.Transform;
import net.minecraft.client.Camera;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3;

Expand All @@ -43,7 +44,7 @@ public static void load() {
}

@Override
public void OnCameraUpdate(Camera camera, Transform cameraTransform, float deltaTime) {
public void OnCameraUpdate(Entity focusedEntrity, Camera camera, Transform cameraTransform, float deltaTime) {
float pitch = camera.getXRot();
float rollAmount = (pitch < -90 || pitch > 90) ? IcarusConfig.rollAmount : -IcarusConfig.rollAmount;
Vec3 velocity = camera.getEntity().getDeltaMovement();
Expand Down
5 changes: 3 additions & 2 deletions NeoForge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ config = "${mod_id}.neoforge.mixins.json"
{ modId = "curios", mandatory = true, versionRange = "[5.8.0,)", ordering = "NONE", side = "BOTH", mc-publish = { curseforge = "309927", modrinth = "vvuO3ImH" } },
{ modId = "caelus", mandatory = true, versionRange = "*", ordering = "NONE", side = "BOTH", mc-publish = { curseforge = "308989", modrinth = "40FYwb4z" } },
{ modId = "resourcefulconfig", mandatory = true, versionRange = "*", ordering = "NONE", side = "BOTH", mc-publish = { curseforge = "714059", modrinth = "M1953qlQ" } },
{ modId = "commonnetworking", mandatory = true, versionRange = "*", ordering = "NONE", side = "BOTH", mc-publish = { curseforge = "806044", modrinth = "HIuqnQpi" } }
{ modId = "commonnetworking", mandatory = true, versionRange = "*", ordering = "NONE", side = "BOTH", mc-publish = { curseforge = "806044", modrinth = "HIuqnQpi" } },
{ modId = "camera_overhaul_neoforge", mandatory = false, versionRange = "[1.1,)", ordering = "NONE", side = "CLIENT", mc-publish = { curseforge = "1011593", modrinth = "LwcpSm6L" } }
]

# Features are specific properties of the game environment, that you may want to declare you require. This example declares
Expand All @@ -44,6 +45,6 @@ config = "${mod_id}.neoforge.mixins.json"
"forge"
]
dependencies = [
"camera-overhaul-reforged(optional){modrinth:LwcpSm6L}{curseforge:1011593}",
"camera_overhaul_neoforge(optional){modrinth:LwcpSm6L}{curseforge:1011593}",
"figura(optional){modrinth:s9gIPDom}{curseforge:901503}"
]

0 comments on commit aae9b3e

Please sign in to comment.