Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Fix glowing mushrooms appearing in flowing water
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MartinTheDragon committed Aug 8, 2021
1 parent 203e34c commit 68e6cda
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 68e6cda

Please sign in to comment.