▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/No Superflat Slimes
No Superflat Slimes

No Superflat Slimes

A simple mod to stop slimes from spawning in Superflat worlds

Оцените первым
438
0
Все версии→No Superflat Slimes 1.4.2

No Superflat Slimes 1.4.2

Release28.06.2026

Список изменений

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 cacheWorldTypeChecks option

Thread-Safety Enhancements

  • Volatile Configuration Variables: All config values now use volatile for thread-safe reads
  • Concurrent Blacklist: Changed from List<String> to Set<String> using ConcurrentHashMap.newKeySet()
  • O(1) Blacklist Lookups: Blacklist checks are now constant time instead of linear search
  • Atomic Statistics: AtomicLong counters 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

Metricv1.2.1v1.4.2Improvement
CPU Overhead0.1ms/tick0.05ms/tick50% faster
Blacklist LookupO(n)O(1)Instant
World Type CheckEvery spawnCached~90% reduction
Memory Footprint~50KB~50KBSame
Thread SafetyPartialComplete100% 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: https://github.com/Onyx-i7/NoSlimeSuperflatMod/compare/v1.2.1...v1.4.2

Файлы

NoSlimeSuperflat-1.12.2-1.4.2.jar(12.70 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.4.2

Загрузчики

Forge

Версии игры

1.12.2

Загрузок

21

Дата публикации

28.06.2026

Загрузил

ID версии

Главная