Ooga-ModelReplacementFix icon

ModelReplacementFix

Fixes IndexOutOfRangeException console spam in ModelReplacementAPI caused by the new utility item slot added in the latest Lethal Company update.

By Ooga
Last updated 6 hours ago
Total downloads 27
Total rating 0 
Categories Bug Fixes
Dependency string Ooga-ModelReplacementFix-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
BunyaPineTree-ModelReplacementAPI-2.4.20 icon
BunyaPineTree-ModelReplacementAPI

API to simplify model replacement

Preferred version: 2.4.20

README

ModelReplacement Fix

A simple BepInEx patch that fixes console spam caused by an IndexOutOfRangeException in ModelReplacement.BodyReplacementBase.UpdateItemTransform.

The Problem

The latest Lethal Company update added a new utility item slot (e.g. the torch). When switching from the utility slot back to a regular item, ModelReplacement tries to access a bone index that doesn't exist in its array — flooding the BepInEx console with errors every frame.

What This Mod Does

Suppresses the exception silently after logging a single warning on first occurrence. The game is otherwise completely unaffected.

Requirements

Installation

Drop ModelReplacementFix.dll into your BepInEx/plugins/ folder.