mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
prepare for 1.21.4 update
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
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 a2d023ff011f71f80032f02430a53d6a08a23623..399441dd8388dcdec08768665d3cfa189aca0a95 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -140,7 +140,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
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
|
||||
@Override
|
||||
protected BlockState updateShape(BlockState state, LevelReader world, ScheduledTickAccess tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource random) {
|
||||
- if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) {
|
||||
+ if (world.getWorldBorder().world.purpurConfig.tickFluids && state.getFluidState().isSource() || neighborState.getFluidState().isSource()) { // Purpur
|
||||
tickView.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world));
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
|
||||
@Override
|
||||
protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, 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 9c9afd3befebe0fef8c84f4ed38231c11260d441..a3ad9d2610ba27d4dbfa22cf8e3b9f8365310d40 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -135,6 +135,7 @@ public class PurpurWorldConfig {
|
||||
public boolean imposeTeleportRestrictionsOnGateways = false;
|
||||
public boolean imposeTeleportRestrictionsOnNetherPortals = false;
|
||||
public boolean imposeTeleportRestrictionsOnEndPortals = false;
|
||||
+ public boolean tickFluids = true;
|
||||
private void miscGameplayMechanicsSettings() {
|
||||
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
|
||||
alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
|
||||
@@ -154,7 +155,7 @@ public class PurpurWorldConfig {
|
||||
imposeTeleportRestrictionsOnGateways = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-gateways", imposeTeleportRestrictionsOnGateways);
|
||||
imposeTeleportRestrictionsOnNetherPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-nether-portals", imposeTeleportRestrictionsOnNetherPortals);
|
||||
imposeTeleportRestrictionsOnEndPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-end-portals", imposeTeleportRestrictionsOnEndPortals);
|
||||
-
|
||||
+ tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids);
|
||||
}
|
||||
|
||||
public int daytimeTicks = 12000;
|
||||
Reference in New Issue
Block a user