From b77aab63a83a5d53e6bfa5786a36a10e64f5de62 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 29 Jan 2021 18:01:03 +0100 Subject: [PATCH] Fixed winter's calling replacing blocks that are waterlogged Closes #187 --- .../naturesaura/blocks/tiles/TileEntitySnowCreator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java index 124d8ba3..9fe916c5 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java @@ -52,7 +52,8 @@ public class TileEntitySnowCreator extends TileEntityImpl implements ITickableTi Fluid fluid = this.world.getFluidState(down).getFluid(); if (fluid == Fluids.WATER) { - this.world.setBlockState(down, Blocks.ICE.getDefaultState()); + if (this.world.getBlockState(down).getMaterial().isReplaceable()) + this.world.setBlockState(down, Blocks.ICE.getDefaultState()); } else if (Blocks.SNOW.getDefaultState().isValidPosition(this.world, pos) && this.world.getBlockState(pos).getBlock() != Blocks.SNOW && this.world.getBlockState(pos).getMaterial().isReplaceable()) { this.world.setBlockState(pos, Blocks.SNOW.getDefaultState());