Files
Purpur/patches/server/0250-Add-config-for-snow-on-blue-ice.patch
granny 0b95a8072a Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5436d44 Deprecate several Keyed#getKey methods (#10357)
PaperMC/Paper@a7f1dc6 Change online mode default for Velocity configuration (#10413)
PaperMC/Paper@37db2d7 [ci skip] Update book page/char limit for book meta doc (#10415)
PaperMC/Paper@526795b Update patches to handle vineflower decompiler (#10406)
PaperMC/Paper@8fe90de [ci skip] Referenced InventoryDragEvent in documentation of InventoryClickEvent (#10395)
PaperMC/Paper@46d462b Fix StackOverflowException thrown on shutdown (Fixes #10404) (#10408)
PaperMC/Paper@f061e76 Fix hit criteria advancement triggered before changing state (#10409)
PaperMC/Paper@3263470 Add color transition and clone functions to ParticleBuilder (#10342)
PaperMC/Paper@4445d23 Deprecate ItemStack#setType & add ItemStack#withType (#10290)
2024-04-12 17:48:06 -07:00

40 lines
2.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Wed, 8 Jun 2022 15:19:41 -0400
Subject: [PATCH] Add config for snow on blue ice
diff --git a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
index a3da9536c3a3ad33d1c795673bdd7b05d6534054..9b057f3967aae5d0ca621b19d1212db91aaaee22 100644
--- a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
@@ -88,6 +88,12 @@ public class SnowLayerBlock extends Block {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
BlockState iblockdata1 = world.getBlockState(pos.below());
+ // Purpur start
+ if (iblockdata1.is(Blocks.BLUE_ICE) && !world.getWorldBorder().world.purpurConfig.snowOnBlueIce) {
+ return false;
+ }
+ // Purpur end
+
return iblockdata1.is(BlockTags.SNOW_LAYER_CANNOT_SURVIVE_ON) ? false : (iblockdata1.is(BlockTags.SNOW_LAYER_CAN_SURVIVE_ON) ? true : Block.isFaceFull(iblockdata1.getCollisionShape(world, pos.below()), Direction.UP) || iblockdata1.is((Block) this) && (Integer) iblockdata1.getValue(SnowLayerBlock.LAYERS) == 8);
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 6dfc93af8bab6462d4ab0940ea61652065b0b581..ba8d194d1a6ecab995b31d04687f269389811754 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -998,9 +998,11 @@ public class PurpurWorldConfig {
public boolean mobsSpawnOnPackedIce = true;
public boolean mobsSpawnOnBlueIce = true;
+ public boolean snowOnBlueIce = true;
private void iceSettings() {
mobsSpawnOnPackedIce = getBoolean("blocks.packed_ice.allow-mob-spawns", mobsSpawnOnPackedIce);
mobsSpawnOnBlueIce = getBoolean("blocks.blue_ice.allow-mob-spawns", mobsSpawnOnBlueIce);
+ snowOnBlueIce = getBoolean("blocks.blue_ice.allow-snow-formation", snowOnBlueIce);
}
public int lavaInfiniteRequiredSources = 2;