mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Campfire option for lit when placed (#707)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <granny@pl3x.net>
|
||||
Date: Thu, 14 Oct 2021 01:53:20 -0700
|
||||
Subject: [PATCH] Campfire option for lit when placed
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
|
||||
index 7d0d6da335ff3bf810fa951553b58ff8a3267b0f..39f337c46aa3caa71d3cfa923ca4cf656445bcd0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
|
||||
@@ -124,7 +124,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
|
||||
BlockPos blockposition = ctx.getClickedPos();
|
||||
boolean flag = world.getFluidState(blockposition).getType() == Fluids.WATER;
|
||||
|
||||
- return (BlockState) ((BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(CampfireBlock.WATERLOGGED, flag)).setValue(CampfireBlock.SIGNAL_FIRE, this.isSmokeSource(world.getBlockState(blockposition.below())))).setValue(CampfireBlock.LIT, !flag)).setValue(CampfireBlock.FACING, ctx.getHorizontalDirection());
|
||||
+ return (BlockState) ((BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(CampfireBlock.WATERLOGGED, flag)).setValue(CampfireBlock.SIGNAL_FIRE, this.isSmokeSource(world.getBlockState(blockposition.below())))).setValue(CampfireBlock.LIT, world.purpurConfig.campFireLitWhenPlaced ? !flag : world.purpurConfig.campFireLitWhenPlaced)).setValue(CampfireBlock.FACING, ctx.getHorizontalDirection()); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 22fa1209876b2d3856f5de5086ab4f6fc3f676fc..0f7e1de894b10d109a7ce020995128cfda3fa7be 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1008,6 +1008,11 @@ public class PurpurWorldConfig {
|
||||
weepingVinesMaxGrowthAge = getInt("blocks.weeping_vines.max-growth-age", weepingVinesMaxGrowthAge);
|
||||
}
|
||||
|
||||
+ public boolean campFireLitWhenPlaced = true;
|
||||
+ private void campFireSettings() {
|
||||
+ campFireLitWhenPlaced = getBoolean("blocks.campfire.lit-when-placed", campFireLitWhenPlaced);
|
||||
+ }
|
||||
+
|
||||
public boolean babiesAreRidable = true;
|
||||
public boolean untamedTamablesAreRidable = true;
|
||||
public boolean useNightVisionWhenRiding = false;
|
||||
Reference in New Issue
Block a user