public void spawnXPCrystal(int x, int y, int xp) {
        Resource r = new Resource(registry, this, this.getResourceTypeByName("XPCrystal"), x, y, xp);
        r.setMapY(findNextFloor(x + r.getWidth(), y, r.getHeight()));

        registerResource(r);
        if (gameController.multiplayerMode == gameController.multiplayerMode.SERVER && registry.getNetworkThread() != null) {
            if (registry.getNetworkThread().readyForUpdates()) {
                registry.getNetworkThread().sendData(r);
            }
        }
    }