▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/CobblemonOptimizer
CobblemonOptimizer

CobblemonOptimizer

CobbleOptimizer is a server-side Fabric mod that reduces lag caused by Cobblemon's Pokemon entities.

3.5K
17
Все версииCobblemonOptimizer 4.0.2

CobblemonOptimizer 4.0.2

Release2 нед. назад

Список изменений

● Fix: Remove getActivePokemon() caching from PokemonBattleMixin

Problem: NoSuchElementException crash in Targetable.getOppositeOpponent() during battle start (Cobblemon 1.7.3 only).

Root cause: The mixin cached PokemonBattle.getActivePokemon() as a static snapshot (List.copyOf()). In Cobblemon 1.7.3, this method is a lazy iterable that evaluates on each call. During SwitchInstruction processing, the
cached snapshot became stale — the opponent's slot was in transition (old pokemon cleared, new one not yet assigned), so getOppositeOpponent() found no match and threw.

Fix: Removed the getActivePokemon() cache. Cobblemon's lazy iterable now evaluates in real-time, always reflecting current battle state. Other caches (sides, actors, players, isPvP/isPvN/isPvW) are unaffected — they don't change during instruction processing.

Why it only affects 1.7.3: Cobblemon 1.7.1 likely returned direct list references from getActivePokemon(), making the snapshot safe. 1.7.3 changed to a lazily computed iterable, breaking the snapshot approach.

Файлы

CobbleOptimizer-4.0.2.jar(465.55 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

4.0.2

Загрузчики

Fabric

Версии игры

1.21.1

Загрузок

136

Дата публикации

2 нед. назад

Загрузил

ID версии

Главная