import org.spout.vanilla.protocol.msg.entity.spawn.EntityExperienceOrbMessage;
public class XPOrbEntityProtocol extends VanillaEntityProtocol {
@Override
public List<Message> getSpawnMessages(Entity entity, RepositionManager rm) {
XPOrb xp = entity.add(XPOrb.class);
int id = entity.getId();
int x = (int) (entity.getPhysics().getPosition().getX() * 32);
int y = (int) (entity.getPhysics().getPosition().getY() * 32);
int z = (int) (entity.getPhysics().getPosition().getZ() * 32);
return Arrays.<Message>asList(new EntityExperienceOrbMessage(id, x, y, z, xp.getExperience(), rm));
}