- Forge networking API modifies the binary packet, adds a varInt before it...
I had to use low-level networking to avoid this behaviour.
- Forge network doens't listen to Plugin channel if the server is not forge.
I had to implement a custom listener and mix it with the built-in.
- Forge plugin registration happens in login-phase
Send hello packet when channel register or if that was before play-phase, then when goint to that phase.
- Can't access to player trackers (who can see who) from Forge API
I copied the accessor from Fabric API into the Forge mod.
- Forge
ModList.get().isLoaded()
returnsNullPointerException
instead of a bool (1.16.5)...Try to load the class with
reflect
and if failed, then no mod is loaded. - 1.7.10 can not fake mod ID
Mixin into forge core to fake it...
- 1.18.2 JarJar library skips Mixin config
Don't Use JarJar
- Client-only mod is not possible
Only apply mixins on client-side, present on server but does nothing..
- Forge tries to load before warning about missing mandatory dependencies, but mixin is failing.
Implement IMixinConfigPlugin and conditionally disable failing mixins, allowing Forge to load and warn about missing dependency.
For this I had to workaround ModList.get() is null. - Forge 1.16 has no ResourceLoader register event
After some searching, I've found an event:
ParticleFactoryRegisterEvent
what is fired just when I should add my resourceManager. - Forge 1.19+ fail if I try to load multiple jars with the same package (probably an optimization for their slow annotation indexing)
I had to move packages in playerAnimator to not fail in dev
- NeoForge Configuration task does not accept vanilla interface, I have to implement its own interface.
UnNeoForgifierConfigurationTaskWrapper. I could've solved it differently, but I had enough of making my API Forge compatible.
- replaces
ModelPart.render()
and bendy-lib can not find the redirect targetUse Dynamic mixins
- startTracking event fires before sending the packet
custom mixin to the function
- Can not add runtime-only dependencies without messing up the runtime classpath
Spigradle resolves subproject dependencies, create a subproject for the runtime plugins...