From 68e6cda2300222906155954a0551569ddb92a9f0 Mon Sep 17 00:00:00 2001 From: MartinTheDragon Date: Sun, 8 Aug 2021 23:08:49 +0300 Subject: [PATCH] Fix glowing mushrooms appearing in flowing water Glowing Mycelium randomly spawns Glowing Mushrooms on top, but did not check whether the Glowing Mushroom can actually survive there. So it would spawn a lot of mushrooms inside of flowing water, which would immediately break the mushrooms and therefore creating really fast Glowing Mushroom farms. --- .../at/martinthedragon/nucleartech/blocks/GlowingMycelium.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/at/martinthedragon/nucleartech/blocks/GlowingMycelium.kt b/src/main/kotlin/at/martinthedragon/nucleartech/blocks/GlowingMycelium.kt index 57cc365c..610d93a5 100644 --- a/src/main/kotlin/at/martinthedragon/nucleartech/blocks/GlowingMycelium.kt +++ b/src/main/kotlin/at/martinthedragon/nucleartech/blocks/GlowingMycelium.kt @@ -30,7 +30,8 @@ class GlowingMycelium(properties: Properties) : DeadGrass(properties) { } } - if (random.nextInt(10) == 0) { // add new mushrooms + // add new mushrooms + if (world.isEmptyBlock(pos.above()) && random.nextInt(10) == 0 && ModBlocks.glowingMushroom.get().defaultBlockState().canSurvive(world, pos.above())) { var count = 0 for (i in -5..4) { for (j in -5..5) {