geforkt von Mirrors/Paper
e4d10a6d67
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: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
37 Zeilen
1.9 KiB
Diff
37 Zeilen
1.9 KiB
Diff
From d72aac0ac63b4642cbbc18a52998675af8819a37 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 5872e6b171..47f5f8055e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -246,4 +246,10 @@ public class PaperWorldConfig {
|
|
}
|
|
fixedInhabitedTime = getInt("fixed-chunk-inhabited-time", -1);
|
|
}
|
|
+
|
|
+ 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 9b25fc2f9e..2b19b6754a 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
|
@@ -29,6 +29,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
|
|
|
@Override
|
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
|
+ if (this instanceof BlockGrass && worldserver.paperConfig.grassUpdateRate != 1 && (worldserver.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + blockposition.hashCode()) % worldserver.paperConfig.grassUpdateRate != 0)) { return; } // Paper
|
|
if (!b(iblockdata, (IWorldReader) worldserver, blockposition)) {
|
|
// CraftBukkit start
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
|
|
--
|
|
2.25.1
|
|
|