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

Limited Spectator

A lightweight NeoForge mod that introduces a restricted spectator mode for Minecraft players (fully customizable).

Оцените первым
983
2
Все версииLimited Spectator -NeoForge-1.21.x-2.0.0

Limited Spectator -NeoForge-1.21.x-2.0.0

Release23.01.2026

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

[2.0.0] - 2026-01-18

🚀 Multi-Loader Architecture Release

Major architectural overhaul introducing support for NeoForge, Fabric, and Quilt mod loaders with shared core logic.

Added

  • Multi-Loader Support - Three separate builds for different mod loaders:
    • LimitedSpectator-neoforge-2.0.0.jar (171 KB) - Full configuration support
    • LimitedSpectator-fabric-2.0.0.jar (156 KB) - Hardcoded defaults
    • LimitedSpectator-quilt-2.0.0.jar (158 KB) - Uses Fabric API compatibility
  • Core Abstraction Layer:
    • SpectatorConfig interface - Loader-agnostic configuration contract
    • SpectatorManager class - Shared business logic (100% code reuse)
    • SpectatorState record - Immutable state representation
    • DistanceValidationResult record - Type-safe validation results
  • Loader-Specific Adapters:
    • NeoForgeSpectatorConfig - Adapts NeoForge config to interface
    • FabricSpectatorConfig - Hardcoded defaults for Fabric
    • QuiltSpectatorConfig - Delegates to Fabric config (composition pattern)
  • Fabric Implementation:
    • LimitedSpectatorFabric - Fabric entry point with Fabric API integration
    • Command registration via CommandRegistrationCallback.EVENT
    • Event handlers via ServerTickEvents and ServerPlayConnectionEvents
  • Quilt Implementation:
    • LimitedSpectatorQuilt - Quilt entry point (100% Fabric API compatible)
    • Uses Fabric API for all events and commands
    • Demonstrates perfect Fabric-Quilt compatibility
  • Build System:
    • Separate Gradle build files per loader (build.gradle, build-fabric.gradle, build-quilt.gradle)
    • Source exclusions to prevent cross-loader compilation errors
    • Java 21 toolchain configuration

Changed

  • Architecture: Refactored from monolithic NeoForge-only to multi-loader with shared core
  • Code Organization:
    • Core logic moved to loader-agnostic classes
    • Loader-specific code isolated in separate packages
    • Zero code duplication (>95% shared code)
  • Logging: Replaced System.out.println with SLF4J Logger in Fabric/Quilt implementations
  • Build Process:
    • NeoForge build excludes Fabric/Quilt sources
    • Fabric build excludes NeoForge/Quilt sources
    • Quilt build excludes NeoForge/Fabric entry points

Technical

  • Thread-Safe State Management: SpectatorManager uses ConcurrentHashMap for multiplayer safety
  • Type-Safe Validation: Enum-based validation results prevent null pointer exceptions
  • Backward Compatibility: Legacy HashMaps maintained with @Deprecated annotation
  • Dual-Write Strategy: Ensures external mods/mixins continue working
  • Clean Separation: Zero loader dependencies in core business logic

Performance

  • Shared SpectatorManager instance across all loaders
  • Singleton pattern for config adapters
  • Lazy configuration evaluation
  • Minimal per-tick overhead (~0.01ms per spectator)

Documentation

  • Updated README.md with multi-loader installation instructions
  • Added loader comparison table
  • Documented build commands for each loader

Migration Notes

  • NeoForge users: No changes required - fully backward compatible with v1.x
  • Fabric/Quilt users: New! Download the appropriate JAR for your loader
  • Configuration: Only NeoForge version supports TOML config (Fabric/Quilt use hardcoded defaults)

Known Limitations

  • Quilt version requires Fabric API (QSL support planned)

Файлы

LimitedSpectator-neoforge-2.0.0.jar(173.95 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.21.x-2.0.0

Загрузчики

NeoForge

Версии игры

1.21.1–1.21.11

Загрузок

153

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

23.01.2026

Загрузил

ID версии

Главная