Unglitch

Last Update: (MC 1.6.4)

Warning! This page hasn't been updated in a while and is likely outdated for newer versions of Minecraft.
Chickens escaping their pen

Unglitch is a bugfix mod to prevent entities from glitching through blocks and more. It started out as an attempt to fix only permanent, server-side glitches (e.g. animals permanently escaping fences, see MC-2025 but now greatly reduces temporary, client-side glitches (MC-10) as well. Thanks to TiberiusXVI, who altered the mod so it fixes some rendering errors, too, and contributed to an extended mode, which also fixes/improves the swimming mechanics of mobs (especially small ones like babies and squids) and makes items, mobs, players, and xp orbs get pushed out of blocks correctly.

The mod is available both as a forge core mod and a regular vanilla mod. The forge mod can be used for both clients and servers. For multiplayer, it's not absolutely necessary to have the mod installed on both sides; the mod will do the best it can on whichever side it is. To fix every bug mentioned below, it must be installed on both sides though. Also, when running on a server, you should turn the compatibility mode on (/config/chunkbase_unglitch.cfg) if there are players without the mod; otherwise, they will experience much more glitches than before. In the config file, you also have the option to turn extended mode off (see below).

For vanilla, there are are separate downloads for client vs server and default mode vs extended mode. For multiplayer, the vanilla mod should only be used if both sides have the same version installed. The client mod will most likely be incompatible with lots of other mods. Thus, I recommend you use the forge version.

Changes - All Modes

Here's what the mod (should) always fix:

  • Entities permanently glitching through fences or certain other blocks (full blocks excluded; see link below for full list). Gets worse the more mobs you have colliding with that particular block in your world. Only affects SSP (or opened to LAN).
  • Flickering bounding boxes of blocks selected with the crosshair. Only affects SSP (or opened to LAN).
  • Weird collisions with anvils and chests
  • NPCs permanently glitching through blocks on chunk reload. Happens mostly at specific coordinates.
  • XP orbs changing their size from 0.5 to 0.25 after the first reload (now always 0.25)
  • XP orbs being spawned client-side at 32 times their real coordinates (i.e. orbs being invisible for the first few seconds)
  • Boats sinking into the ground client-side when the player gets in or the boat gets pushed down

Unfortunately, as a result of the client/server split and certain optimizations to keep the bandwidth low, not every single "glitchy" behavior (like mobs being warped to a slightly different position, or mobs appearing to fall off the ground) can be fixed, especially with lag.

Anyways, the following things should be greatly improved:

  • Entities temporarily glitching through blocks client-side (especially when starting the game)
  • XP orbs and items behaving very "glitchy" Spiders appearing to fall down when they're climbing but are stuck at a block above them
  • Swimming mobs appearing to fall down they're swimming upwards but are stuck at a block above them
  • Jerky client-side movements of boats on the ground

If you're tech-savvy and interested, I put up a github repository with a more detailed explanation of some bugfixes, as well as two test worlds and source code snippets: https://github.com/taurose/Unglitch.

Changes - Extended Mode

The extended mode of the mod adds the following changes:

  • Better algorithm for pushing items, orbs, NPCs and players out of blocks. The current method has several quirks, like items being constantly pushed back and forth between two blocks or item sinking into the ground. Items (and orbs) can s till be moved vertically though, if there's no other way for the item to escape the block.
  • NPCs get pushed out of blocks too (note that this doesn't allow them to glitch into other blocks; it only tells them where to move)
  • Fixed/Improved swimming behavior of entities, allowing small mobs to swim upwards
  • Fixed/Improved swimming behavior of squids, allowing them to (better?) swim upwards
  • Added splash effect and sound to items
  • Removed splash effect and sound from boats

So unlike the basic mode, which is designed to minimally affect server-side game mechanics, this mode does so at a higher level, removing some of the quirks you might have gotten used to, especially in regards to small swimming mobs and squids (note that judging by the code this behavior was originally not intended. There's a lot of weird things happening..). Apart from that, however, I don't think it will break many player contraptions, and should generally be an improvement.

Thanks again to TiberiusXVI, who contributed these changes to the mod.

As always, feedback is appreciated =)