From d5bb470b6bcf25412157b23167c370124dda813a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 13 Oct 2020 23:37:58 +0200 Subject: [PATCH] some mycelium-related fixes --- src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java | 4 ++-- .../java/de/ellpeck/naturesaura/items/tools/ItemShovel.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java index aebb8865..53d756e6 100644 --- a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java +++ b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java @@ -125,7 +125,7 @@ public class ClientEvents { BlockPos pos = new BlockPos(x, mc.world.getHeight(Heightmap.Type.WORLD_SURFACE, x, z) - 1, z); BlockState state = mc.world.getBlockState(pos); Block block = state.getBlock(); - if (block instanceof IGrowable || block instanceof IPlantable || block instanceof LeavesBlock) { + if (block instanceof IGrowable || block instanceof IPlantable || block instanceof LeavesBlock || block instanceof MyceliumBlock) { int excess = IAuraChunk.triangulateAuraInArea(mc.world, pos, 45) - IAuraChunk.DEFAULT_AURA; if (excess > 0) { int chance = Math.max(10, 50 - excess / 25000); @@ -137,7 +137,7 @@ public class ClientEvents { mc.world.rand.nextGaussian() * 0.01F, mc.world.rand.nextFloat() * 0.025F, mc.world.rand.nextGaussian() * 0.01F, - BiomeColors.getGrassColor(mc.world, pos), + block instanceof MyceliumBlock ? 0x875ca1 : BiomeColors.getGrassColor(mc.world, pos), Math.min(2F, 1F + mc.world.rand.nextFloat() * (excess / 30000F)), Math.min(300, 100 + mc.world.rand.nextInt(excess / 3000 + 1)), 0F, false, true); diff --git a/src/main/java/de/ellpeck/naturesaura/items/tools/ItemShovel.java b/src/main/java/de/ellpeck/naturesaura/items/tools/ItemShovel.java index e7cd12ad..c1ab8a0f 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/tools/ItemShovel.java +++ b/src/main/java/de/ellpeck/naturesaura/items/tools/ItemShovel.java @@ -41,9 +41,9 @@ public class ItemShovel extends ShovelItem implements IModItem, ICustomItemModel BlockState state = world.getBlockState(pos); if (this == ModItems.INFUSED_IRON_SHOVEL) { int damage = 0; - if (state.getBlock() == Blocks.DIRT) { + if (state.getBlock() == Blocks.DIRT || state.getBlock() == Blocks.MYCELIUM) { if (world.getBlockState(pos.up()).getMaterial() == Material.AIR) { - world.setBlockState(pos, Blocks.GRASS.getDefaultState()); + world.setBlockState(pos, Blocks.GRASS_BLOCK.getDefaultState()); damage = 5; } } else {