Skip to content

Info

Shadowing should only be done if you really need it. Not only does it prevent GeckoLib from getting downloads on Forge for your mod (and subsequently prevents income from your mod), it also can be tricky to setup. Please only do this if you have a legitimate reason. If you do decide to shadow, consider donating to our patreon!

Shadowing

In order to shadow GeckoLib, simply follow the shadow's plugin documentation. Make sure to relocate geckolib to it's own package.

You can view an example build.gradle that shadows geckolib here

You will also need to do a few extra steps if shadowing with Forge, instead of Initializing GeckoLib like normally, you'll want to use the code below:

    GeckoLib.hasInitialized = true;
    DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> ResourceListener::registerReloadListener);

This is needed as Geckolib now ships with a needed Packet for Item syncing on servers. If you wish to use this feature when shadowing GeckoLib, you will need to create your own Packet based off GeckoLibNetwork and SyncAnimationMsg replacing any calls to GeckoLibNetwork with your own Packet.

When you go to make your Item syncable via the ISyncable system, make sure to use your own Packet in place of these two calls to GeckoLibNetwork. Call 1 Call 2