Releases: Onyx-i7/NoSlimeSuperflatMod
Release list
v1.4.2
1.4.2 - Performance Update & Build System Migration
This release focuses on significant performance optimizations, thread-safety improvements, and migrating to a modern build system (RetroFuturaGradle 2.0.2) for better stability and faster builds
New Features
Spawn Control Options
- Block Magma Cubes: New option to also block magma cubes in Superflat worlds
- Underground-Only Blocking: Option to block slimes only when spawning below a configurable Y level
- Configurable Y Level: Set the maximum Y level for slime blocking (default: Y=40)
- Surface Spawn Allowance: Option to allow slimes to spawn on the surface (Y > 60) in Superflat worlds
Enhanced Command System
- Improved Statistics Display: Now shows all current configuration options
- Better Formatting: Color-coded output for improved readability
- Detailed Configuration Info: Shows spawn control settings, blacklist size, and debug status
Performance Optimizations
Early-Exit Pattern Improvements
- World Type Check First: Now checks if world is Superflat BEFORE processing entity type (cheaper operation)
- Reduced CPU Overhead: Processing time reduced to <0.05ms per tick (down from <0.1ms)
- Eliminated Costly Operations: Removed
getEntitiesWithinAABB()call that caused lag spikes
World Type Caching
- Dimension-Based Cache: Caches world type checks per dimension using
ConcurrentHashMap - Automatic Cache Clearing: Cache is cleared when configuration is reloaded
- Configurable: Can be disabled via
cacheWorldTypeChecksoption
Thread-Safety Enhancements
- Volatile Configuration Variables: All config values now use
volatilefor thread-safe reads - Concurrent Blacklist: Changed from
List<String>toSet<String>usingConcurrentHashMap.newKeySet() - O(1) Blacklist Lookups: Blacklist checks are now constant time instead of linear search
- Atomic Statistics:
AtomicLongcounters remain thread-safe for concurrent access
Technical Changes
Build System Migration
- Migrated to RetroFuturaGradle 2.0.2: Replaced ForgeGradle with GTNewHorizons' improved fork
- Gradle 9 Syntax: Updated to modern Gradle syntax (
tasks.named(),tasks.register()) - Java 8 Toolchain: Explicit Java 8 toolchain configuration
- Improved Build Verification: Enhanced build verification task with detailed output
- Access Transformer Support: Proper AT configuration for RFG
Code Improvements
- Separated Spawn Logic: Extracted
shouldBlockSlimeSpawn()method for cleaner code - Better Null Handling: Added comprehensive null checks throughout event handler
- Improved Debug Logging: Now includes spawn coordinates in debug messages
- Case-Insensitive Blacklist: Automatic lowercase conversion for all entity names
Configuration Categories
- Reorganized Config: Split into logical categories (General, Spawn Control, Entities)
- Better Documentation: Enhanced configuration comments and descriptions
- Runtime Reload: Configuration can be reloaded without restarting the game
Bug Fixes
- Fixed Potential Race Conditions: Thread-safe configuration updates prevent crashes during reload
- Fixed Memory Leaks: Eliminated object accumulation in event handlers
- Fixed Null Pointer Exceptions: Added defensive null checks for world and entity objects
- Fixed Blacklist Case Sensitivity: Entity names are now properly normalized
- Fixed Configuration Reload: World cache is now properly cleared on reload
Performance Comparison
| Metric | v1.2.1 | v1.4.2 | Improvement |
|---|---|---|---|
| CPU Overhead | <0.1ms/tick | <0.05ms/tick | 50% faster |
| Blacklist Lookup | O(n) | O(1) | Instant |
| World Type Check | Every spawn | Cached | ~90% reduction |
| Memory Footprint | ~50KB | ~50KB | Same |
| Thread Safety | Partial | Complete | 100% safe |
Configuration Options
General Settings
enableSlimePrevention- Enable/disable slime blocking (default: true)enableDebugLogging- Enable debug logging (default: false)blockMagmaCubes- Also block magma cubes (default: true)cacheWorldTypeChecks- Cache world type per dimension (default: true)
Spawn Control
blockOnlyUnderground- Only block slimes below Y level (default: false)maxYForSpawn- Maximum Y level for blocking (default: 40)allowSurfaceSpawns- Allow slimes on surface Y>60 (default: false)
Entities
entityBlacklist- List of entities to block (default: minecraft:magma_cube)
Important Notes
NOTE: The versions 1.12.2, 1.16.5, and 1.21.1 will receive limited updates due to time constraints. Future updates may include additional optimizations or compatibility improvements.
Full Changelog: v1.2.1...v1.4.2
v1.4.1
1.4.1 - Updated to Fabric 26.2
This update brings the mod to a more modern version (Fabric 26.2) and includes significant changes as almost all the logic code of the mod had to be rewritten
Technical Changes
Build System:
- Updated to Minecraft 26.2 (latest stable release)
- Upgraded Java requirement from 21 to 25
- Updated Fabric Loader to 0.19.3
- Updated Fabric API to latest compatible version
- Migrated to Fabric Loom 1.17
- Updated Gradle wrapper to 9.6.0
- Removed mappings configuration (MC 26.2 is unobfuscated)
- Implemented
splitEnvironmentSourceSets()for better client/server separation
Code Changes:
- Updated Slime entity import to new package structure (
net.minecraft.world.entity.monster.cubemob.Slime) - Replaced
FlatLevelSourcedetection withisFlatWorld()API - Simplified world type detection logic
- Removed unnecessary persistence checks
- Optimized entity spawn event handling
Compatibility:
- Full compatibility with Minecraft 26.2
- Compatible with Fabric Loader 0.19.3+
- Requires Java 25 or higher
- No longer requires Yarn or Mojang mappings
Bug Fixes
- Fixed entity detection for new MC 26.2 package structure
- Resolved build configuration issues with unobfuscated Minecraft
- Fixed world type detection for superflat worlds
Requirements
- Minecraft: 26.2
- Fabric Loader: 0.19.3 or higher
- Java: 25 or higher
- Fabric API: Latest version for MC 26.2
NOTE: The versions 1.12.2, 1.16.5, and 1.21.1 I will stop updating due to lack of time, maybe I will update it again, for example, 1.21.1 could work in any version of 1.21 and I could add one or another optimization
Full Changelog: v1.4.0...v1.4.1
v1.4
v1.4 - Updated to 1.21.1
Changes
- The commands were removed to keep the mod updated to the new versions and because they were a bit unnecessary
- Gradle updated to 8.8
- ForgeGradle in
build.gradleremoved for obvious reasons - Updated to Fabric Loader 1.21.1
The issue with loading the mod in version 1.16.5 does not occur in this version and there are no present errors
Known bugs
None are free from them.
Code
The source code of the mod may be poorly optimized.
v1.3.0
v1.3.0 - Version update of Minecraft from 1.12.2 to 1.16.5
Changes
- The configuration was removed because it's the first time I've programd in versions higher than 1.13 and for now, I had to delete it
- The mod was updated to version 1.16.5, leaving version 1.12.2 without any feature updates
- The source code files, including the configuration, had to be deleted
- Gradle updated to version 7.5.1
- ForgeGradle updated to version 5.1
Known issues
When entering the game, you will see this notice:
But it's nothing serious, the mod will still work.
v1.2.1
No Slime Superflat Version 1.2.1 Improvements
Changes Made to the Mod
This new version of No Slime Superflat has some improvements. The configuration system is better now. It also has performance optimizations to stop memory leaks.. It has new features to make the user experience better. All of this is done without using APIs like Collective.
Main Features of the Mod
1. Configuration Changes in Time
The mod now lets you change the configuration in real time. You do not need to restart Minecraft to see the changes. Here is how it works:
- The mod can automatically detect changes you make to the settings from the GUI
- It has a ConfigChangedEvent to listen for changes and apply the configuration
- You can also manually reload the configuration using the
reloadConfig()method - There is a command to reload the configuration in the game. You can use
/noslimesuperflat reloadto do this
2. Statistics and Command System
In-Game Command
There is a command /noslimesuperflat with subcommands:
- You can use
/noslimesuperflator/noslimesuperflat statsto see the statistics. - You can use
/noslimesuperflat reloadto reload the configuration without restarting the game.
Statistics Tracking
The mod tracks statistics in time. It keeps track of:
- The total number of slimes blocked.
- The number of checks performed.
- The efficiency percentage calculation.
API Access
There are methods to access the statistics programmatically:
EventHandler.getSlimesBlocked()EventHandler.getSpawnChecksPerformed()EventHandler.resetStatistics()
3. Performance Optimizations
World Type Check Cache
Before the mod checked if the world was Superflat every time a slime spawned. This was a problem. Now the mod uses a cache with a 5-second expiration. This reduces the number of getTerrainType() calls and it is memory-safe
Thread-Safe Statistics
The mod uses AtomicLong counters for thread-safe operations. This means there is no synchronization which improves performance. It also prevents memory leaks because atomic operations do not create lock objects
Performance Configurations
There are options in the "performance" category:
- Optimized Spawn Checking is enabled by default. It uses optimized algorithms for spawn verification. Reduces memory usage
- Cache World Type Checks is also enabled by default. It caches world type verifications. Has automatic expiration to prevent stale data
4. Memory Leak Prevention
The mod has implemented measures to prevent memory leaks:
- Private and thread-safe configuration. The configuration is private and thread-safe to prevent direct access
- Time-expiring cache. The cache automatically invalidates after 5 seconds to prevent data from accumulating
- Explicit cache clearing. The
clearCache()method is called when the configuration changes to prevent accumulation of state - No heavy dependencies. The mod does not use APIs like Collective that can cause memory leaks
- Efficient logger. The logger is conditional. Prevents string accumulation in memory when debug is disabled
- Atomic statistics counters. The mod uses AtomicLong for lock-free counting, which is GC-friendly
5. New Configuration Structure
The mod has a configuration structure:
Category: General
enableDebugLogging: This enables logs for troubleshooting
Category: Performance
useOptimizedSpawnChecking: This uses an optimized spawn checking algorithmcacheWorldTypeChecks: This caches world type checks
Technical Changes Made
NoSlimeSuperflat.java
- Added a listener for reload
- Implemented a method to check if the world is Superflat with an optimized cache
- Added thread-safe synchronization
- Added a method to access the configuration safely
- Updated the version to 1.2.1
- Improved initialization logging
EventHandler.java
- Now uses the
NoSlimeSuperflat.isSuperflatWorld()method of direct verification - Improved logging with string formatting
- Removed direct dependency on
WorldType.FLAT - Added statistics tracking with
AtomicLong - Implemented the
/noslimesuperflatcommand system - Added a handler for command registration
- Added public API methods for statistics access
ConfigGui.java
- Adds both categories ( performance) to the GUI
- Overridden the
onGuiClosed()method to reload the configuration on close - Better visual organization of options
ConfigGuiFactory.java
- Improved documentation about runtime support
- Indicates all categories support real-time changes
Comparison to the Superflat World No Slimes
| Feature | Original | This Version |
|---|---|---|
| Required API | Collective | None |
| Memory Leaks | Reported in 1.12.2 | Actively prevented |
| Runtime Config | No | Yes |
| Check Cache | No | Yes (5s) |
| Thread Safety | Unknown | Implemented |
| Config Categories | 1 | 2 (General + Performance) |
| Statistics | No | Yes (with command) |
| Optimizations | Basic | Multi-layer |
| Command Interface | No | Yes |
| Atomic Operations | No | Yes |
How to Use the Mod
For Players
- Install the mod normally
- Access the configuration via Mods > No Slime Superflat > Config
- Adjust the options as needed
- Changes apply immediately upon saving
- Use
/noslimesuperflatto verify the mod is working
For Debugging
- Enable
Enable Debug Loggingin the configuration - Check the logs for:
- When the configuration reloads
- When the cache updates
- Blocked slime spawns
- Use
/noslimesuperflat statsfor real-time statistics
For Developers
- Access statistics via
EventHandler.getSlimesBlocked() - Reset statistics with
EventHandler.resetStatistics() - All configuration is thread-safe. Can be accessed from any thread
Performance of the Mod
- Memory Usage: Less than 1MB additional (only temporary cache + atomic counters)
- TPS Impact: small (< 0.01ms per tick)
- Thread Safety: All configuration operations are synchronized
- GC-Friendly: Minimal objects created cache reuses variables
- Atomic Counters: Lock-free statistics tracking
Compatibility of the Mod
- Minecraft 1.12.2
- Forge 14.23.5.2847 or higher
- Compatible, with mods that modify spawns
- Works on both client and server
Developed by: Onyx_i7
License: MIT
Inspired by: Serilum Superflat World No Slimes
Release v1.2.0
This is an update for the mod. It makes the mod work well with new Java environments. It also gives you a lot of options to make the mod run faster.
Key Features
-
Universal Entity Blacklist: You can now stop entities from spawning in Superflat worlds. For example you can stop Magma Cubes or modded slimes from showing up.
-
Performance Optimization Suite: This is a set of options to help your game run smoother. It includes things like:
-
maxSlimesPerChunk: This sets a limit on how many slimes can be in one area. -
slimeDespawnDistance: This makes entities disappear when they are far away from players. -
reduceSlimeAI: This slows down the AI for entities that're far away from players. -
slimeUpdateFrequency: This lets you control how often the AI updates, which can help save CPU power.
Critical. Compatibility
-
Entity Identification Fix: We fixed a problem that was causing entity detection to not work in Minecraft 1.12.2. Now it works perfectly.
-
Java 8. 21+ Readiness: We fixed some issues that were causing problems with Java 8. We also got rid of some code that was not needed anymore. This makes the mod work with new Java versions.
-
JEP 367 Compliance: We removed some references that were causing problems. Now the mod can. Run smoothly on new Java versions.
-
Memory Safety: We made sure that the mod does not use much memory when you are switching between different worlds.
-
Config Persistence: We fixed a problem that was causing the mod to not save your settings away. Now it saves them instantly.
Technical Optimizations
-
Early-Exit Logic: The mod now stops doing things that it does not need to do. This helps save CPU power when you are not using features.
-
Efficient List Processing: We made it faster for the mod to look up entities in the blacklist.
-
Code Cleanup: We got rid of some code that was not needed anymore. This makes the mod smaller and more efficient.
Documentation
- We updated the
README.mdandPORTING_GUIDE.mdfiles with information about the performance settings and entity registration.
Note:
Any versions of the mod that have the word "Dev" in them are just for me to test and develop. These versions might have errors or unstable features. I do not recommend using them for your modpacks or servers. You should always use the releases for a stable experience.
Note on Localization:
For the Dev versions I write the documentation and comments in Spanish. This helps me understand the logic better while I am coding and debugging the mod. The mod itself is still in English. The comments and documentation might be in Spanish, for the development versions.
v1.1.3 - Core Stability & Logic Overhaul
Release v1.1.3 - The Core Stability & Logic Overhaul
This release focuses on hardening the mod's architecture, fixing critical configuration persistence issues, and introducing high-efficiency performance controls.
Changelog
- Fixed Configuration Persistence: Resolved critical missing method references (
getConfig,reloadConfig) inConfigGui.javaby implementing direct static access to the configuration instance. - Restored Performance Category: Re-introduced specialized tools for entity management:
maxSlimesPerChunk: Implements a hard cap on slime density per chunk to prevent TPS drops.slimeDespawnDistance: Optimized instant-despawn range to reduce rendering overhead.reduceSlimeAI: Optional AI throttling for entities outside the player's immediate radius.slimeUpdateFrequency: Customizable tick intervals for AI updates, reducing CPU strain.
- Real-time Config Synchronization: Implemented
syncConfig()within the GUI handler. Changes now apply instantly upon closing the menu, eliminating the need for a game restart. - Early-Exit Optimization: Refactored the
EventHandlerlogic to ensure the mod consumes zero CPU cycles when disabled. - Memory Safety Measures: Eliminated static references to
WorldorEntityobjects beyond event scope to prevent memory leaks in long-play sessions. - Code Quality: Comprehensive English documentation added to source files for improved maintainability.
Roadmap: The Path to v1.2.0 (Modern Java Compatibility)
The upcoming v1.2.0 will be a major structural update focused on modernization and feature expansion. Please note that this version may take longer to release due to significant backend changes:
- Java Modernization (JEP 367): We are removing Pack200 compression support. Since Pack200 was deprecated in Java 11 and removed in Java 14, this change ensures the mod remains compatible with modern Java runtimes. We will be transitioning to jlink for optimized distribution.
- Entity Filtering (Blacklist): Introduction of a customizable blacklist. You will be able to block other Mob IDs (e.g., Magma Cubes or modded Slimes) using the same optimized logic.
- Advanced Error Prevention: Further hardening of the codebase to prevent conflicts with complex dimension-adding mods.
1.1.2 - Bugfixes and performance improvements
Changes & Improvements
- Code Refactoring & Cleanup: Performed a major overhaul of the codebase, removing obsolete classes and deprecated methods to improve overall maintainability.
- Performance Optimizations: Refined internal logic to reduce overhead during gameplay.
- Slime Check Optimization: Streamlined the verification logic for slimes, reducing unnecessary processing while maintaining behavior similar to previous versions.
Bug Fixes
- Fixed
mcmod.infoissue: Resolved a bug that prevented the mod's information (description, version, authors, etc.) from displaying correctly in the Forge mods menu. - Restored In-Game Config Access: Thanks to the code cleanup, the Config button in the Forge menu is now functional again.
- Note: I'm aware that some settings currently require a game restart to apply. I'm working on implementing a proper live refresh for the next update.
1.1.1 - Bugfixes
Bug Fixes
- Fixed
mcmod.infoissue: Resolved a bug that prevented the mod's information (description, version, authors, etc.) from displaying correctly in the Forge mods menu