-
My capability will not persist.
No no no... My display is updating properly. Getting the cap seems to return the proper one as well. So it's definitely working CLIENT side. But the clone event returns the default cap, so it's not changing on the SERVER. So i have to send the packet from client to server, right? You said it exists on the server, but I'm updating the value from the client.
-
My capability will not persist.
So basically make a packet that sends from client to server that acts on the cap. Right? That's what I'm getting here. That should be easy.
-
My capability will not persist.
How is it not updating though? I have a hud thing that renders the int on my hud, running the command (which sends a sync packet) updates it on my hud as well, therefore I can only assume it's being sent and read properly. Is the packet insufficient? What would I have to do?
-
My capability will not persist.
Ignore the purse for a sec. I was trying a lot of things and didn't update everything per solution. https://github.com/LordSaad44/Cash-Shop/blob/master/src/main/java/me/lordsaad/cashshop/common/command/CommandWallet.java#L49 I'm updating the cap here server side and it works perfectly. It's clone copying that's dysfunctional...
-
My capability will not persist.
I just uploaded a new commit with the fix you suggested, you have a point, i should be setting it. But that actually didn't work. It failed with the same result. https://github.com/LordSaad44/Cash-Shop/blob/master/src/main/java/me/lordsaad/cashshop/common/core/EventHandler.java
-
My capability will not persist.
I made a capability that saves 1 int in the player. It acts as the amount of money they have in their account. Upon death or relog, the cap resets back to it's default value. It works PERFECTLY otherwise. I've asked multiple people. 5/6 don't know how caps work, the remaining 1/6 couldn't figure out the issue because my cap is basically a carbon copy of his, yet his persists. Anyways, capability package: https://github.com/LordSaad44/Cash-Shop/tree/master/src/main/java/me/lordsaad/cashshop/api/capability Class that's hooking the cap to the player: https://github.com/LordSaad44/Cash-Shop/blob/master/src/main/java/me/lordsaad/cashshop/api/ModCapabilities.java Packet: https://github.com/LordSaad44/Cash-Shop/tree/master/src/main/java/me/lordsaad/cashshop/common/network Registering the cap: https://github.com/LordSaad44/Cash-Shop/blob/master/src/main/java/me/lordsaad/cashshop/common/CommonProxy.java#L26 (registering the event down in postInit) (works perfectly, i breakpointed) I tried the respawn event (PlayerEvent.Clone), but the original entity in the event had it's cap reset as well, so i was copying the default reset value from the original entity over to the new entity. Respawn(clone) event: https://github.com/LordSaad44/Cash-Shop/blob/master/src/main/java/me/lordsaad/cashshop/common/core/EventHandler.java
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
That worked perfectly. Thank you I was registering them in common because I assumed that's how they worked. How the hell are Elucent's mods working properly? https://github.com/RootsTeam/Roots/blob/master/src/main/java/elucent/roots/proxy/CommonProxy.java#L28 I'm just really curious. He doesn't even register these in the main mod file.
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
http://i.imgur.com/kcbTBi5.png A fatal error? LOG: http://pastebin.com/wVZxmgem What am i doing wrong in my packet handler?
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
I'll do that later. What should I do to fix the registration of the caps right now?
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
Should I call the same line: CapabilityManager.INSTANCE.register(IWizardryCapability.class, new WizardryCapabilityStorage(), DefaultWizardryCapability.class); In the clientProxy's preInit as well? or in the main class's preInit or what? I just tried registering the cap in clientproxy and that crashed, then tried the main class's preinit and that crashed as well. I'm assuming I shouldn't be registering it like that. What must I do?
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
It is. CommonProxy -> preInit() { } http://i.imgur.com/I5y3cSb.png
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
My apologize, Intellij must've reformatted and removed redundant imports. I just pushed a new commit, and here's the new log: http://pastebin.com/YuifF4q8
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
I did paste the error, it's a above... http://pastebin.com/1mq5KEXZ That's the null pointer I get from getCapability(player).
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
So what should I do? I assumed that was the perfect event to attach a capability, but if I cant even get the entity, what am I supposed to do?
-
My capabilities REFUSE to work. 5 devs checked it and all failed to find a clue.
http://i.imgur.com/3ZiYUcY.png Breakpointed. Why is the player entity null?! the capability: http://i.imgur.com/9Qo16az.png That's correct, but the entityPlayer does NOT look promising... Why is it null?! http://i.imgur.com/cpNHNig.png
IPS spam blocked by CleanTalk.