Files
Purpur/patches/server/0273-Config-to-not-let-coral-die.patch
Encode42 fe3250cfec Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@c1bca9a Add exploded block state to BlockExplodeEvent (#6818)
PaperMC/Paper@94373f0 Fix OfflinePlayer#getPlayerProfile returning deprecated type (#8543)
PaperMC/Paper@7b52db5 Fix buffer-joins-to-world patch
PaperMC/Paper@048ee58 Fix OfflinePlayer getPlayerProfile return type (#8710)
PaperMC/Paper@e05ba98 Avoid to spam the transform event for hoglin->zoglin conversion (#8712)
PaperMC/Paper@8e83c3c Deprecate ProjectileCollideEvent (#8678)
PaperMC/Paper@c59922d Expose signed message in chat events (#8694)
PaperMC/Paper@5717b84 Add config option for spider worldborder climbing (#6448)
PaperMC/Paper@e6f61f7 fix ArmorStandMeta not applying false flags (#8632)
PaperMC/Paper@47abd1c Add EntityPushedByEntityEvent (#7704)
PaperMC/Paper@f26e9cc Tadpole lock API (#8297)
PaperMC/Paper@3331501 Use team display name for quit message (#7127)
PaperMC/Paper@1975fbe Respect SpigotConfig logCommands & fix stopDancing() NPE (#8715)
PaperMC/Paper@78a91df Fix (again) Player#getPlayerProfile no such method error (#8722)
PaperMC/Paper@52718db Updated Upstream (Bukkit/CraftBukkit) (#8714)
PaperMC/Paper@2040c1e Player Flying Fall Damage API (#5357)
2022-12-27 15:55:36 -05:00

47 lines
2.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Encode42 <me@encode42.dev>
Date: Mon, 4 Jul 2022 13:57:06 -0400
Subject: [PATCH] Config to not let coral die
diff --git a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
index 3d2b34c5a7c9b00c1164b4f89c2cbff81fc460eb..b5505e926e5cdb447de68e8eb8e46c97eb988e27 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
@@ -35,6 +35,7 @@ public class BaseCoralPlantTypeBlock extends Block implements SimpleWaterloggedB
}
protected static boolean scanForWater(BlockState state, BlockGetter world, BlockPos pos) {
+ if (!((net.minecraft.world.level.LevelAccessor) world).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur
if (state.getValue(WATERLOGGED)) {
return true;
} else {
diff --git a/src/main/java/net/minecraft/world/level/block/CoralBlock.java b/src/main/java/net/minecraft/world/level/block/CoralBlock.java
index 88faea00be60a519f56f975a5311df5e1eb3e6b8..cbb726ac367be81e27d3a86643baf7c4f0746edf 100644
--- a/src/main/java/net/minecraft/world/level/block/CoralBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CoralBlock.java
@@ -45,6 +45,7 @@ public class CoralBlock extends Block {
}
protected boolean scanForWater(BlockGetter world, BlockPos pos) {
+ if (!((net.minecraft.world.level.LevelAccessor) world).getMinecraftWorld().purpurConfig.coralDieOutsideWater) return true; // Purpur
Direction[] aenumdirection = Direction.values();
int i = aenumdirection.length;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 3780049479f9bb464a6049587bb2b9987e61b032..d03d3ee880c7907bd7f1223ab104bcdcb3f73d56 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -810,6 +810,11 @@ public class PurpurWorldConfig {
composterBulkProcess = getBoolean("blocks.composter.sneak-to-bulk-process", composterBulkProcess);
}
+ public boolean coralDieOutsideWater = true;
+ private void coralSettings() {
+ coralDieOutsideWater = getBoolean("blocks.coral.die-outside-water", coralDieOutsideWater);
+ }
+
public boolean dispenserApplyCursedArmor = true;
public boolean dispenserPlaceAnvils = false;
private void dispenserSettings() {