mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 18:12:09 +01:00
3327198680
Add unbreakable API to item meta SpigotMC/Spigot@b1af008222 Configure how often EntityHangings calculate if they should die. SpigotMC/Spigot@ac6e1fc32d Copy ItemStacks in DataWatcher to prevent ConcurrentModificationExcep… SpigotMC/Spigot@2af28ffbd1 Add the spigot.yml into the timings paste SpigotMC/Spigot@d61f38bd58 Note: This commit moves the entity-hanging tick into Spigot's spigot.yml and out of our paper.yml
35 lines
No EOL
1.7 KiB
Diff
35 lines
No EOL
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: drXor <mcyoung@mit.edu>
|
|
Date: Sat, 9 Aug 2014 13:56:51 -0400
|
|
Subject: [PATCH] Configurable Hanging Tick
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
|
@@ -0,0 +0,0 @@ public abstract class EntityHanging extends Entity {
|
|
this.lastX = this.locX;
|
|
this.lastY = this.locY;
|
|
this.lastZ = this.locZ;
|
|
- if (this.e++ == 100 && !this.world.isStatic) {
|
|
+ if (this.e++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isStatic) { // Spigot - 100 -> this.world.spigotConfig.hangingTickFrequency
|
|
this.e = 0;
|
|
if (!this.dead && !this.survives()) {
|
|
// CraftBukkit start - fire break events
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
|
maxTntTicksPerTick = getInt( "max-tnt-per-tick", 100 );
|
|
log( "Max TNT Explosions: " + maxTntTicksPerTick );
|
|
}
|
|
+
|
|
+ public int hangingTickFrequency;
|
|
+ private void hangingTickFrequency()
|
|
+ {
|
|
+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100 );
|
|
+ }
|
|
}
|
|
--
|