Skip to content
On this page

Fabric and NeoForge

Fabric and NeoForge run Katton as a client/server mod inside the Minecraft process. That gives scripts direct access to Minecraft internals, registries, rendering, and configuration-phase networking.

Shared Mod Features

FeatureNotes
Client scriptsPhase-aware @ClientScriptEntrypoint functions run on the client.
Registry mutationItems, blocks, entities, components, particles, sounds, tabs, and renderers can be registered.
Server pack syncFull login snapshot during configuration plus revisioned live updates after successful reloads.
Runtime injectionByteBuddy/ASM injection APIs are available.
RenderingHUD and world render callbacks are available.
Script Pack UIPress K by default on the client.

Main Differences

AreaFabricNeoForge
Server send timingServerConfigurationPacketListenerImpl init return mixin.After NeoForge connection channel negotiation.
Client registry hookFabric registry sync handler.Vanilla client configuration listener registry data hook.
Event sourceFabric API callbacks.NeoForge event bus.
Extra accessAccess widener.Access transformers plus mixins.

Mod Dependencies

Every pack manifest must include a dependencies array. Declare the mod ID, applicable loader, side, and version range before importing another mod's API:

json
{
  "dependencies": [
    {
      "id": "create",
      "version": ">=6.0.0",
      "required": true,
      "platforms": ["fabric", "neoforge"],
      "environment": "both"
    }
  ]
}

Katton validates the dependency on the side where the pack runs. It adds the declared mod and required transitive mod dependencies to the compiler classpath; runtime execution uses the active loader's transformed classes. See Manifest, Dependencies, and Signing.

Client Timing and Sync

Global client setup uses ClientPhase.READY. World and synced packs use REGISTRY_SETUP for work that must precede registry validation and JOINED for work that needs a player and level.

Login sync uses configuration revision 0 and sends a complete snapshot without a request round trip. Later successful server reloads publish play-phase revisions; clients request only changed packs, stage and precompile the complete snapshot, and acknowledge activation. See Script Pack Sync and Trust.