Skip to content

Commit

Permalink
fix: water placed in nether dimension will disappear immediately now
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Dec 29, 2024
1 parent 49a5aa4 commit dec32b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Unless otherwise specified, any version comparison below is the comparison of se
- (API) Corrected the return type of `Dimension#breakBlock(Vector3ic, ItemStack, Entity)` from `void` to `boolean`. Some
overloads for this method are also added.
- Block breaking particle won't be sent if block is broken by flowing liquid.
- Water placed in nether dimension will disappear immediately now.

## 0.1.1 (API 0.2.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ public void onNeighborUpdate(BlockStateWithPos current, BlockStateWithPos neighb
super.onNeighborUpdate(current, neighbor, face);
}

@Override
public void afterPlaced(BlockStateWithPos oldBlockState, BlockState newBlockState, PlayerInteractInfo placementInfo) {
if (oldBlockState.dimension().getDimensionInfo() == DimensionInfo.NETHER) {
setLiquidInWorld(oldBlockState.dimension(), oldBlockState.pos(), null);
return;
}

super.afterPlaced(oldBlockState, newBlockState, placementInfo);
}

@Override
public void onReplace(BlockStateWithPos currentBlockState, BlockState newBlockState, PlayerInteractInfo placementInfo) {
super.onReplace(currentBlockState, newBlockState, placementInfo);
Expand Down

0 comments on commit dec32b5

Please sign in to comment.