Lethal Company
Install

Details

Last Updated
First Uploaded
Downloads
2.3K
Likes
1
Size
32KB
Dependency string
abooban1-ModelReplacementAPIHotfix-1.0.2
Dependants

ModelReplacementAPI Hotfix

A small compatibility hotfix for ModelReplacementAPI 2.4.19 in Lethal Company. Imporved compatibility with MoreCompany cosmetics.

This mod is intended for modpacks where the original BunyaPineTree-ModelReplacementAPI is still required by other model replacement mods, but causes errors on newer Lethal Company versions or with reserved/item slot mods.

What this fixes

This hotfix currently addresses several common issues:

  • Fixes IndexOutOfRangeException in LocateHeldObjectsOnModelReplacementPatch.LateUpdatePatch.
  • Adds safer held-item slot handling when currentItemSlot points outside the vanilla ItemSlots array.
  • Prevents repeated NullReferenceException spam from BodyReplacementBase.LateUpdate.
  • Disables unsafe MoreCompany cosmetic rendering on players using model replacement skins.
  • Helps prevent log spam when switching between incompatible model replacement suits.

Why this is needed

The original ModelReplacementAPI 2.4.19 assumes that the player's selected item slot always exists inside the vanilla ItemSlots array.

With newer Lethal Company versions and mods such as reserved hotbar/item slot mods, currentItemSlot may point to a reserved/tool slot outside the normal item slot array. This can cause errors like:

IndexOutOfRangeException
ModelReplacement.Patches.LocateHeldObjectsOnModelReplacementPatch.LateUpdatePatch
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.