mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
58 lines
3.9 KiB
Diff
58 lines
3.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 15 Mar 2021 03:52:17 -0500
|
|
Subject: [PATCH] Tick fluids config
|
|
|
|
|
|
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 84623c632d8c2f0fa7ec939c711316d757117d23..1851035b9fdcc076442d0699567a3b020e6425d6 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
|
@@ -137,7 +137,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
|
|
|
@Override
|
|
protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
- if (this.shouldSpreadLiquid(world, pos, state)) {
|
|
+ if (world.purpurConfig.tickFluids && this.shouldSpreadLiquid(world, pos, state)) { // Purpur
|
|
world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper - Configurable speed for water flowing over lava
|
|
}
|
|
|
|
@@ -165,7 +165,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
|
|
|
@Override
|
|
protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
|
- if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) {
|
|
+ if (world.getMinecraftWorld().purpurConfig.tickFluids && state.getFluidState().isSource() || neighborState.getFluidState().isSource()) { // Purpur
|
|
world.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world));
|
|
}
|
|
|
|
@@ -174,7 +174,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
|
|
|
@Override
|
|
protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
|
- if (this.shouldSpreadLiquid(world, pos, state)) {
|
|
+ if (world.purpurConfig.tickFluids && this.shouldSpreadLiquid(world, pos, state)) { // Purpur
|
|
world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper - Configurable speed for water flowing over lava
|
|
}
|
|
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 84fb3a8d8527c63787bf40f14519290f4d3fbe79..80fd1104b5d13e592db5b61b1978bac8e9d284bb 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -128,6 +128,7 @@ public class PurpurWorldConfig {
|
|
public boolean noteBlockIgnoreAbove = false;
|
|
public boolean persistentDroppableEntityDisplayNames = true;
|
|
public boolean projectilesBypassMobGriefing = false;
|
|
+ public boolean tickFluids = true;
|
|
public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
public double voidDamageHeight = -64.0D;
|
|
public double voidDamageDealt = 4.0D;
|
|
@@ -146,6 +147,7 @@ public class PurpurWorldConfig {
|
|
noteBlockIgnoreAbove = getBoolean("gameplay-mechanics.note-block-ignore-above", noteBlockIgnoreAbove);
|
|
persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames);
|
|
projectilesBypassMobGriefing = getBoolean("gameplay-mechanics.projectiles-bypass-mob-griefing", projectilesBypassMobGriefing);
|
|
+ tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids);
|
|
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
|
|
voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt);
|