DaycareBMC banner
DaycareBMC icon

DaycareBMC

Create Server-Side Fabric Mod(1.21.1,Java21)"BMCbreed"(id:bmcbreed).Context:Cobblemon Extension.Directives:NO Client assets/Mixins.Use...

00
cobblemon-fabricServer1.21.1mod

BMCbreed Mod Notes

What was built

  • Server-only Cobblemon extension providing breeding eggs, pasture automation, and administrative commands under the mod id bmcbreed.
  • Adds two items: breeding_egg (hidden Pokémon eggs) and pasture_token (places a pasture block that breeds nearby Pokémon).
  • Adds a pasture block & block entity that periodically scans a 10-block radius for compatible Pokémon and produces encrypted eggs.

How it works

  • Configuration lives at config/BMCbreed/config.json with toggles for egg encryption, encryption key, breeding scan rate, shiny logic, hopper output, and neuter cost.
  • Eggs store Pokémon data in a CustomData tag; when encryptEggs is true the data is AES-128 encrypted into BMCData using the configured key.
  • Breeding eggs tick while a player is walking; every 20 ticks the internal cycles counter decreases until hatching, then the Pokémon is added to the player’s party (or dropped if full).
  • Pasture blocks check every eggCheckTicks for two compatible Pokémon (gender/egg groups, ignoring neutered or baby Pokémon). If found, they clone a child, apply shiny chances (supports disabled/masuda/crystal with multiplier), and create a breeding egg using the species’ egg cycles.
  • If allowHoppers is true the pasture tries to insert eggs into a hopper beneath; otherwise it spawns the egg above the block.

Commands & permissions (base node bmcbreed.cmd)

  • /eggInfo – Inspect held egg; shows "§kSecret" when encrypted, otherwise displays IVs.
  • /forceHatch – Sets held egg cycles to 0 so it hatches on next tick.
  • /neuter <slot> – Marks the Pokémon in the given party slot as unbreedable and charges neuterCost experience levels (rounded up).
  • /checkBreedable <slot> – Reports whether the party Pokémon is breedable.
  • /giveEgg <player> <specs> – Creates an egg from Cobblemon specs and gives it to the player.
  • /bmcbreed reload – Reloads the config and reinitializes encryption.

Important implementation details

  • Encryption uses AES/ECB/PKCS5Padding with the key truncated/padded to 16 bytes; encrypted data is stored as Base64 string BMCData.
  • Eggs use Mojang 1.21.1 data components (CustomData) rather than legacy NBT wrappers.
  • Neutering adds breedable=false to Pokémon persistent data; pasture breeding ignores Pokémon with this flag.

Known limitations / suggestions

  • Permissions API calls use a lightweight fallback stub; integrate a full permissions provider if stricter controls are needed.
  • Pasture breeding stops after creating one egg per scan interval; expanding throughput would require queueing or multiple blocks.
  • Eggs are consumed only when successfully added to a party; full parties will leave the egg intact after a warning message.