mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
#122: Add missing parentheses to pumpkin and melon growth modifier
This commit is contained in:
parent
1aec3fc149
commit
6198b5ae88
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
From e0224e893a0a7ada1bbb1486c98a9b7825b51b5a Mon Sep 17 00:00:00 2001
|
||||
From 15a3d88cf6218940932154a0d698711a590d2954 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 7 Mar 2016 22:14:13 +1100
|
||||
Subject: [PATCH] Crop Growth Rates
|
||||
|
@ -197,7 +197,7 @@ index ca7214220..588cb04f4 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockStem.java b/src/main/java/net/minecraft/world/level/block/BlockStem.java
|
||||
index e8a25e164..c7dbe8f74 100644
|
||||
index e8a25e164..8f98dce4e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockStem.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockStem.java
|
||||
@@ -53,7 +53,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
@ -205,7 +205,7 @@ index e8a25e164..c7dbe8f74 100644
|
|||
float f = BlockCrops.getGrowthSpeed(this, worldserver, blockposition);
|
||||
|
||||
- if (randomsource.nextInt((int) (25.0F / f) + 1) == 0) {
|
||||
+ if (randomsource.nextFloat() < (this == Blocks.PUMPKIN_STEM ? worldserver.spigotConfig.pumpkinModifier : worldserver.spigotConfig.melonModifier / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
+ if (randomsource.nextFloat() < ((this == Blocks.PUMPKIN_STEM ? worldserver.spigotConfig.pumpkinModifier : worldserver.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
int i = (Integer) iblockdata.getValue(BlockStem.AGE);
|
||||
|
||||
if (i < 7) {
|
||||
|
|
Loading…
Add table
Reference in a new issue