10 years later...

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-01-28 09:46:19 +11:00
parent df59a4870c
commit 455deb1188
6 changed files with 43 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
From 383d4ee7388ec2e58dee08aa2338746459f82d15 Mon Sep 17 00:00:00 2001
From 25d363d1f0fdc54987a6d6bc6f06eb53c6129637 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 11 Jan 2013 11:08:45 -0500
Subject: [PATCH] Fix various crop growth modifier formula issues
@@ -55,13 +55,13 @@ index 0bc7882..bf117bc 100644
int j1 = j + random.nextInt(5) - 3;
int k1 = k + random.nextInt(3) - 1;
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index 8fa8302..a172ba2 100644
index 9647bb2..ffe9778 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -23,7 +23,7 @@ public class BlockMushroom extends BlockFlower {
}
@@ -24,7 +24,7 @@ public class BlockMushroom extends BlockFlower {
public void b(World world, int i, int j, int k, Random random) {
final int sourceX = i, sourceY = j, sourceZ = k; // CraftBukkit
- if (random.nextInt((int) (world.growthOdds * 100 / world.getWorld().mushroomGrowthModifier * 25)) == 0) { // Spigot
+ if (random.nextInt(Math.max(1, (int) world.growthOdds / world.getWorld().mushroomGrowthModifier * 25)) == 0) { // Spigot
byte b0 = 4;