No Slime Superflat
No Slime Superflat is a lightweight utility mod designed to stop slimes from spawning in Superflat worlds. It provides a standalone solution without requiring external APIs or dependencies.
Overview
This mod was created to provide a simple and clean way to manage slime spawning. It focuses on being as lightweight as possible, running its logic only when necessary and keeping a minimal memory footprint.
Features
- Runtime Toggle: You can enable or disable the slime prevention in-game without having to restart Minecraft.
- Standalone: The mod works by itself and does not require any additional library mods or APIs.
- Lightweight Design: Built to have a minimal impact on game resources.
- Statistics System: Includes an in-game command to track how many slimes have been blocked during your session.
- World Specific: The mod is designed to detect and act specifically in Superflat world types.
Technical Details
Performance Design
- World Type Caching: To save resources, the mod uses a 5-second cache for world-type checks instead of querying the world every time a spawn occurs.
- Thread-Safety: Uses
AtomicLongfor statistics tracking to ensure data consistency during spawn events. - Conditional Logic: The mod performs checks in a specific order to stop execution as early as possible if the conditions for blocking a spawn are not met.
Commands
/noslimesuperflat stats: Shows the total number of blocked slimes and spawn checks performed./noslimesuperflat reload: Reloads the configuration file manually.
Configuration
The mod can be configured via the in-game menu (Mods -> No Slime Superflat -> Config) or by editing the config/noslimesuperflat.cfg file:
- General: Enable/Disable the mod and toggle debug logging.
- Performance: Manage optimized spawn checking and world-type caching settings.
Installation
- Ensure you are using Minecraft 1.12.2 with Forge 14.23.5.2847 or higher.
- Download the latest
.jarfile. - Place the file in your
modsfolder. - Launch the game and enjoy a slime-free Superflat experience.
Compatibility
- Designed to work with most mods that do not drastically overhaul the Minecraft spawning engine.
- Compatible with both Client and Server environments.
Known Issues
- The in-game configuration may require a world restart to apply certain changes in some environments. I am working on a fix for the next update.
Support and Issues
If you encounter any bugs or have suggestions, please report them on the GitHub Issue Tracker.