Update 2.0 The Folia Update!
- Reworked redstone limiter
- 100% supports folia
- Updated README
- Optimized plugin performance (0.1% thread usage)
- Optimized SQLite Database
A helpful guide for the Redstone Limiter:
<details>
<summary>🔌 Using the Redstone Limiter</summary>
## 🔌 Using the Redstone Limiter
The Redstone Limiter prevents lag caused by excessive redstone activity while allowing normal farms and contraptions to function properly.
### How It Works
The limiter tracks redstone events at two levels:
1. **Per-block tracking** - Monitors individual redstone components
2. **Per-chunk tracking** - Monitors total redstone activity in a chunk
When a block or chunk exceeds its configured threshold within the reset period, the plugin neutralizes the excessive activity to prevent lag.
### Configuration
Enable the redstone limiter in `config.yml`:
```yaml
redstone-limiter:
enabled: true # Set to true to enable
reset-period-ms: 4000 # Reset counters every 4 seconds
blocks:
enabled: true
threshold:
GLOBAL: 6 # Default limit for all redstone blocks
PISTON: 6 # Pistons can activate 6 times per reset period
OBSERVER: 12 # Observers can trigger 12 times per reset period
DISPENSER: 6
REPEATER: 10
HOPPER: 12
chunks:
enabled: true
threshold: 4000 # Maximum total redstone events per chunk
max-piston-push: 12 # Maximum blocks a piston can push at once
```
### Understanding Thresholds
- **reset-period-ms**: How long before counters reset (4000ms = 4 seconds)
- **Block threshold**: Maximum activations per block within the reset period
- **Chunk threshold**: Maximum total redstone events in a chunk within the reset period
- **max-piston-push**: Limits how many blocks a single piston can push (prevents lag from pushing hundreds of blocks)
### What Gets Limited
The redstone limiter monitors these components:
- **Pistons** (PISTON, STICKY_PISTON)
- **Observers** (OBSERVER)
- **Dispensers** (DISPENSER, DROPPER)
- **Repeaters** (REPEATER, COMPARATOR)
- **Hoppers** (HOPPER)
- All other redstone components use the **GLOBAL** threshold
### Example Scenarios
**Normal redstone farm:**
- A typical automatic farm activates pistons 2-3 times per reset period
- Will function normally with default settings
**Lag machine:**
- Rapid clock that activates pistons 50+ times per second
- Gets neutralized when it exceeds the threshold (6 activations per 4 seconds)
- Prevents server lag without affecting legitimate builds
### Tuning Recommendations
**For creative/building servers:**
```yaml
redstone-limiter:
enabled: true
blocks:
threshold:
PISTON: 10 # Allow more complex contraptions
OBSERVER: 20
REPEATER: 15
chunks:
threshold: 8000 # Higher limit for creative builds
```
**For survival servers with farms:**
```yaml
redstone-limiter:
enabled: true
blocks:
threshold:
PISTON: 6 # Standard settings work well
OBSERVER: 12
chunks:
threshold: 4000
```
**For servers with lag issues:**
```yaml
redstone-limiter:
enabled: true
blocks:
threshold:
PISTON: 4 # Stricter limits
OBSERVER: 8
REPEATER: 6
chunks:
threshold: 2000 # Lower chunk threshold
max-piston-push: 8 # Reduce piston push limit
```
### Testing Your Settings
1. Enable the redstone limiter with default settings
2. Monitor server TPS with `/lagg tps`
3. Test your redstone farms to ensure they still work
4. If legitimate farms are getting limited, increase the threshold for specific blocks
5. If you still have lag, decrease thresholds or lower the reset period
### Important Notes
- The limiter is **disabled by default** - you must enable it in config.yml
- Changes require a `/lagg reload` to take effect
- The limiter only neutralizes excessive activity, it doesn't break or remove blocks
- Players won't receive notifications when redstone is limited (happens silently)
</details>
Special Thanks to [R00tB33rMan](https://github.com/R00tB33rMan) for helping make this update possible. If you have any bugs please join the [Discord](https://discord.gg/abdm29q7af) and report them. <3
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }