mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
37 lines
1.8 KiB
Diff
37 lines
1.8 KiB
Diff
From ccb7c36c3b7bec200c4a6d5182f1bc8d8bc9632a Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sun, 3 Apr 2016 16:28:17 -0400
|
|
Subject: [PATCH] Configurable Grass Spread Tick Rate
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 613964ce04..bb1c1c57cc 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -227,4 +227,10 @@ public class PaperWorldConfig {
|
|
private void useInhabitedTime() {
|
|
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
|
|
}
|
|
+
|
|
+ public int grassUpdateRate = 1;
|
|
+ private void grassUpdateRate() {
|
|
+ grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate));
|
|
+ log("Grass Spread Tick Rate: " + grassUpdateRate);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
index 6343fb1e0d..903e8241b8 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
@@ -21,6 +21,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
|
}
|
|
|
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
|
+ if (this instanceof BlockGrass && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + blockposition.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper
|
|
if (!world.isClientSide) {
|
|
if (!a((IWorldReader) world, blockposition)) {
|
|
// CraftBukkit start
|
|
--
|
|
2.18.0
|
|
|