MI/PAL Flight fix

!!!!READ THE DESCRIPTION!!! This is a patch for PAL that fixes some flight mods(e.g. Flight ring, Viltrumite) but the price is all Flight items in MI and it can break Flight in other mod that using PAL library

Fully vibecoded

Ru человеческое описание

У меня возникла проблема, что у меня не работал полет в моде "Viltrumite" с связке с модом Modern Industrialisation. Этот мод это чинит, но ломает все вещи на полет в MI и может в других модах. 
Ну все, ниже, после Англиского норм описания,  описание от Claude Opus для задротов.

En

I ran into an issue where flight wasn't working in the "Viltrumite" mod when used alongside Modern Industrialisation. This mod fixes that, but it breaks all flight-related items in MI—and possibly in other mods, too. Anyway, here’s the technical breakdown from Claude Opus for the hardcore nerds.↓↓↓

MI Flight Fix

A lightweight compatibility patch that fixes creative/granted flight being constantly disabled when PlayerAbilityLib (PAL) conflicts with flight-granting mods (e.g. Viltrumite Core, Reliquary, and other PAL-based mods).

The Problem

PlayerAbilityLib's VanillaAbilityTracker.checkConflict() runs every tick and resets the mayfly/flying ability to disabled if PAL doesn't "own" the flight state. When another mod grants flight directly (without registering a PAL ability source), PAL treats it as external tampering, logs a warning, and forcibly cancels the flight — making double-tap-to-fly only trigger a jump.

 

The Fix

This mod uses a Mixin to cancel checkConflict() only for the FLYING and ALLOW_FLYING abilities, preventing PAL from overriding externally granted flight. All other PAL abilities behave normally.

Compatibility

  • Minecraft: 1.20.1
  • Loader: Fabric
  • Requires: PlayerAbilityLib (PAL)
  • Side: Both (server-authoritative; install on server and client)

 What this mod can break

  • Other PAL flight logic: If a mod intentionally uses PAL to revoke flight (anti-fly zones, custom gamemodes, mana/energy-based flight that should cut off), this fix may keep flight enabled when it shouldn't.
  • Datapacks / plugins that disable flight via PAL may stop working as expected.
  • Only flying/mayfly conflict checks are skipped — no other abilities are affected.
  • The PAL "tamper warning" for flight is intentionally suppressed.

Notes

This is an unofficial compatibility patch and is not affiliated with PAL or any flight-granting mod. Always back up your world before adding mods.

↓Without mod/me whithout Opus 4.8 

The MI/PAL Flight fix Team

profile avatar
  • 1
    Projects
  • 6
    Downloads

dont know how to code lol