promotional bannermobile promotional banner

BlockSwap Reforged

BlockSwap mod Reforged for newer minecraft versions
Back to Files

blockswap-neoforge-1.21.1-v2.0.jar

File nameblockswap-neoforge-1.21.1-v2.0.jar
Uploader
BlackBroodBlackBrood
Uploaded
Nov 10, 2026
Downloads
14
Size
293.0 KB
Mod Loaders
NeoForge
File ID
9545835
Type
R
Release
Supported game versions
  • 1.21.1
  • 1.21

Curse Maven Snippet

NeoForge

implementation "curse.maven:blockswap-reforged-1754125:9545835"

Learn more about Curse Maven

What's new

Major Features

1. Dimension Conditions

You can now restrict block replacements to specific dimensions or dimension sets.

  • Global Dimension Restriction: Set "dimension" or "dimensions" at the root of block_swap.json5 to apply a baseline dimension constraint across all swap rules.
  • Per-Rule Dimension Overrides: Configure individual block or tag swaps using object notation with targeted dimensions:
    json5
     
    {
    "swapper": {
    // Legacy flat mapping (inherits global dimension rules)
    "minecraft:dirt": "minecraft:coarse_dirt",
     
    // Per-swap dimension restriction (single dimension)
    "minecraft:stone": {
    "replaceWith": "minecraft:granite",
    "dimension": "minecraft:the_nether"
    },
     
    // Per-swap dimension restriction (multiple dimensions)
    "minecraft:deepslate": {
    "replaceWith": "minecraft:blackstone",
    "dimensions": ["minecraft:the_nether", "minecraft:the_end"]
    }
    }
    }
  • Thread-Safe Dimension Resolution: DimensionHolder.java maintains context across chunk generation, level ticking, and player placement without thread contention.

2. Live Hot Reload (/blockswap reload)

Update block swap rules on live worlds and active dedicated servers without restarting the game or disconnecting players.

  • Command: /blockswap reload
  • Permission Level: Requires OP level 2 on dedicated servers; accessible to all operators and singleplayer / LAN hosts.
  • Chunk Seam Protection: The reload command reloads placement rules and tag bindings immediately while keeping existing world generation settings intact. This ensures chunk generation borders do not develop unnatural cutoff seams while playing.
  • Multiplayer Synchronization: The server automatically broadcasts the updated configuration to all connected clients using the custom network packet ConfigSyncPayload.java.

3. Native Block Tag Replacement Rules

Swap entire categories of blocks using vanilla and modded block tags.

  • Tag Target Syntax: Use #namespace:tag_id as the source key (for example, "#c:ores": "minecraft:infested_cobblestone" or "#minecraft:planks": "minecraft:crimson_planks").
  • Deterministic Priority: Explicit block mappings always take precedence over tag mappings. If a block matches both a direct block rule and a tag rule, the direct block rule is selected.
  • Dynamic Datapack Rebinding: Tag entries automatically re-evaluate whenever datapacks reload via TagsUpdatedEvent.

4. Natural Generation Only Mode (onlySwapNaturalGeneration)

Separate world generation transformations from player activity.

  • Config Key: "onlySwapNaturalGeneration": true
  • Behavior:
    • When true: Swaps execute exclusively during terrain generation, cave generation, structure layout, and feature placement. Player block placement, pistons, dispensers, falling blocks, and commands remain completely vanilla.
    • When false: Swaps apply universally across both world generation and live in-world block updates.

Enhancements and Metadata Updates

  • Mod Metadata & Credits: Updated neoforge.mods.toml with author BlackBrood0, project home page, and issue tracker links. Original authorship by CorgiTaco is acknowledged in the mod credits under LGPL-3.0.
  • Universal Chunk Interception: Unified chunk section block swapping through MixinChunkAccess.java, properly covering both LevelChunk and ProtoChunk structures.
  • Known States Serialization: Replaced reflective GSON encoding with BlockState.CODEC serialization in StateSwapper.java, eliminating recursive StackOverflowError exceptions during state generation.
  • Release Artifacts: Built and verified release binaries for NeoForge 1.21.1:
    • blockswap-neoforge-1.21.1-2.0.jar
    • blockswap-neoforge-1.21.1-v2.0.jar

This mod has no additional files