Tags
Creators
Details
0.0.1+build.15
Compatibility
Required content
Changes
Chain Mining Reforged Mod&Range Selection System-Update Log
Version:1.21.4
Dependencies:Fabric API,Cloth Config
1.Chain Mining Reforged Mod Update Log
1.1 Feature Overview
• Provides the/redstonecommand to adjust redstone signal transmission distance.
• Supports setting the current transmission distance,increasing or decreasing it,and adjusting the maximum allowed distance.
• Configuration file located at./config/redstone_config.jsonwith default maximum distance of 32 and current distance of 15.
1.2 Command Syntax
• Base Command:/redstone <subcommand> [arguments]
• Subcommands:
• set <value>:Sets the current transmission distance.Permission level:2(OP).
• add <value>:Increases the current transmission distance.Permission level:2(OP).
• remove current <value>:Decreases the current transmission distance.Permission level:2(OP).
• remove max <value>:Decreases the maximum allowed transmission distance.Permission level:2(OP).
1.3 Parameter Details
• <value>:Integer,range1 ≤ value ≤ max,represents the transmission distance value.
• current:String,literal"current",targets the active redstone distance.
• max:String,literal"max",targets the configurable maximum limit.
1.4 Usage Examples
1.4.1 Basic Adjustment
# Set transmission distance to 24 blocks
/redstone set 24
# Increase current distance by 5 (capped at max)
/redstone add 5
# Decrease current distance by 3 (minimum 1)
/redstone remove current 3
1.4.2 Maximum Limit Control
# Reduce maximum allowed distance by 10
/redstone remove max 10
# Then attempt to set a higher value (will auto-cap)
/redstone set 30 # If max=25, will set to 25
1.4.3 Safety Checks
# These will fail gracefully:
/redstone set 0 → "Value must be at least 1"
/redstone remove max 999 → "Cannot reduce below 1"
1.5 Real-Time Behavior
• Changes take effectimmediatelyin loaded chunks.
• Current value automatically adjusts if the maximum is reduced below it.
• Server restart required for configuration file changes to take effect.
1.6 Common Issues Q:Why can't I set values above 32?
A:ModifymaxPowerDistancein the configuration file or use/redstone remove maxfirst.
Q:Do I need OP to use these commands?
A:Yes,requires permission level 2(typically server operators).
1.7 Technical Notes
• Uses Mixin to overrideAbstractRedstoneBlock.getReceivedRedstonePower().
• All values are automatically saved via Cloth Config.
• Safe value clamping occurs on all operations.
2.Range Selection System Update Log
2.1 System Overview The Range Selection System provides WorldEdit-like functionality in Fabric 1.21.4+,enabling precise block manipulation through defined cubic regions.Key features include:
• Visual selection rendering with colored outlines.
• Two-point selection method(similar to WorldEdit's wooden axe).
• Asynchronous processing for large selections(up to 100,000 blocks).
• Redstone testing and command execution within selections.
2.2 Core Components
2.2.1 Selection Area Class
public class SelectionArea implements Iterable<BlockPos> {
private final BlockPos minPos, maxPos;
private final int volume;
// Constructs a validated selection
public SelectionArea(BlockPos pos1, BlockPos pos2) { ... }
// Iteration implementations
public Iterator<BlockPos> iterator() { ... }
public void forEachBlock(World world, Consumer<BlockPos> action) { ... }
public Stream<BlockPos> stream() { ... }
}
2.2.2 Client-Side Rendering
@Environment(EnvType.CLIENT)
public class SelectionRenderer {
private static final int OUTLINE_COLOR = 0xFF0000; // Red
public static void register() {
WorldRenderEvents.END.register(ctx -> {
// Renders edge particles
});
}
}
2.3 Command Specifications
2.3.1//setCommand
Syntax:
//set <block>
Parameters:
|Parameter|Type|Description|
|-----------|------|-------------|
|<block>|BlockState|Any valid block state ID|
Functionality:
• Replaces all blocks in the selection with the specified block.
• Processes asynchronously for selections>10k blocks.
• Returns the count of changed blocks.
Example:
//set minecraft:stone
//set minecraft:oak_planks[axis=x]
2.3.2//testCommand
Syntax:
//test <target> [run <command>]
Parameters:
|Parameter|Type|Description|
|-----------|------|-------------|
|<target>|BlockState|Filter for blocks to test|
|run|Literal|Optional execution flag|
|<command>|String|Command to execute on matching blocks|
Functionality:
• Withoutrun:Tests redstone power on target blocks.
• Withrun:Executes a command on each target block.
• Highlights the selection boundary during operation.
Examples:
//test minecraft:redstone_wire // Tests redstone levels
//test minecraft:lever run set air // Breaks all levers
//test #buttons run tp @s ~ ~1 ~ // Teleports above buttons
2.4 Changelog
[0.0.1+build.15]-2025-03-31
Added
• //testcommand now supports:
• Block state filtering(e.g.,minecraft:furnace[facing=north]).
• Tag targeting(e.g.,#stairs).
• Selection persistence across relogs(stored in player NBT).
Changed
• Improved async processing:
• Chunk-based task scheduling.
• Progress reporting every 5 seconds.
• Particle rendering:
• Now uses a custom shader for better visibility.
• Configurable via/selectionmod config.
Fixed
• Memory leak in large selection iteration.
• Concurrent modification during async operations.
• Edge case in redstone power calculation.
2.5 Performance Characteristics
Operation Time Complexity Notes
Selection Creation O(1) Immediate validation
Block Iteration O(n) 100μs per block (avg)
//set Execution O(n) Async beyond 10k blocks
Rendering O(edges) Only renders visible edges
2.6 Best Practices
- For large selections(>50k blocks):
• Use//setduring off-peak hours.
• Consider chunk-aligned selections for best performance.
- Redstone testing:
// Optimal for mass testing
//test #redstone_components run data get block ~ ~ ~ power
- Debugging:
/debug start cmr-mod
/debug report cmr-mod --bounds
2.7 Limitations
• Maximum selection size:100,000 blocks.
• Cross-dimension selections are not supported.
• No undo/redo functionality(planned for v1.3).
Optional dependencies
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:TvEEJARF:cjinWx1f"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:TvEEJARF:cjinWx1f"
}

