Prattyush Shrestha

Act as an expert Minecraft Mod & Plugin Architect. Generate production-ready code for a universal, cross-platform Powers and Economy system targeting Minecraft 1.26.2 / 1.26.3.

Target Frameworks

* Forge 1.26.2/3 (Mod) * Fabric 1.26.2/3 (Mod) * Paper 1.26.2/3 (Plugin)

System Architecture & Core Requirements

#### 1. Permanent Power Selection System * Command: /open menu opens a GUI displaying 8 Power Cards. * Selection Logic: Selecting a power and clicking Select permanently binds it to the player's Unique Identifier (UUID). * Persistence: Power bindings must persist through death, disconnect, server restarts, account relogs, or Dimension changes. No reset or power swap is permitted after selection. * UI Design: Item-based GUI displaying the power's name, description lore, selection status, and confirmation step. #### 2. Power Specifications 1. Ember Flames: * Permanent Passive: Fire Resistance. * Ability: Fire manipulation and targeted ignition/control. 2. Amber Eye: * Ability: Flight toggle and Meteor summoning. * World Control: Limited terraforming/manipulation targeting specific blocks (Netherrack, Stone, Lava). * Passives: None. 3. Soul Fire: * Permanent Passives: Soul Speed, passive damage reduction percentage, attack damage multiplier. * Abilities: Soul Fire control and Flight toggle. 4. Water Infinity Affinity: * Permanent Passives: Water Breathing, 2× Attack Damage multiplier, increased mining speed (Haste), increased agility (Speed). * Toggle Ability (G Key / Toggle Action): Water Walking toggle on tap. Tap again to descend/sink into water. 5. Eternal Fire: * Permanent Passive: Fire Resistance. * Ability: Combustion Bending (explosive ranged fire attacks). 6. Fire Materialization: * GUI Trigger (H Key / Action Command): Opens a dynamic Fire Weapon Summoning GUI.

Functionality: Consumes a fraction of Hunger/Saturation to summon temporary high-tier elemental weapons (e.g., Flaming Blade, Flaming Bow & Arrow*). 7. The Teleporter: * Abilities: Direct location teleportation mechanics and an infinite Ender Pearl ability with configurable cooldowns. 8. The Support Merchant: * Passives: 2× Economy Gain multiplier on all earned currency. * Abilities: Area-of-Effect support (applies positive effects to allies/party members, applies debuffs to enemies). #### 3. Economy & Currency Systems * Currencies: 1. Gemstones: Amethyst variants with custom textures/recolors. 2. Ruby: Translucent red diamond variant. Used in recipes and high-tier trades. 3. Ember (Money): Standard digital/item currency used across all guilds and player shops. * Earning Mechanisms: * Adventurer's Guilds: Dynamic quest system granting Ember rewards upon completion. * Player Shops: Shop creation framework enabling solo or group player-to-player trading and item selling. #### 4. Ruby Tech & Redstone Integration * Redstone Components: Compact 1-block to 6-block logic structures. * ON/OFF Binary Gates * NOT Gates * Colored Water: * Decorative colored liquid blocks. * Neon-colored variants emit directional or omnidirectional Redstone signals.

Implementation Deliverables

1. Common Domain Architecture: Clean separation between core logic (Power/Economy handling) and platform bindings (Forge/Fabric APIs, Spigot/Paper Event Listeners). 2. Persistent Data Container (NBT / PersistentDataContainer): Strict UUID-to-Power storage logic. 3. Keybind & Network Packets (Forge/Fabric): Packet handler for key triggers (G for Water Walk, H for Materialization Menu). 4. Custom GUI Framework: Inventory API listeners for Paper, Custom Screen/Menu Handlers for Forge & Fabric. 5. Item & Block Registries: Registration code for Gemstones, Rubies, Ruby Redstone Gates, and Colored Water variants.

Please produce the boilerplate, directory structure, registry definitions, and event handlers step-by-step for the specified target version.

Kodari AI
KodariSep 19 at 2:48 am 5
ElementalPowersEconomy
Cross-platform Minecraft mod/plugin delivering a permanent power selection system with 8 unique elemental abilities, persistent UUID-based binding, and a multi-currency economy featuring Gemstones, Rubies, and Ember. Includes GUI framework for power selection and weapon summoning, keybind handling for ability toggles, Ruby-based redstone logic gates, and colored water blocks. Built for Forge, Fabric, and Paper with clean domain separation and persistent data storage.
  1. Create the multi-module Gradle project and platform-neutral power/economy domain layer.

  2. Add the Paper plugin: persistent UUID bindings, /open menu, inventory GUI, passives, abilities, economy, shops, and quest hooks.

  3. Add Fabric bindings: registries, persistent data, key mappings, payloads, screen handler, and gameplay hooks.

  4. Add Forge bindings: registries, capabilities/data storage, key mappings, network messages, menus, and gameplay hooks.

  5. Add shared item/block registration contracts, configuration, and setup documentation for extending the eight powers and currencies.

  1. Common domain: added immutable power definitions, atomic permanent selection, economy/quest services, and transactional shop contracts.

  2. Paper platform: adding the persistent PDC store, GUI framework, commands, passive/ability listeners, and plugin metadata now.

  3. Fabric platform: will expose the same domain through registries, persistent player data, key payloads, and menu scaffolding.

  4. Forge platform: will expose the same domain through registries, player data, key messages, and menu scaffolding.

  5. Shared extension surface: will document registration IDs, configuration, and platform integration points.

  1. Common and Paper layers are in place, including UUID-locked selection and PDC persistence.

  2. Fabric layer: adding registries, persistent-state storage, key-trigger payloads, and a server menu bridge.

  3. Forge layer: adding deferred registries, capability-backed power storage, key messages, and menu bridge.

  4. Shared setup docs: adding version properties, content IDs, build commands, and extension notes.

  1. Common/Paper/Fabric are generated.

  2. Forge layer: adding the equivalent registries, persistent capability, gameplay event hooks, key mappings, packets, and menu handler.

  3. Documentation/configuration: adding the version matrix, module map, and extension checklist.

  1. Added the Forge registries, capability persistence, menu type, packet channel, and G/H client bindings.

  2. Persistence hardening: adding a Paper PDC economy backend so balances survive restarts alongside power bindings.

  3. Correctness pass: fixing the coordinate teleport construction and a Forge capability import collision.

  4. Project guide: adding the module map, setup commands, persistence guarantees, and platform extension points.

Created the multi-platform Powers Economy project scaffold.

  • Common module

    • Eight immutable power definitions.

    • Atomic, permanent UUID-bound selection.

    • Economy services for Gemstones, Ruby, and Ember.

    • Support Merchant 2× earnings.

    • Adventurer quest rewards.

    • Player shop listing and purchase contracts.

    • Shared content IDs for items, gates, and colored water.

  • Paper module

    • /open menu power-card GUI with confirmation.

    • Permanent power storage through PersistentDataContainer.

    • Persistent currency balances.

    • /power waterwalk

    • /power materialize

    • /power teleport <x> <y> <z>

    • Fire resistance, Soul Fire damage reduction, Water Affinity effects, and water walking.

    • Paper plugin metadata and configuration.

  • Fabric module

    • Fabric item/block registries.

    • Persistent UUID-to-power state.

    • Custom client-to-server trigger payload.

    • G key for water walking.

    • H key for fire materialization.

    • Initial menu/action bridge.

  • Forge module

    • Deferred item/block registries.

    • Player capability-based power persistence.

    • Clone/death persistence handling.

    • Forge menu type scaffold.

    • SimpleChannel trigger packet.

    • G/H key mappings.

    • Initial gameplay event hooks.

  • Documentation

    • Added README.md with module layout, build commands, persistence guarantees, IDs, and extension points.

The Fabric and Forge registry/menu implementations are intentionally scaffolding around the finalized 1.26.2/1.26.3 mappings. Their exact APIs may need adjustment once those loader and game-version coordinates are officially available.

Kodari can make mistakes. Review important code before using.
Files
common
fabric
forge
paper
build.gradle
README.md
settings.gradle
Code
54 1,891
paper/src/main/java/com/kodari/powerseconomy/paper/PowersEconomyPlugin.java
package com.kodari.powerseconomy.paper;

import com.kodari.powerseconomy.common.economy.EconomyService;
import com.kodari.powerseconomy.common.power.PowerService;
import com.kodari.powerseconomy.paper.gui.GUIListener;
import com.kodari.powerseconomy.paper.gui.GUIManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class PowersEconomyPlugin extends JavaPlugin {
    private PowerService powers;
    private PowerListener powerListener;

    @Override
    public void onEnable() {
        powers = new PowerService(new PersistentPowerBindingStore(this, PlayerLookup.online()));
        EconomyService economy = new EconomyService(new PersistentEconomyStore(this, PlayerLookup.online()), powers);
        GUIManager guiManager = new GUIManager();
        powerListener = new PowerListener(powers);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(powerListener, this);
        getCommand("open").setExecutor(new OpenCommand(guiManager, powers));
        getCommand("power").setExecutor(new PowerCommand(this, powers));
        getLogger().info("PowersEconomy enabled with " + economy.getClass().getSimpleName() + " backend.");
    }

    public PowerListener powerListener() {
        return powerListener;
    }
}