blockswap-neoforge-1.21.1-v2.0.jar
Curse Maven Snippet
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 ofblock_swap.json5to 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.javamaintains 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_idas 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.
- When
Enhancements and Metadata Updates
- Mod Metadata & Credits: Updated
neoforge.mods.tomlwith authorBlackBrood0, project home page, and issue tracker links. Original authorship byCorgiTacois acknowledged in the mod credits under LGPL-3.0. - Universal Chunk Interception: Unified chunk section block swapping through
MixinChunkAccess.java, properly covering bothLevelChunkandProtoChunkstructures. - Known States Serialization: Replaced reflective GSON encoding with
BlockState.CODECserialization inStateSwapper.java, eliminating recursiveStackOverflowErrorexceptions during state generation. - Release Artifacts: Built and verified release binaries for NeoForge 1.21.1:
blockswap-neoforge-1.21.1-2.0.jarblockswap-neoforge-1.21.1-v2.0.jar
This mod has no additional files

