mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 18:47:40 +01:00
Configurable Hanging Tick
By: drXor <mcyoung@mit.edu>
This commit is contained in:
parent
d7f3ba3df3
commit
5ec1e1bc24
2 changed files with 12 additions and 2 deletions
paper-server
patches/sources/net/minecraft/world/entity/decoration
src/main/java/org/spigotmc
|
@ -30,8 +30,12 @@
|
|||
|
||||
public abstract class BlockAttachedEntity extends Entity {
|
||||
|
||||
@@ -44,7 +52,25 @@
|
||||
if (this.checkInterval++ == 100) {
|
||||
@@ -41,10 +49,28 @@
|
||||
|
||||
if (world instanceof ServerLevel worldserver) {
|
||||
this.checkBelowWorld();
|
||||
- if (this.checkInterval++ == 100) {
|
||||
+ if (this.checkInterval++ == this.level().spigotConfig.hangingTickFrequency) { // Spigot
|
||||
this.checkInterval = 0;
|
||||
if (!this.isRemoved() && !this.survives()) {
|
||||
- this.discard();
|
||||
|
|
|
@ -367,4 +367,10 @@ public class SpigotWorldConfig
|
|||
this.maxTntTicksPerTick = this.getInt( "max-tnt-per-tick", 100 );
|
||||
this.log( "Max TNT Explosions: " + this.maxTntTicksPerTick );
|
||||
}
|
||||
|
||||
public int hangingTickFrequency;
|
||||
private void hangingTickFrequency()
|
||||
{
|
||||
this.hangingTickFrequency = this.getInt( "hanging-tick-frequency", 100 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue