MiniGame is a Minecraft mod project based on NeoForge. It currently provides two world-rule/minigame-rule features:
SameBlockBreak: after a player or entity breaks a block, matching blocks in range are destroyed in batches.ChunkPlaceBlock: after a player places a block, the same block is placed at the same local chunk position in other chunks, with optional same-position breaking.config files are generated under:
config/minigame/
Current config files:
common.tomlsameblockbreak.tomlchunkplaceblock.tomlcommon.toml:
| Option | Default | Description |
|---|---|---|
debugLogging |
false |
Enables verbose MiniGame debug logs. Keep this disabled during normal gameplay. |
SameBlockBreak creates a batched destruction task after a break event is triggered. Tasks advance over server ticks to avoid scanning or modifying too many blocks in one pass.
Current trigger sources:
Default behavior:
dropRadius; outside that range, blocks are silently removed to avoid excessive item entities.When loadedChunksOnly=true, the immediate task queue only includes chunks that are already loaded when the task starts. Unloaded chunks are cleaned later when they load, based on the records kept by rememberBrokenBlocksForever.
When rememberBrokenBlocksForever=true and matchBlockType=true, the triggered block type is saved as a forbidden block. Later world generation, chunk loading, and normal block placement paths replace those blocks with air; water-related blocks are changed to a dry state when possible.
New chunks do not need to be force-loaded up front. With the default config, remembered blocks are blocked during generation.
sameblockbreak.toml:
| Option | Default | Description |
|---|---|---|
enabled |
true |
Enables SameBlockBreak. |
radius |
3000 |
Processing radius around the trigger position, in blocks. |
matchBlockType |
true |
If true, only the same block type is destroyed; if false, all non-air blocks match. |
dropRadius |
100 |
X/Z radius around the trigger position where natural breaking and drops are used. |
maxNaturalBreakBlocks |
3000 |
Maximum naturally broken blocks per task; 0 disables drops, -1 removes the limit. |
cleanupUnsupportedNeighbors |
true |
Cleans neighboring blocks that can no longer survive after a block is removed. |
rememberBrokenBlocksForever |
true |
Permanently remembers broken block types and prevents them from generating or being placed later. |
allowConcurrentTasks |
true |
Allows multiple destruction tasks in the same dimension. |
chunksPerTick |
200 |
Maximum chunk entries each task attempts per tick. |
maxMsPerTick |
25 |
Maximum main-thread time, in milliseconds, each task may spend per tick. |
blocksPerTick |
30000 |
Maximum block positions each task scans per tick. |
blocksPerChunkStep |
3000 |
Maximum block positions scanned from one chunk before yielding. |
dynamicPriorityScanLimit |
4096 |
Maximum remaining chunk entries re-ranked whenever the task picks the next chunk near players. |
loadedChunksOnly |
true |
Makes immediate tasks scan only loaded chunks. |
allowChunkGeneration |
false |
Allows tasks to synchronously load or generate missing chunks. Not recommended with large radii. |
These commands require game master permission:
/minigame sameblockbreak status
/minigame sameblockbreak cancel
/minigame sameblockbreak cancelall
/minigame sameblockbreak enable
/minigame sameblockbreak disable
ChunkPlaceBlock copies a placed source block to the same local chunk position in other chunks within range.
"Same local chunk position" means:
For example, if a player places a chest at (localX=5, y=64, localZ=8) in one chunk, other target chunks will try to place the same chest at (localX=5, y=64, localZ=8) if that target position is air.
Default behavior:
chunkplaceblock.toml:
| Option | Default | Description |
|---|---|---|
enabled |
true |
Enables ChunkPlaceBlock. |
radius |
3000 |
Processing radius around the trigger position, in blocks. |
syncBlockEntityData |
true |
Copies and syncs block entity data, such as chest contents. |
applyToFutureChunkLoads |
true |
Remembers rules and applies placement/breaking later when chunks load or generate. |
destroySamePositionOnBreak |
false |
When the source block is broken, destroys same-type blocks at the same position in other chunks. This is automatically disabled while SameBlockBreak is enabled. |
placementDelayTicks |
1 |
Ticks to wait after placement before reading the source block and block entity data. |
blockEntitySyncDelayTicks |
1 |
Ticks to delay block entity sync after data changes, debouncing frequent updates. |
allowConcurrentTasks |
true |
Allows multiple placement or sync tasks in the same dimension. |
chunksPerTick |
200 |
Maximum chunk entries each task attempts per tick. |
maxMsPerTick |
20 |
Maximum main-thread time, in milliseconds, each task may spend per tick. |
loadedChunksOnly |
true |
Makes immediate placement/break tasks process only loaded chunks. |
modifyUnloadedChunksImmediately |
false |
Allows immediate tasks to synchronously load saved but unloaded chunks. This can cause stalls with large radii. |
allowChunkGeneration |
false |
Allows synchronous generation of missing chunks. Not recommended with large radii. |
These commands require game master permission:
/minigame chunkplaceblock enable
/minigame chunkplaceblock disable
Both SameBlockBreak and ChunkPlaceBlock can respond to block breaking. To avoid running two batch-breaking systems for the same break event:
SameBlockBreak is enabled, ChunkPlaceBlock automatically sets destroySamePositionOnBreak to false.SameBlockBreak first.Both features can scan or modify many chunks. Larger radii and more concurrent tasks increase main-thread load.
Recommendations:
loadedChunksOnly=true with large radii.allowChunkGeneration=false to avoid synchronously generating many new chunks.modifyUnloadedChunksImmediately=false for ChunkPlaceBlock with large radii.radius, chunksPerTick, blocksPerTick, blocksPerChunkStep, or maxMsPerTick first.dynamicPriorityScanLimit values make SameBlockBreak prioritize chunks near players more accurately, but each chunk selection costs more CPU time.dropRadius or maxNaturalBreakBlocks to reduce item entity spam.debugLogging=false in common.toml during normal gameplay.