mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
42 lines
2.0 KiB
Diff
42 lines
2.0 KiB
Diff
From db147d56a6690f1f4427813c31df18ef8730c538 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Thu, 6 Jun 2019 21:30:49 -0500
|
|
Subject: [PATCH] Campfires burn out in rain
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/BlockCampfire.java | 3 +++
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
|
2 files changed, 8 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
|
|
index d2363d1d..563f16a3 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
|
|
@@ -86,6 +86,9 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
|
if (iblockdata.get(BlockCampfire.d) && iblockdata.get(BlockCampfire.b)) {
|
|
world.setTypeAndData(pos, iblockdata.set(BlockCampfire.b, false), 3);
|
|
}
|
|
+ if (world.purpurConfig.campfiresGoOutInRain && world.getTime() % 20 == 0L && iblockdata.get(BlockCampfire.b) && world.isRainingAt(pos.shift(EnumDirection.UP))) {
|
|
+ world.setTypeAndData(pos, iblockdata.set(BlockCampfire.b, false), 3);
|
|
+ }
|
|
world.getBlockTickList().a(pos, this, tickRate(world));
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 871c0e23..8d1f3feb 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -88,4 +88,9 @@ public class PurpurWorldConfig {
|
|
campfireRegenBoostRequireLineOfSight = getBoolean("campfire-regen.boost-require-line-of-sight", campfireRegenBoostRequireLineOfSight);
|
|
campfireRequireRegenPotion = getBoolean("campfire-regen.requires-regen-potion-to-activate", campfireRequireRegenPotion);
|
|
}
|
|
+
|
|
+ public boolean campfiresGoOutInRain = true;
|
|
+ private void campfiresGoOutInRain() {
|
|
+ campfiresGoOutInRain = getBoolean("campfires-go-out-in-rain", campfiresGoOutInRain);
|
|
+ }
|
|
}
|
|
--
|
|
2.20.1
|
|
|