diff --git a/patches/server/Fix-kelp-modifier-changing-growth-for-other-crops.patch b/patches/server/Fix-Spigot-growth-modifiers.patch similarity index 74% rename from patches/server/Fix-kelp-modifier-changing-growth-for-other-crops.patch rename to patches/server/Fix-Spigot-growth-modifiers.patch index 150d4128ba..3d09c0193c 100644 --- a/patches/server/Fix-kelp-modifier-changing-growth-for-other-crops.patch +++ b/patches/server/Fix-Spigot-growth-modifiers.patch @@ -1,14 +1,16 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Fri, 3 Dec 2021 17:09:24 -0800 -Subject: [PATCH] Fix kelp modifier changing growth for other crops - -Also add growth modifiers for twisting vines, weeping vines, cave vines, -and glow berries +Subject: [PATCH] Fix Spigot growth modifiers +Fixes kelp modifier changing growth for other crops +Also add growth modifiers for glow berries Also fix above-mentioned modifiers from having the reverse effect +Fixes an issue with the pumpkin speed modifier not being applied correctly + Co-authored-by: Jake Potrebic +Co-authored-by: Noah van der Aa diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -57,6 +59,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 protected BlockState getGrowIntoState(BlockState state, RandomSource random) { return (BlockState) state.cycle(GrowingPlantHeadBlock.AGE); } +diff --git a/src/main/java/net/minecraft/world/level/block/StemBlock.java b/src/main/java/net/minecraft/world/level/block/StemBlock.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/block/StemBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/StemBlock.java +@@ -0,0 +0,0 @@ public class StemBlock extends BushBlock implements BonemealableBlock { + if (world.getRawBrightness(pos, 0) >= 9) { + float f = CropBlock.getGrowthSpeed(this, world, pos); + +- if (random.nextFloat() < (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution ++ if (random.nextFloat() < ((this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution // Paper + int i = (Integer) state.getValue(StemBlock.AGE); + + if (i < 7) { diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java