mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly
This commit is contained in:
46
patches/server/0162-Add-config-for-snow-on-blue-ice.patch
Normal file
46
patches/server/0162-Add-config-for-snow-on-blue-ice.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
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 1c1d169aaf5158029778f3635d72878f32f4786a..9956f0d219b8570eadff207aeffedee079250135 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -540,6 +540,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;
|
||||
Reference in New Issue
Block a user