Unofficial site, not affiliated with modrinth.com.What is this?
Моды/CobblemonOptimizer
CobblemonOptimizer

CobblemonOptimizer

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

9.3K
21
Все версииCobblemonOptimizer 4.1.5

CobblemonOptimizer 4.1.5

Release1 мес. назад

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

The ghost Pokemon bug was caused by AdaptiveSpawnManager calling event.cancel() on CobblemonEvents.ENTITY_SPAWN without cleaning up the entity itself.

event.cancel() only sets a flag on the event object. If Cobblemon adds the entity to the world before firing the event (or doesn't properly check the
cancellation flag), the entity remains in the world as a ghost: it exists server-side but was never fully initialized by Cobblemon's spawn pipeline. This
means:

  • No model/animation data synced to clients — the entity is invisible
  • No Cobblemon behavior state initialized — the entity is stuck, can't be battled
  • Never cleaned up — ghost entities accumulate over time

The fix adds event.entity.discard() after every event.cancel() call. discard() marks the entity for removal from the world. It's safe in both scenarios:

  • If the entity is already in the world → it gets properly removed, destroy packet sent to clients
  • If the entity was never added to the world → it's a no-op (just sets a flag on a garbage-collectible object)

Файлы

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

Метаданные

Канал релиза

Release

Номер версии

4.1.5

Загрузчики

NeoForge

Версии игры

1.21.1

Загрузок

62

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

1 мес. назад

Загрузил

ID версии

Главная