diff --git a/CHANGELOG.md b/CHANGELOG.md index 42ff92898..106e36d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/server/src/main/java/org/allaymc/server/block/component/BlockWaterBaseComponentImpl.java b/server/src/main/java/org/allaymc/server/block/component/BlockWaterBaseComponentImpl.java index 370f9720e..c9408e739 100644 --- a/server/src/main/java/org/allaymc/server/block/component/BlockWaterBaseComponentImpl.java +++ b/server/src/main/java/org/allaymc/server/block/component/BlockWaterBaseComponentImpl.java @@ -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);