[SPIGOT-7548] Wrong spawn location for EntityType.EXPERIENCE_ORB and EntityType.DROPPED_ITEM Created: 18/Dec/23  Updated: 25/Dec/24  Resolved: 18/Dec/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Odin Dahlström Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: CraftBukkit version 3976-Spigot-06d602e-b3b43a6 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Relevant code sample:

ExperienceOrb orb = (ExperienceOrb) location.getWorld().spawnEntity(location, EntityType.EXPERIENCE_ORB);
orb.setExperience(1);

When spawning a EntityType.EXPERIENCE_ORB or EntityType.DROPPED_ITEM entity using World#spawnEntity, the entity is spawned at the wrong location. Specifically, the entity is spawned at (x, z, z) instead of (x, y, z). This bug is a regression which was introduced by craftbukkit#1306.

Here are the relevant lines of code:


Generated at Sat Dec 13 19:00:18 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.