From f41d90d69dd9f131a01832170e59755452a4d198 Mon Sep 17 00:00:00 2001 From: David-John Miller Date: Thu, 9 Nov 2023 23:08:18 +0200 Subject: [PATCH 1/4] Stop converting chests to ice --- .../mininggadgets/common/tiles/RenderBlockTileEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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..df191a73 100644 --- a/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java +++ b/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java @@ -222,7 +222,8 @@ 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; } From f74b22b7eed8333a3d06391842e127140fbdc0cc Mon Sep 17 00:00:00 2001 From: David-John Miller Date: Thu, 9 Nov 2023 23:33:37 +0200 Subject: [PATCH 2/4] Add block entity check --- .../common/tiles/RenderBlockTileEntity.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 df191a73..78bb98fa 100644 --- a/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java +++ b/src/main/java/com/direwolf20/mininggadgets/common/tiles/RenderBlockTileEntity.java @@ -228,8 +228,14 @@ private int replaceBlockWithAlternative(Level world, BlockPos pos, BlockState st 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() { From 0c630ee570088ab02578ac5ab90a72a53c01cf07 Mon Sep 17 00:00:00 2001 From: Michael Hillcox Date: Mon, 13 Nov 2023 13:03:42 +0000 Subject: [PATCH 3/4] chore: release prep --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 7edae79fe0a6fdccc47eb295f4ef82a536a159c0 Mon Sep 17 00:00:00 2001 From: Michael Hillcox Date: Mon, 13 Nov 2023 13:03:53 +0000 Subject: [PATCH 4/4] chore: changelog --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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