Skip to content

World#spawnEntity doesn't initialize passengers properly #13559

@molor

Description

@molor

Expected behavior

Spawned entity's passenger(s) are properly created/initialized by the server, added to the world and synchronized w/ nearby players.

Observed/Actual behavior

Looks like spawned entity's passenger(s) doesn't even exist on the server side until the chunk in which it spawned is reloaded (i.e. player teleported to different world and then, after ~ 10s, teleported back).

Steps/models to reproduce

Spawn a lots of spiders using the method

vWorld.spawnEntity(vLocation, EntityType.SPIDER, CreatureSpawnEvent.SpawnReason.NATURAL, (vEntity) -> {
	// it doesn't matter if anything is performed here, but in my case I'm using this method
});

Then, after 1 tick, call Entity#remove on all spawned entities if Entity#isEmpty() returns true.

If you're lucky, you will see a "partially frozen" spider (it produces sounds and you still can attack it, but it won't attack you even at night) w/o passenger (skeleton), but /data get entity ... shows that passenger exist, just not properly initialized/created (?).

Plugin and Datapack List

Only my test plugin. LuckPerms, WorldEdit, WorldGuard, CoreProtect and Grim AC.

datapack list
[21:37:27] There are 2 data pack(s) enabled: [vanilla (built-in)], [file/Bukkit (world)]
[21:37:27] There are no more data packs available

Paper version

This server is running Paper version 1.21.11-90-main@4b35f5c (2026-01-09T18:48:48Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are 2 version(s) behind

Other

This issue present even on Paper 1.20.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.11Game version 1.21.11

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions