Files
Purpur/patches/server/0239-Campfire-option-for-lit-when-placed.patch
BillyGalbreath b7f623afe5 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
9259558b58 Fix remapping issue with RangedAttackMob and RangedEntity (#7167)
3d9385e665 Add material tags for copper blocks (#7141)
75f4cb074a Move setShouldBurnInDay to AbstractSkeleton (#7120)
9adc0b243b Fix breakNaturally for fluid-logged blocks (#7134)
76f327471d Move VehicleCollisionEvent HandlerList up (#7112)
d4c819056d Forward CraftEntity in teleport command (#7025)
9012ae8880 Improve scoreboard entries (#6871)
264b11d9f3 Entity powdered snow API (#6833)
a6a6a3db24 [ci skip] Revert change to apatch script
2cf6a57bca Fix entity type tags suggestions in selectors (#6468)
8a21c1742b Add API for item entity health (#6514)
26fbb02aae Adventure changes for Java 17 and Component support for resourcepack prompt
10bfb63f6c Configurable max block light for monster spawning (#7129)
6e5ceb34eb Fix ChunkMap distanceManager field reobf
82eaf4ee15 Fix duplicated BlockPistonRetractEvent call (#7111)
cf621c5eb3 Load effect amplifiers greater than 127 correctly (#7175)
1ce4281666 Fix ABI breakage for plainSerializer (#7178)
bf826b3fac [ci skip] Update Gradle wrapper to 7.3.3
464b1715bb Add uncaught exception handler using logger to usages of ThreadFactoryBuilder (#7179)
2021-12-23 22:44:22 -06:00

36 lines
2.4 KiB
Diff

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 0b60b545271e62df86a0eb3c1f0f315a014b24cd..44df9e5034887c756c00bdcfb3ea04d40b3dd866 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/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 6501dd086fe3d5be6f30c44da347fbd13d39286d..eb6c34cd8da95546e1f2203d4b0144c828158367 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -951,6 +951,11 @@ public class PurpurWorldConfig {
stonecutterDamage = (float) getDouble("blocks.stonecutter.damage", stonecutterDamage);
}
+ 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;