Skip to content

Commit

Permalink
Add carpet to fluids-break-redstone (#20)
Browse files Browse the repository at this point in the history
* Create 0075-Configure-fluids-breaking-wool-carpet.patch

* rebase

* use instanceof instead of blocktags

---------

Co-authored-by: Samsuik <[email protected]>
  • Loading branch information
maxrenner101 and Samsuik committed Aug 10, 2024
1 parent 16295bd commit 46ecb3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0054-Configure-fluids-breaking-redstone.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Subject: [PATCH] Configure fluids breaking redstone


diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
index e6acf6c4bcdb8d2548aa6a8b8d9af7c56877cfd4..a229c3676ac2e59eb0c9dc114f54b1ae8f9e65ac 100644
index e6acf6c4bcdb8d2548aa6a8b8d9af7c56877cfd4..d0021818eef10333cb3d6b1ea4e0deb03a9310bb 100644
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
@@ -477,6 +477,10 @@ public abstract class FlowingFluid extends Fluid {

if (block instanceof LiquidBlockContainer ifluidcontainer) {
return ifluidcontainer.canPlaceLiquid((Player) null, world, pos, state, fluid);
+ // Sakura start
+ } else if (world instanceof Level level && !level.sakuraConfig().technical.redstone.fluidsBreakRedstone && state.isSignalSource()) {
+ } else if (world instanceof Level level && !level.sakuraConfig().technical.redstone.fluidsBreakRedstone && (state.isSignalSource() || state.getBlock() instanceof net.minecraft.world.level.block.CarpetBlock)) {
+ return false;
+ // Sakura end
} else {
Expand Down

0 comments on commit 46ecb3d

Please sign in to comment.