Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration for Origins mod climbing power #212

Draft
wants to merge 1 commit into
base: Multiloader-1.20
Choose a base branch
from

Conversation

Techjar
Copy link
Collaborator

@Techjar Techjar commented Nov 10, 2023

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

@Techjar Techjar force-pushed the origins-integration branch from 6d7ca31 to 1f29025 Compare November 10, 2023 07:14
@ma-gician
Copy link

ma-gician commented Nov 10, 2023

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"

@fayer3
Copy link
Member

fayer3 commented Nov 10, 2023

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
Copy link
Member

fayer3 commented Nov 10, 2023

hm maybe it does matter, looks like they had some api changes from 1.20 to 1.20.2 apace100/apoli@e635031

@fayer3
Copy link
Member

fayer3 commented Nov 10, 2023

implements #209

@Techjar Techjar force-pushed the origins-integration branch from 1f29025 to 9e9b225 Compare November 10, 2023 21:27
@Techjar
Copy link
Collaborator Author

Techjar commented Nov 10, 2023

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

@Techjar Techjar force-pushed the origins-integration branch 2 times, most recently from 98b2811 to 1083ccd Compare November 10, 2023 21:39
@Techjar
Copy link
Collaborator Author

Techjar commented Nov 10, 2023

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

@Techjar Techjar force-pushed the origins-integration branch from 1083ccd to fe4057a Compare November 10, 2023 21:46
@ma-gician
Copy link

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!!!

@Techjar Techjar force-pushed the origins-integration branch from fe4057a to 4a88c98 Compare November 10, 2023 23:51
@Techjar
Copy link
Collaborator Author

Techjar commented Nov 10, 2023

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

@Techjar Techjar marked this pull request as ready for review November 10, 2023 23:52
@ma-gician
Copy link

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

@Techjar
Copy link
Collaborator Author

Techjar commented Nov 11, 2023

I'm not sure I understand what you mean.

@fayer3
Copy link
Member

fayer3 commented Nov 11, 2023

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

@Techjar
Copy link
Collaborator Author

Techjar commented Nov 11, 2023

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 Techjar force-pushed the origins-integration branch from 4a88c98 to 751f844 Compare November 11, 2023 14:11
@Techjar
Copy link
Collaborator Author

Techjar commented Nov 11, 2023

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.

@ma-gician
Copy link

ma-gician commented Nov 11, 2023

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)

@Techjar
Copy link
Collaborator Author

Techjar commented Nov 11, 2023

See if that addresses the issue.

@ma-gician
Copy link

See if that addresses the issue.

It did. Thank you!

@DarianLStephens
Copy link

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.

@ma-gician
Copy link

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.

@fayer3
Copy link
Member

fayer3 commented Feb 18, 2024

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

@Techjar Techjar force-pushed the origins-integration branch from 6369a83 to 0fccd81 Compare February 18, 2024 02:19
@Techjar Techjar marked this pull request as draft February 18, 2024 02:23
@Techjar
Copy link
Collaborator Author

Techjar commented Feb 18, 2024

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

@Techjar Techjar force-pushed the origins-integration branch from 0fccd81 to 363f7ad Compare February 18, 2024 02:40
@Techjar Techjar force-pushed the origins-integration branch from 363f7ad to dbb415c Compare February 18, 2024 02:43
@Techjar
Copy link
Collaborator Author

Techjar commented Feb 18, 2024

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.

@fayer3
Copy link
Member

fayer3 commented Feb 18, 2024

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.

@ma-gician
Copy link

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.

@fayer3
Copy link
Member

fayer3 commented Oct 18, 2024

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

@ma-gician
Copy link

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

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

@ma-gician
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants