Class SeedAcquisitionRegistration

java.lang.Object
ke.ric.api.registration.SeedAcquisitionRegistration

public final class SeedAcquisitionRegistration extends Object
Owner-scoped acquisition registration. The existing seed_packets, grass_drops.biome_modifiers, and chest_loot sections append entries to Core targets. packet_definitions defines addon-owned packets using Core's packet schema (seeds, drops_min, drops_max); its IDs must resolve to registered custom items. An owner may append to its own packet definitions, but may not append to another addon's packets.

block_drops accepts Core's array of rules (id, blocks, optional biomes, chance, weighted items). Packet and rule IDs must not collide with Core or another owner. Addon block rules do not reward breaking persistent leaves; existing Core rules retain their behavior.

Optional enabled_features.chest_loot and enabled_features.block_drops switches default to true and disable only this owner's corresponding contributions. Packet definitions remain available, and Core's global feature switches still apply. Disabled definitions are validated and reserve their IDs. Re-registering an owner atomically replaces its contribution; failure leaves the previous registration intact.

  • Method Details

    • registerFromFile

      public int registerFromFile(File file, String addonId)
      Registers or atomically replaces one owner's acquisition file.
      Returns:
      total seed entries appended to packets, seed entries in owned packet definitions, biome seeds, enabled chest items, and enabled block-rule reward items; locally disabled chest and block contributions are not counted
      Throws:
      IllegalArgumentException - if parsing, item resolution, or target validation fails
    • unregisterAddon

      public int unregisterAddon(String addonId)