9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-23 08:49:25 +00:00

Begin backporting to 1.18.2

This commit is contained in:
Samsuik
2025-03-14 18:45:24 +00:00
parent 9e384db972
commit 9ec82c34ea
101 changed files with 1971 additions and 2021 deletions

View File

@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Sat, 9 Dec 2023 00:11:48 +0000
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 1f267a6815c51cc89e708ca5117bdc9f1955af33..8a23051a6c0dd230fb8ff805638a91aeaf9e9729 100644
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
@@ -453,6 +453,10 @@ public abstract class FlowingFluid extends Fluid {
if (block instanceof LiquidBlockContainer) {
return ((LiquidBlockContainer) block).canPlaceLiquid(world, pos, state, fluid);
+ // Sakura start
+ } else if (world instanceof Level level && !level.sakuraConfig.fluidsBreakRedstone && (state.isSignalSource() || state.getBlock() instanceof net.minecraft.world.level.block.CarpetBlock)) {
+ return false;
+ // Sakura end
} else if (!(block instanceof DoorBlock) && !state.is(BlockTags.SIGNS) && !state.is(Blocks.LADDER) && !state.is(Blocks.SUGAR_CANE) && !state.is(Blocks.BUBBLE_COLUMN)) {
Material material = state.getMaterial();