Compatibility
Minecraft: Java Edition
1.21.1
Platforms
Supported environments
Creators
Details
Licensed MIT
Published 2 months ago
Updated 20 hours ago
Changelog
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)
Files
Metadata
Release channel
ReleaseVersion number
4.1.5Loaders
Game versions
1.21.1Environment
Server-side only, works in singleplayer too
Downloads
108Publication date
March 30, 2026 at 11:34 AMPublisher
MarcoErCarrozza
Member


