geforkt von Mirrors/Paper
899bc53b79
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: f47abd88 SPIGOT-6242: Fix some file line endings de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable CraftBukkit Changes: 4475707d SPIGOT-6244: /spawnpoint ignores angle 8b3b096d SPIGOT-6242: Fix some file line endings 4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent results in a "Unable to summon entity due to duplicate UUIDs" error 2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
47 Zeilen
2.1 KiB
Diff
47 Zeilen
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Sudzzy <originmc@outlook.com>
|
|
Date: Wed, 2 Mar 2016 23:34:44 -0600
|
|
Subject: [PATCH] Configurable container update tick rate
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 8f45fa5ca878428a9ce6b18df075d3f09b2cf757..1d8d1a4e387f205f6c1c9b608f20e30763dec01a 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -177,4 +177,9 @@ public class PaperWorldConfig {
|
|
private void mobSpawnerTickRate() {
|
|
mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1);
|
|
}
|
|
+
|
|
+ public int containerUpdateTickRate;
|
|
+ private void containerUpdateTickRate() {
|
|
+ containerUpdateTickRate = getInt("container-update-tick-rate", 1);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index e1bb73282990b685a9d767b3aa9ea16791c15e9a..a91c4facac9cc1b7c2e497be77af636ac2b36138 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -80,6 +80,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
public boolean e;
|
|
public int ping;
|
|
public boolean viewingCredits;
|
|
+ private int containerUpdateDelay; // Paper
|
|
|
|
// CraftBukkit start
|
|
public String displayName;
|
|
@@ -402,7 +403,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
--this.noDamageTicks;
|
|
}
|
|
|
|
- this.activeContainer.c();
|
|
+ // Paper start - Configurable container update tick rate
|
|
+ if (--containerUpdateDelay <= 0) {
|
|
+ this.activeContainer.c();
|
|
+ containerUpdateDelay = world.paperConfig.containerUpdateTickRate;
|
|
+ }
|
|
+ // Paper end
|
|
if (!this.world.isClientSide && !this.activeContainer.canUse(this)) {
|
|
this.closeInventory();
|
|
this.activeContainer = this.defaultContainer;
|