diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bf538a6..c5fbdf16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## 1.20.1 + +### [1.15.7] + +#### Fixed + +- Water logged block entities will no longer be replaced with ice when using the freezing upgrade. Thanks to [#234](https://github.com/Direwolf20-MC/MiningGadgets/pull/234) [@Anoyomouse](https://github.com/Anoyomouse) + + ### [1.15.6] #### Changed - Improved the range tooltip to be more clear about what it does. Thanks to [#235](https://github.com/Direwolf20-MC/MiningGadgets/pull/235) [@Anoyomouse](https://github.com/Anoyomouse) -## 1.20.1 - ### [1.15.5] #### Added diff --git a/gradle.properties b/gradle.properties index f110bfba..bcd93126 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false #Mod Info -mod_version=1.15.6 +mod_version=1.15.7 #Dependencies mc_version=1.20.1 diff --git a/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java b/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java index 2e9c068c..78bb98fa 100644 --- a/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java +++ b/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java @@ -222,13 +222,20 @@ private int replaceBlockWithAlternative(Level world, BlockPos pos, BlockState st // If the block is just water logged, remove the fluid BlockState blockState = world.getBlockState(pos); - if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED) && world.getBlockEntity(pos) == null) { + // Chests have a tile entity, and are then converted to ice below, we need them to lose waterlogged + if (blockState.hasProperty(BlockStateProperties.WATERLOGGED) && blockState.getValue(BlockStateProperties.WATERLOGGED)) { world.setBlockAndUpdate(pos, blockState.setValue(BlockStateProperties.WATERLOGGED, false)); return costOfOperation; } - world.setBlockAndUpdate(pos, state); - return costOfOperation; + if (world.getBlockEntity(pos) == null) + { + world.setBlockAndUpdate(pos, state); + return costOfOperation; + } + + // Block is a block entity, we don't replace it, costs zero + return 0; } public void spawnParticle() {