Files
Purpur/patches/server/0161-Add-config-for-snow-on-blue-ice.patch
William Blake Galbreath 31306b4b0e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206)
d6c81c8 Don't apply cramming damage to players (#5903)
12942dc Add rate options and timings for sensors and behaviors (#6027)
fc47872 Use mapped names for sensor and behavior timings/config (#6228)
c75a837 Don't expose ASM in API (#6229)
c225bf9 Fix book title and author being improperly serialized as components (#6190)
f25facb Update email & name (DenWav)
44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
2021-07-21 10:49:20 -05:00

47 lines
2.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 5 Mar 2021 17:59:05 -0600
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 0169d874247a96c2e10a65ecb9c0c093f5a6ecfb..b760e2d014b3ae70671878082bb853b75572ed7f 100644
--- a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
@@ -76,7 +76,18 @@ public class SnowLayerBlock extends Block {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
BlockState iblockdata1 = world.getBlockState(pos.below());
- return !iblockdata1.is(Blocks.ICE) && !iblockdata1.is(Blocks.PACKED_ICE) && !iblockdata1.is(Blocks.BARRIER) ? (!iblockdata1.is(Blocks.HONEY_BLOCK) && !iblockdata1.is(Blocks.SOUL_SAND) ? Block.isFaceFull(iblockdata1.getCollisionShape(world, pos.below()), Direction.UP) || iblockdata1.is((Block) this) && (Integer) iblockdata1.getValue(SnowLayerBlock.LAYERS) == 8 : true) : false;
+ // Purpur start - rewrite this whole return to make more sense
+ if (iblockdata1.is(Blocks.ICE) || iblockdata1.is(Blocks.PACKED_ICE) || iblockdata1.is(Blocks.BARRIER)) {
+ return false;
+ }
+ if (iblockdata1.is(Blocks.BLUE_ICE) && !world.getWorldBorder().world.purpurConfig.snowOnBlueIce) {
+ return false;
+ }
+ if (iblockdata1.is(Blocks.HONEY_BLOCK) || iblockdata1.is(Blocks.SOUL_SAND)) {
+ return true;
+ }
+ return Block.isFaceFull(iblockdata1.getCollisionShape(world, pos.below()), Direction.UP) || iblockdata1.is(this) && iblockdata1.getValue(LAYERS) == 8;
+ // Purpur end
}
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 26636dea0ce6ed0d58c44bdfbf18a4305d777874..4223cdaa1b0f89e18a54375a69e78bdfd05df0ba 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -533,6 +533,11 @@ public class PurpurWorldConfig {
furnaceUseLavaFromUnderneath = getBoolean("blocks.furnace.use-lava-from-underneath", furnaceUseLavaFromUnderneath);
}
+ public boolean snowOnBlueIce = true;
+ private void iceSettings() {
+ snowOnBlueIce = getBoolean("blocks.blue_ice.allow-snow-formation", snowOnBlueIce);
+ }
+
public boolean lavaInfinite = false;
public int lavaInfiniteRequiredSources = 2;
public int lavaSpeedNether = 10;