VivecraftMod icon indicating copy to clipboard operation
VivecraftMod copied to clipboard

Add integration for Origins mod climbing power

Open Techjar opened this issue 2 years ago • 28 comments

Unable to test right now as my VR setup is broken, but it does compile at least.

Techjar avatar Nov 10 '23 07:11 Techjar

Compiled and tested, couldn't climb up the wall with climbing powers still unfortunately. It appears that the modCompileOnly version of Origins is a future version of the mod. image The Origin Mod's version for 1.20.1 is 1.10.0 and Apoli Mod's version is 2.9.0. I changed this and recompiled, but it still did not let me climb up the walls using the Arachnid Origin. // for origins compat modCompileOnly "maven.modrinth:origins:1.10.0" modCompileOnlyApi "com.github.apace100:apoli:2.9.0"

ma-gician avatar Nov 10 '23 13:11 ma-gician

that shouldn't matter I'm debugging it atm the climbing check is wrong, but the power check also doesn't return any powers

fayer3 avatar Nov 10 '23 13:11 fayer3

hm maybe it does matter, looks like they had some api changes from 1.20 to 1.20.2 https://github.com/apace100/apoli/commit/e63503197c3e4ed4f4f7fb7d8ab6b09c4a6426f6

fayer3 avatar Nov 10 '23 14:11 fayer3

implements #209

fayer3 avatar Nov 10 '23 14:11 fayer3

I fixed the incorrect logic. Not sure about the API stuff.

Techjar avatar Nov 10 '23 21:11 Techjar

Okay, I changed how hasClimbingPower functions, see if the check works now.

Techjar avatar Nov 10 '23 21:11 Techjar

It works! I compiled the mod, tested with climbing ability, could climb✅, tested without ability, couldn't climb✅. Tried without origins mod installed, couldn't climb ✅. YAY!!!

ma-gician avatar Nov 10 '23 23:11 ma-gician

Removed the origins mod itself as a compile-time dep since we only actually use classes from apoli.

Techjar avatar Nov 10 '23 23:11 Techjar

bug(?) i found: when climbing mode hand items are swapped, left hand items in right hand, vice versa.

ma-gician avatar Nov 11 '23 02:11 ma-gician

I'm not sure I understand what you mean.

Techjar avatar Nov 11 '23 02:11 Techjar

bug(?) i found: when climbing mode hand items are swapped, left hand items in right hand, vice versa.

that must be from a different mod

fayer3 avatar Nov 11 '23 02:11 fayer3

Only trouble we have now is that this effectively prevents you from using the other "stick hand in block" contextual interactions system we have, since climbing takes priority over that.

Techjar avatar Nov 11 '23 11:11 Techjar

We now check if the climbing power is toggled on, best we can do to solve that issue. The mod has the toggle bound to G by default.

Techjar avatar Nov 11 '23 14:11 Techjar

bug(?) i found: when climbing mode hand items are swapped, left hand items in right hand, vice versa.

that must be from a different mod

I'm not sure I understand what you mean.

here's a video showing the glitch with only vivecraft, origins, sodium & others: https://www.youtube.com/watch?v=spmHLP1lFUE (video recorded before most recent update to it)

ma-gician avatar Nov 11 '23 19:11 ma-gician

See if that addresses the issue.

Techjar avatar Nov 11 '23 23:11 Techjar

See if that addresses the issue.

It did. Thank you!

ma-gician avatar Nov 11 '23 23:11 ma-gician

How goes this? I was looking at different mods to try in VR, and seeing Origins compatibility got me excited, but there's been no activity here for months.

DarianLStephens avatar Feb 16 '24 06:02 DarianLStephens

How goes this? I was looking at different mods to try in VR, and seeing Origins compatibility got me excited, but there's been no activity here for months.

if you compile the code it should work! it just hasn't been merged into the main branch yet.

ma-gician avatar Feb 16 '24 19:02 ma-gician

hm @Techjar could you resolve the confict please? I'm not 100% sure what goes where

fayer3 avatar Feb 18 '24 00:02 fayer3

Converting this to a draft as it needs some reworking to function correctly with changes on the master branch.

Techjar avatar Feb 18 '24 02:02 Techjar

I think that's sufficient to make it compatible with the new model replacement logic. Please verify and I'll mark it ready again. Specifically, your main hand item renderers shouldn't be swapped or replaced in either first or third person when you have the climbing power without the claws.

Techjar avatar Feb 18 '24 02:02 Techjar

seems to work fine with origins on fabric, didn't notice any item swapping. taht the climbing is always on is inteded right? just checking. also it doesn't work with the origins forge port, because they seem to not have ported the power holder for some reason https://github.com/EdwinMindcraft/apoli/blob/1.20.x/forge/src/main/java/io/github/apace100/apoli/component/PowerHolderComponent.java so need to exclude that somehow, or fix it with that, because right now it crashes on on world load. adding a class and field check might be safe to do, for just excluding.

fayer3 avatar Feb 18 '24 15:02 fayer3

seems to work fine with origins on fabric, didn't notice any item swapping. taht the climbing is always on is inteded right? just checking. also it doesn't work with the origins forge port, because they seem to not have ported the power holder for some reason https://github.com/EdwinMindcraft/apoli/blob/1.20.x/forge/src/main/java/io/github/apace100/apoli/component/PowerHolderComponent.java so need to exclude that somehow, or fix it with that, because right now it crashes on on world load. adding a class and field check might be safe to do, for just excluding.

So, I added a check to see if the player is using fabric.

VivecraftMod-origins-integration\common\src\main\java\org\vivecraft\mod_compat_vr\origins\OriginsHelper.java Line 11 return Xplat.isModLoaded("origins") && Xplat.isModLoaded("fabric-api");

It disables the extra functionality for Forge. This also stops the game from crashing due to the power holder not being ported when joining a world.

Fabric still functions as expected.

ma-gician avatar Oct 18 '24 22:10 ma-gician

we have an Xplat call to check the modloader, and there are forge ports of the fabric api using reflection to check for the existence is a better way imo, and will make it work automatically when they finally port that to forge

fayer3 avatar Oct 18 '24 22:10 fayer3

Oh, thanks for the information! I'm inexperienced with minecraft modding & java.

Unfortunately, I don't think they're going to port it. https://github.com/EdwinMindcraft/origins-architectury/issues/483 It seems to be discontinued

ma-gician avatar Oct 19 '24 00:10 ma-gician

we have an Xplat call to check the modloader, and there are forge ports of the fabric api using reflection to check for the existence is a better way imo, and will make it work automatically when they finally port that to forge

return Xplat.isModLoaded("origins") && Xplat.getModloader() == "fabric"; ?

I think that's sufficient to make it compatible with the new model replacement logic. Please verify and I'll mark it ready again. Specifically, your main hand item renderers shouldn't be swapped or replaced in either first or third person when you have the climbing power without the claws.

Verified @Techjar

ma-gician avatar Oct 21 '24 00:10 ma-gician