mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-27 18:59:06 +00:00
Avoid searching for lava if the throttled flow speed is unused
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samsuik <kfian294ma4@gmail.com>
|
||||
Date: Mon, 22 Jan 2024 15:24:51 +0000
|
||||
Subject: [PATCH] Avoid searching for lava if throttled water flow speed is
|
||||
default
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
index aaac136acbef15a1925b4b6e8da7bfc4f75360de..b9d2646e1427c611475d66e2ab75d61b8aec427b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -147,7 +147,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
|
||||
// Paper start - Get flow speed. Throttle if its water and flowing adjacent to lava
|
||||
public int getFlowSpeed(Level world, BlockPos blockposition) {
|
||||
- if (net.minecraft.core.registries.BuiltInRegistries.FLUID.wrapAsHolder(this.fluid).is(FluidTags.WATER)) {
|
||||
+ if (net.minecraft.core.registries.BuiltInRegistries.FLUID.wrapAsHolder(this.fluid).is(FluidTags.WATER) && this.fluid.getTickDelay(world) != world.paperConfig().environment.waterOverLavaFlowSpeed) { // Sakura
|
||||
if (
|
||||
isLava(world, blockposition.north(1)) ||
|
||||
isLava(world, blockposition.south(1)) ||
|
||||
Reference in New Issue
Block a user