Minecraft get rid of XP Orbs

minecraft-commandsminecraft-java-editionminecraft-java-edition-server

I have a Minecraft server, and via the use of a modpack I have a chunk full of XP orbs. Logging in crashes the server and freezes the client, but I have access to the server via my hosting provider and can issue commands

The question is, which command? Googling reveals commands for older modpacks such as /cofh or bukkit mods, but I don't have that luxury. How would a vanilla Minecraft server deal with this?

Best Answer

How would a vanilla Minecraft server deal with this?

A vanilla server would run the command:

/kill @e[type=xp_orb]

Or for versions 1.10 and older:

/kill @e[type=XPOrb]

The issue with this is that it will only work if the XP orbs are in loaded chunks.

As logging in crashes the server, there's a good chance that the server is only managing to run while the orbs are far enough away from players to be unloaded, and that logging in crashes the server because it loads them.

To fix this, you could download MCEdit and open up the world. You should see orbs represented as a large number of transparent boxes; highlight them by clicking and dragging a selection around them, and then press Delete Entities. This will also affect any other entities in your selection.

enter image description here