voreixz

The compilation failed with this error:

code
Compilation failed with 1 error(s):

ERROR in src/main/java/com/kodari/gemscape/game/AbilityManager.java at line 3: cannot find symbol
import com.cryptomorin.xseries.XParticle;
                              ^
  symbol: class XParticle
  location: package com.cryptomorin.xseries


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - XParticle
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/kodari/gemscape/game/AbilityManager.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 28 at 10:21 am 1

Fixed the compilation error by correcting the XSeries import:

Java
import com.cryptomorin.xseries.particles.XParticle;

Updated artifact: src/main/java/com/kodari/gemscape/game/AbilityManager.java

voreixz

can you give everything a custom texture pack? and maybe second abiliteies

Kodari AI
KodariJul 28 at 1:03 pm 41
  1. Add a custom resource-pack foundation covering the plugin’s items and ability visuals.

  2. Add secondary abilities and connect them to the existing ability system.

  1. Resource-pack foundation: add model-data mappings for every gem and utility item, configurable pack delivery on join, and pack metadata/assets.

  2. Secondary abilities: add a sneak + right-click trigger with one secondary ability per gem, energy/cooldown handling, and lore showing both abilities.

The secondary-ability code and model-data hooks are in place. I’m adding the resource-pack asset scaffold now; it uses the plugin’s custom model-data IDs so you can replace the texture layers without changing Java code.

There are two cleanup fixes before the artifact is complete: the resource-pack API call must use the compatible URL overload, and the pack metadata should remain optional until you host the ZIP.

Implemented both features:

  1. Custom texture-pack support

    • Added custom model-data IDs for all gems and utility items.

    • Added a resource-pack scaffold under: src/main/resources/resource-pack/

    • Added pack.mcmeta, model overrides, fallback models, and setup instructions in README.md.

    • Added configurable pack settings to config.yml:

      YAML
      resource-pack:
        url: ""
        sha1: ""
        required: false
      
    • The pack is sent to players when they join if url is configured.

  2. Secondary abilities

    • Added one secondary ability for every gem.

    • Trigger: sneak + right-click while holding the matching gem.

    • Added separate energy costs and cooldowns.

    • Added secondary ability names to gem lore and /gemscape information.

Secondary abilities include:

  • Puff — Gale Burst

  • Life — Verdant Mend

  • Astra — Phase Blink

  • Fire — Ember Trail

  • Healthy — Renewal

  • Strength — Ground Slam

  • Speed — Afterimage

  • Flux — Arc Chain

  • Heretic — Blood Pact

  • Auratius — Radiant Ward

Custom PNG textures still need to be placed in:

Plain Text
src/main/resources/resource-pack/assets/gemscape/textures/item/

Then zip the contents of resource-pack, host the ZIP publicly, and set the URL in config.yml.

voreixz

add cool effects?

Kodari AI
KodariJul 28 at 1:13 pm 3
  1. Add distinctive particle and sound effects to primary and secondary abilities.

  2. Keep effects cross-version compatible with the project’s XSeries setup and avoid changing ability behavior.

Added visual and audio effects to the gem abilities.

  • Healing abilities: hearts, happy villager particles, level-up sounds

  • Teleport abilities: portal effects and Enderman teleport sounds

  • Fire abilities: flame bursts and Blaze sounds

  • Strength abilities: crit and smoke effects

  • Speed abilities: electric spark trails

  • Flux abilities: electric arc effects and lightning sounds

  • Heretic abilities: damage indicators and hurt sounds

  • Auratius abilities: End Rod, totem particles, and beacon sounds

  • Ground Slam: impact ring, crit burst, and explosion sound

  • Ability effects use XSeries for cross-version compatibility

Updated:

Plain Text
src/main/java/com/kodari/gemscape/game/AbilityManager.java
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
77 2,248
src/main/java/com/kodari/gemscape/GemSwapPlugin.java
package com.kodari.gemscape;

import com.kodari.gemscape.command.GemCommand;
import com.kodari.gemscape.data.ProfileManager;
import com.kodari.gemscape.game.AbilityManager;
import com.kodari.gemscape.item.ItemFactory;
import com.kodari.gemscape.listener.GemListener;
import com.kodari.gemscape.recipe.CraftingManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.List;

public final class GemSwapPlugin extends JavaPlugin {
    private ProfileManager profileManager;
    private ItemFactory itemFactory;
    private AbilityManager abilityManager;
    private boolean abilitiesDisabled;
    private String resourcePackUrl;
    private String resourcePackSha1;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.profileManager = new ProfileManager(this);
        this.itemFactory = new ItemFactory(this);
        this.abilityManager = new AbilityManager(this);
        this.abilitiesDisabled = getConfig().getBoolean("settings.abilities-disabled", false);
        this.resourcePackUrl = getConfig().getString("resource-pack.url", "");
        this.resourcePackSha1 = getConfig().getString("resource-pack.sha1", "");

        getServer().getPluginManager().registerEvents(new GemListener(this), this);
        new CraftingManager(this).registerRecipes();

        GemCommand command = new GemCommand(this);
        List<String> commandNames = List.of(
                "gemscape", "withdraw", "trust", "cooldown", "disable",
                "givelissitem", "progression1", "progression2", "progression3",
                "progression4", "setenergy", "setwatt", "pedastal", "random"
        );
        for (String commandName : commandNames) {
            if (getCommand(commandName) != null) {
                getCommand(commandName).setExecutor(command);
                getCommand(commandName).setTabCompleter(command);
            }
        }

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            for (Player player : Bukkit.getOnlinePlayers()) {
                abilityManager.applyPassiveEffects(player);
            }
        }, 20L, 20L);
    }

    @Override
    public void onDisable() {
        if (profileManager != null) {
            profileManager.save();
        }
    }

    public ProfileManager getProfileManager() {
        return profileManager;
    }

    public ItemFactory getItemFactory() {
        return itemFactory;
    }

    public AbilityManager getAbilityManager() {
        return abilityManager;
    }

    public boolean areAbilitiesDisabled() {
        return abilitiesDisabled;
    }

    public void setAbilitiesDisabled(boolean abilitiesDisabled) {
        this.abilitiesDisabled = abilitiesDisabled;
        getConfig().set("settings.abilities-disabled", abilitiesDisabled);
        saveConfig();
    }

    public String getResourcePackUrl() {
        return resourcePackUrl;
    }

    public String getResourcePackSha1() {
        return resourcePackSha1;
    }

    public int getMaximumEnergy() {
        return getConfig().getInt("settings.maximum-energy", 100);
    }
}