DEV Community

Cover image for Backporting a Minecraft Mod Across Versions — And Building a Cloud Economy with Villagers

Backporting a Minecraft Mod Across Versions — And Building a Cloud Economy with Villagers

We had a problem. The mod was called "AWS Swords," built for Minecraft 1.21.1, and it worked great in isolation. But nobody plays Minecraft in isolation. The biggest modpacks — Prominence II, All The Mods, Create-based packs — they're all on 1.20.1. And using "AWS" in the name raised trademark questions.

So we did what any good cloud architect does: we refactored, rebranded, and migrated. Welcome to Cloud Swords Mod — now running on 1.20.1, compatible with 650+ mods, and featuring a full villager-based cloud economy.

Cloud Office village structure with villagers

🎮 The learning angle: Backporting a mod is like migrating between cloud provider API versions. The concepts are the same, but every method signature is slightly different. And building a villager economy teaches you about service catalogs, tiered pricing, and progression systems — all concepts from real cloud platforms.

The Rebrand: AWS Swords → Cloud Swords

First, the easy part. We renamed everything:

  • awsswordscloudswords
  • "AWS Swords" → "Cloud Swords Mod"
  • Service-specific names stayed (Lambda, S3, EC2) but as game lore, not branding

Why? Because we want to publish on CurseForge/Modrinth, and using a company's trademark in a mod name is risky. The swords are inspired by cloud services — they don't claim to be official AWS products.

The Backport: 1.21.1 → 1.20.1

This is where it gets technical. Minecraft 1.21.1 and 1.20.1 look similar from a player's perspective, but the modding API changed significantly. Here's every difference we hit:

1.21.1 1.20.1 Impact
Identifier.of("ns", "path") new Identifier("ns", "path") Every single identifier
DataComponentTypes.CUSTOM_DATA Direct NBT on ItemStack Complete rewrite of S3 sword storage
fabric-loot-api-v3 fabric-loot-api-v2 Different lambda signatures
LootTableEvents.MODIFY 4 params 5 params, different types Loot injection rewrite
Equipment interface Doesn't exist Remove entirely
BlockEntityType.Builder.build() build(null) Every block entity
Java 21 Java 17 Language features
EMI 1.1.16+1.21.1 1.1.22+1.20.1 Different API surface

The lesson? API migrations are never "just find and replace." Every change has cascading effects. The DataComponentTypes change alone required rewriting how the S3 sword stores items — from the new component system back to raw NBT compounds.

// 1.21.1 — new component system
stack.getOrDefault(DataComponentTypes.CUSTOM_DATA, NbtComponent.DEFAULT)
    .copyNbt().getList("stored_items", NbtElement.COMPOUND_TYPE);

// 1.20.1 — direct NBT
stack.getOrCreateNbt().getList("stored_items", NbtElement.COMPOUND_TYPE);
Enter fullscreen mode Exit fullscreen mode

Same concept, completely different API. Sound familiar? It's like migrating from AWS SDK v2 to v3.

7 Cloud Villager Professions

The biggest new feature: a full economy system powered by villagers. Each profession represents a cloud role:

Profession Workstation Specialty
Software Developer Cloud Deployer Sword cores, Lambda chips
Cloud Architect Cloud Console Network components, VPC frames
Security Engineer Security Terminal Firewall modules, encryption
AI Engineer AI Workbench Processors, auto-scaling modules
DevOps Engineer Cloud Generator Energy, cables, automation
SysAdmin Server Rack Server components, overclocking
Data Engineer Cloud Refinery Dusts, data processing

Each has 5 trade levels (Novice → Master), and Master-level trades accept Cloud Credits — a custom currency that unlocks premium items.

Master-Level Exclusive Items

These are items you can ONLY get from Master villagers with Cloud Credits:

Item Effect Cloud Concept
Serverless Function Teleport to last death location Lambda — runs on demand
Multi-Region Backup Restore inventory on death S3 Cross-Region Replication
Zero Downtime Shield Prevent death once High Availability
Training Dataset +30 XP levels instantly ML Training
Infinite Bandwidth Token Haste III + Speed II for 5 min Network throughput
Data Pipeline Duplicate all dusts in inventory ETL processing

Plus vanilla rare items (Totem, Elytra, Nether Star) for Cloud Credits — because in the cloud, money solves problems.

Cloud Office — Village Structure

We injected a custom structure into vanilla villages: the Cloud Office. It's a 7x7x7 building with:

  • 3 workstations (Security Terminal, AI Workbench, Server Rack)
  • Copper accents for visual distinction
  • Spawns in ~50% of villages

Technically, this uses Fabric's ServerLifecycleEvents.SERVER_STARTING to inject a jigsaw element into the village structure pool before world generation. An access widener exposes the StructurePool.elements field.

Ore Generation Across Dimensions

Ore Dimension Y Range Vein Size Per Chunk
Cloud Ore Overworld 0-64 6 4
Nether Cloud Ore Nether 30-90 4 3
End Cloud Ore End 0-80 3 2

The progression mirrors cloud regions: you start local (Overworld), expand to a secondary region (Nether), and eventually go global (End).

Prominence II Compatibility — 650+ Mods

The ultimate test: does it work in a modpack with 650 mods? Yes.

  • No item/block ID conflicts
  • Energy system coexists with Create, Tech Reborn, Mekanism
  • Villager professions work alongside VillagersPlus
  • Ore generation works with Regions Unexplored biomes
  • EMI shows all recipes correctly
  • Loot injection works in all structure types

The key was using Fabric's registry system correctly and not hardcoding anything. Namespaced identifiers, proper tags, and optional dependencies.

Lessons Learned

Challenge Solution
API differences between versions Document every change, migrate systematically
Trademark concerns Rebrand early, use "inspired by" language
650-mod compatibility Use registries, avoid hardcoding, test early
Village structure injection Access widener + jigsaw pool manipulation
Economy balance Cloud Credits as gating currency for endgame

What's Next

The foundation is solid: 7 swords, machines, villagers, economy, ores, and full modpack compatibility. But we're just getting started. In the next post, we'll add a complete magic system — 28 spells across 9 spellbooks, each themed around cloud operations. Because in the cloud, automation is magic.


Full source on GitHub.

Connect with me:

I'm Carlos Cortez, this is Breaking the Cloud, and today we migrated to a new region. See you in the next one! 🌍

Top comments (0)