Adding OpenGlider support to mod, incomplete API code?
maxhenkes opened this issue · 11 comments
Heya!
I'm trying to add support for OpenGliders to my small clientside mod, https://minecraft.curseforge.com/projects/thirdperson-everything,
and I saw you offer an actual API, however it appears that a file is missing from github (You're lib package), is that on purpose? How does one use your API then?
I just got back after a hiatus and been easing back into modding, haven't done much for the recent versions, so I'm sorry if I'm missing something obvious!
Thanks!
You are actually very much correct in that the API is currently incomplete. The lib package isn't there just so I don't have other people's mods hosted here, as it should be easy enough for modders to download them if needed and add into local workspaces. I can look at my "API" again and try and get something nice, but it shouldn't actually be necessary for your case, due to capabilities.
What you need to do is expose the gliding capability (like in this file), and then simply using that to see if the player is gliding and doing your work there (it should look somewhat similar (on a high level) to this).
Feel free to ask if/when you have questions.
Oh, I wasn't aware that part of the API wasn't your own mod. Shouldn't something like that be in a separate package instead? This way your api is pretty unusable without knowing what mod it even is (Which I still dont :P )
Anyways, I haven't messed around with Capabilities yet as I have done minimal work on the last few versions, so I'm gonna look that up and hopefully be able to solve this!
Thanks for your help :)
Oh yeah I'm aware they are from forge, I believe they added them in 1.8 ish? :D Just haven't messed around with them as of yet.
Hold on, if I'm reading this right, I can get a players capabilities, and check for anything you put in there, without me actually having a single line of your mod/api inside of my mod? So I can support your mod without even having to use your API? :O
Okay so after it not working a few days ago, I spent some time today reading up on capabilities and from what I understand, without a working API from your side, I simply cannot access your capabilities:
https://gist.github.com/williewillus/c8dc2a1e7963b57ef436c699f25a710d
(The part about adding others capabilities).
I've tried what you suggested and exposed the capability with a handler similar to how you have done it, however when I test it, it can't find the capability I'm trying to point at.
I've looked at a few other mods that implement capabilities, and they always seem to point towards the API.
and
as an example)
I'm honestly not sure where to go from here :/
I'll help you out, but just so you know I'm super swamped atm, and won't be able to until tomorrow afternoon at the soonest. Also, if you hop on discord we can chat there as well if it's easier.
No problem. I'm just a little confused at the moment because information about capabilities seems to be littered randomly around the Internet in thousand places...
Are you trying to say that it is possible to use your capability without the API? I've looked at countless mods and I can't find anyone doing that :/
So I just asked a bunch of people on the MMD discord and I've been told that you cannot get the capability without the API :/