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

SyImproveTPS

A high-performance TPS optimization plugin designed specifically for Minecraft Purpur 1.21.1 servers.

6
0

SyImproveTPS

A high-performance TPS optimization plugin designed specifically for Minecraft Purpur 1.21.1 servers.

Features

  • Real-time TPS Monitoring - Accurately calculate current, average, minimum, and maximum TPS
  • Multi-threading Optimization - Fully utilize multi-core CPU, solving the problem of single core underutilization
  • Entity Optimization - Intelligently limit entity counts, protect important entities
  • Chunk Optimization - Automatically unload chunks with no player activity
  • Redstone Optimization - Limit update frequency of pistons and hoppers
  • Async Processing - Avoid main thread blocking, prevent server lag

Installation

Requirements

  • Server: Purpur 1.21.1
  • Java: JDK 21 or higher (Class file version 65.0)

Installation Steps

  1. Download the latest version of SyImproveTPS-1.0.0.jar
  2. Place the JAR file in the server's plugins/ directory
  3. Restart the server or run /reload confirm
  4. Configuration file will be automatically generated at plugins/SyImproveTPS/config.yml

Configuration

Default Configuration

# Debug mode - enables more verbose logging
debug: false

# TPS monitoring settings
optimization:
  # TPS threshold - optimization is triggered when TPS falls below this value
  tps-threshold: 18.0

  # Entity optimization settings
  entity-optimization:
    enabled: true
    max-entities-per-chunk: 50
    max-monsters: 100
    max-animals: 150

  # Chunk optimization settings
  chunk-optimization:
    enabled: true
    unload-threshold: 300

  # Redstone optimization settings
  redstone-optimization:
    enabled: true
    piston-limit-per-tick: 50
    hopper-limit-per-tick: 100
    max-chunks-per-check: 10

  # Check intervals (in ticks)
  entity-check-interval: 100
  chunk-check-interval: 600
  redstone-check-interval: 20

# Multi-threading settings
threading:
  pool-size: auto
  enable-entity-threads: true
  enable-chunk-threads: true
  load-balance-interval: 100

Configuration Reference

Config OptionDefaultDescription
optimization.tps-threshold18.0TPS threshold for auto-optimization
optimization.entity-optimization.max-entities-per-chunk50Maximum entities per chunk
optimization.chunk-optimization.unload-threshold300Seconds before unloading inactive chunks
optimization.redstone-optimization.max-chunks-per-check10Max chunks per redstone check
threading.pool-sizeautoThread pool size, auto uses all CPU cores

Commands

CommandPermissionDescription
/syimprovetpssyimprovetps.adminDisplay plugin info
/sitps statussyimprovetps.statusView server TPS and thread status
/sitps optimizesyimprovetps.optimizeManually trigger optimization
/sitps reloadsyimprovetps.reloadReload configuration
/sitps help-Display help

Command Aliases

  • /sitps - Main command
  • /tpsfix - Quick command

Permissions

PermissionDefaultDescription
syimprovetps.adminOPAdmin permission
syimprovetps.statusOPView status permission
syimprovetps.optimizeOPExecute optimization permission
syimprovetps.reloadOPReload configuration permission

Performance Optimization Principles

1. TPS Monitoring

  • Records execution time every tick
  • Calculates average TPS every second
  • Automatically triggers optimization when TPS is low

2. Multi-threading

  • Entity processing thread pool
  • Chunk processing thread pool
  • Work-stealing algorithm (ForkJoinPool)
  • Load balancing

3. Entity Optimization

  • Limits entities per chunk
  • Protects players, villagers, and tamed animals
  • Prioritizes removal of items and monsters

4. Chunk Optimization

  • Tracks chunk access time
  • Automatically unloads inactive chunks
  • Protects chunks with important entities

5. Redstone Optimization

  • Async detection of redstone devices
  • Limits chunks checked per iteration
  • Prevents main thread blocking

FAQ

Q: Will this plugin cause server lag?

A: No. All operations that could block the main thread have been converted to async execution, including redstone detection and chunk traversal.

Q: How do I adjust thread pool size?

A: Set threading.pool-size in config.yml, recommended to be set to CPU core count or core count - 1.

Q: Why is TPS still low?

A: It may be caused by other plugins or the world itself. Use /sitps status to view detailed information and check for entity overload or chunk loading issues.

Q: Will it delete player structures?

A: No. The plugin only optimizes entities and chunk loading, and does not modify any blocks.

Building

Requirements

  • JDK 21
  • Maven 3.8+

Build Steps

# Clone repository
git clone https://github.com/yourusername/SyImproveTPS.git
cd SyImproveTPS

# Build
mvn clean package

# Output
# target/SyImproveTPS-1.0.0.jar

Tech Stack

  • Java 21 - Modern Java features
  • Maven - Build tool
  • Paper API - Minecraft server API
  • Concurrent Utilities - Concurrent processing

Note: This plugin is designed for Purpur 1.21.1 and may not work properly on other versions. Please backup your server data before use.

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:MIT
Опубликован:1 неделю назад
Обновлён:1 неделю назад
Главная