mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Add bamboo to the MC-113809 fix
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
From 7601da03bdf749116f19ba3234274d0207f63a61 Mon Sep 17 00:00:00 2001
|
||||
From 607c4871b41a74370a1f377aa110d475e445737a Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Thu, 16 May 2019 01:33:46 +0100
|
||||
Subject: [PATCH] Only grow cactus/reeds/chorus fruit on random tick
|
||||
(MC-113809)
|
||||
Subject: [PATCH] Fix MC-113809 Only grow cactus/reeds/bamboo/chorus fruit on
|
||||
random tick
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/Block.java | 1 +
|
||||
src/main/java/net/minecraft/server/BlockBamboo.java | 1 +
|
||||
src/main/java/net/minecraft/server/BlockCactus.java | 1 +
|
||||
src/main/java/net/minecraft/server/BlockChorusFlower.java | 1 +
|
||||
src/main/java/net/minecraft/server/BlockReed.java | 1 +
|
||||
src/main/java/net/minecraft/server/WorldServer.java | 2 ++
|
||||
5 files changed, 6 insertions(+)
|
||||
6 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 8e16162a7..9b17269e6 100644
|
||||
@@ -24,6 +25,18 @@ index 8e16162a7..9b17269e6 100644
|
||||
// Paper start
|
||||
public co.aikar.timings.Timing timing;
|
||||
public co.aikar.timings.Timing getTiming() {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockBamboo.java b/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
index 92f00c8c5..739935383 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
@@ -80,6 +80,7 @@ public class BlockBamboo extends Block implements IBlockFragilePlantElement {
|
||||
if (!iblockdata.canPlace(world, blockposition)) {
|
||||
world.b(blockposition, true);
|
||||
} else if ((Integer) iblockdata.get(BlockBamboo.f) == 0) {
|
||||
+ if (!randomTick) return; // Purpur - fix MC-113809
|
||||
if (world.random.nextInt(Math.max(1, (int) (100.0F / world.spigotConfig.bambooModifier) * 3)) == 0 && world.isEmpty(blockposition.up()) && world.getLightLevel(blockposition.up(), 0) >= 9) { // Spigot
|
||||
int i = this.b((IBlockAccess) world, blockposition) + 1;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
index 29f9ff6c1..375ada5a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
Reference in New Issue
Block a user