Back to mods
Pig Cannon Sync project artwork

Modrinth · Minecraft mod

Pig Cannon Sync

Fixes the client-side invisibility that occurs when a pig remains logically mounted to a minecart in a distant lazy chunk while the pig itself is brought near a player.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Pig Cannon Sync release matches 26.2?

Updated 22 days ago
Best match for your filters 1.0.1
Game version 26.2
Loader Fabric

Pig Cannon Sync 1.0.1 targets 26.2 with Fabric. Do not install it on the client. It must be installed on the dedicated server. 1 required mod needs a matching file.

Where it goes

Is Pig Cannon Sync required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does Pig Cannon Sync 1.0.1 need?

1.0.1 on 26.2. Every mod below is checked against that same setup.

1 required mod needs a matching file

Install Fabric API first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

Fabric API Needed by Pig Cannon Sync 1.0.1
required
No matching file Version asked for: 0.149.0+26.2

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Pig Cannon Sync without breaking your instance.

Built for Pig Cannon Sync 1.0.1 on 26.2. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.1. It targets 26.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first, but 1 required mod has no matching file for this setup. Do not mix loader builds to force a match.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.1. It opens that exact file at the source.

About this project

What does Pig Cannon Sync add?

Pig Cannon Sync

A tiny, server-side Fabric mod for Minecraft Java Edition 26.2. It fixes the
client-side invisibility that can occur when a pig remains logically mounted to
a minecart in a distant lazy chunk while the pig itself is brought near a
player.

The mod hooks Minecraft's own per-player entity tracker. When a pig changes from
unseen to seen for a player, but its logical vehicle is still not tracked by
that player, the mod briefly removes and re-adds the pig. This makes the server
resend the normal vanilla spawn, metadata, passenger, and velocity packets. It
does not teleport the pig, change its momentum, dismount it, load the distant
chunk, or alter the cannon's mechanics.

AI Usage Disclosure

This project was created using AI. I've reviewed game mechanics and tested it myself,
but cannot give performance/correctness guaruntees. There may be edge cases that I have
not considered. This is just a throwaway side project, feel free to repurpose/improve the
code as you see fit.

Commands

/pig-cannon-sync version reports the installed mod version.

/pig-cannon-sync debug checks every pig entity tracker in the player's current
dimension, lets vanilla determine which pigs should be visible, and starts or
restarts a monitored remove/re-add cycle for every match. It is a broad
diagnostic scan that deliberately ignores mounting state and the vehicle
tracker. It reports detailed progress to the player and the server log, and can
be run once every five seconds per player.

The pig_cannon_sync:command.pig_cannon_sync.debug permission is allowed by
default, so no permission manager is required. Servers with a Fabric-compatible
permission provider can override it to restrict the debug command. The version
command is unrestricted.

Synchronization behavior

When the mod detects that a pig has become tracked by a player while its vehicle
remains untracked, it immediately removes and re-adds the pig for that player.
The debug command also starts or restarts this initial refresh for every pig its
scan matches. While the pig continues moving, the mod supplies the absolute
position packets that vanilla omits for passengers because their position would
normally come from the vehicle. It sends those packets only when the pig is
tracked by a player but its vehicle is not. One final refresh happens after the
pig remains stationary for 20 ticks, and the pair then stays on a passive watch
until the pig dismounts or its vehicle becomes tracked normally.

Whenever the saddle equipment slot changes, the mod resends that slot to every
player whose server-side entity tracker currently includes the pig. The hook
runs at the slot mutation itself because a pig held in a lazy chunk may never
receive vanilla's later equipment-detection tick. This is event-driven: it does
not poll the pig's equipment every tick.

This is proportional only to active affected pig/player pairs. A moving pair
adds at most one small vanilla position-sync packet per server tick—the same
class of traffic an independently moving entity normally produces. A stationary
pair performs only a position comparison and tracker lookup each tick. Vanilla
has no packet by which a client acknowledges that an entity was actually
rendered, so that final client-side fact cannot be verified by a server-side mod.

Requirements

  • Minecraft Java Edition 26.2
  • Fabric Loader 0.19.3 or newer
  • Fabric API for 26.2
  • Java 25

For multiplayer, install Pig Cannon Sync and Fabric API on the server; vanilla
clients can connect without Pig Cannon Sync. For singleplayer, install Pig
Cannon Sync and Fabric API in the Minecraft instance's mods directory so the
mod can run on the integrated server. The mod contains no client-side
synchronization logic.

Building

Run ./gradlew build with Java 25. The distributable JAR is written to
build/libs/. With Nix installed, nix run .#build provides the pinned Java 25
toolchain and runs a clean build.

License

MIT.

Project description from Modrinth.

Pick your setup

Pig Cannon Sync by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Pig Cannon Sync versions and loaders

2 of 2 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.