mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Campfires burn out in rain
This commit is contained in:
44
patches/server/0030-Campfires-burn-out-in-rain.patch
Normal file
44
patches/server/0030-Campfires-burn-out-in-rain.patch
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
From 688f5111c13d50d317adb0667e0d9cff7f6ebaff 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 | 4 ++++
|
||||||
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
||||||
|
2 files changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||||
|
index 904bf47b8..1858c8cd4 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||||
|
@@ -86,6 +86,10 @@ 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, 1);
|
||||||
|
}
|
||||||
|
// Purpur end
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
index 490c2ede6..7f1c3ccb6 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
@@ -92,6 +92,11 @@ public class PurpurWorldConfig {
|
||||||
|
campfireRegenBoostRequireLineOfSight = getBoolean("campfire-regen.boost-require-line-of-sight", campfireRegenBoostRequireLineOfSight);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean campfiresGoOutInRain = true;
|
||||||
|
+ private void campfiresGoOutInRain() {
|
||||||
|
+ campfiresGoOutInRain = getBoolean("campfires-go-out-in-rain", campfiresGoOutInRain);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
public boolean allowSignColors = true;
|
||||||
|
private void allowSignColors() {
|
||||||
|
allowSignColors = getBoolean("allow-sign-colors", allowSignColors);
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
Reference in New Issue
Block a user