Skip to content

Commit

Permalink
Merge branch 'master' into mc/1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Nov 13, 2023
2 parents 6a34e65 + 7edae79 commit 5c601ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5c601ea

Please sign in to comment.