Posted August 27, 20223 yr Hi, I have a mana that's not syncing to client, it has registries and packets, I'm stumped that the mana value is not calling on the client The essence files The rendering The overlay registry Capability registrys network registry I am able to call the value fine with an item right clicking but not with the client rendering Can someone please tell me what im doing wrong Former developer for DivineRPG, Pixelmon and now the maker of Essence of the Gods
August 27, 20223 yr `RegisterCapabilitiesEvent` is listened to on the mod event bus, not the forge event bus. Additionally, you're enqueuing work to enqueue work in your packet; this should only be done once. You are probably thinking of `DistExecutor#unsafeRunWhenOn` for the inner supplier. If using `LazyOptional#orElseThrow`, supply an actual exception to throw on failure, not `null`. You should prefer using `#ifPresent` or anything that doesn't force resolution.
August 27, 20223 yr 2 hours ago, ChampionAsh5357 said: `RegisterCapabilitiesEvent` is listened to on the mod event bus, not the forge event bus. Forge 43.1.1 or above (which is the case here) adds support for the @AutoRegisterCapability annotation which should be used. 2 hours ago, ChampionAsh5357 said: If using `LazyOptional#orElseThrow`, supply an actual exception to throw on failure, not `null`. You should prefer using `#ifPresent` or anything that doesn't force resolution. LazyOptional#ifPresent should only be used if the Capability is written to be not always preset.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.