mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Drop Airplane patches
This commit is contained in:
46
patches/server/0174-Add-config-for-snow-on-blue-ice.patch
Normal file
46
patches/server/0174-Add-config-for-snow-on-blue-ice.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <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/BlockSnow.java b/src/main/java/net/minecraft/world/level/block/BlockSnow.java
|
||||
index d44b88185ce58346007c6ef70b76f8e0df23e95c..4b7497acc5b26da48375625b4a31fb057805344d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockSnow.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockSnow.java
|
||||
@@ -74,7 +74,18 @@ public class BlockSnow extends Block {
|
||||
public boolean canPlace(IBlockData iblockdata, IWorldReader iworldreader, BlockPosition blockposition) {
|
||||
IBlockData iblockdata1 = iworldreader.getType(blockposition.down());
|
||||
|
||||
- return !iblockdata1.a(Blocks.ICE) && !iblockdata1.a(Blocks.PACKED_ICE) && !iblockdata1.a(Blocks.BARRIER) ? (!iblockdata1.a(Blocks.HONEY_BLOCK) && !iblockdata1.a(Blocks.SOUL_SAND) ? Block.a(iblockdata1.getCollisionShape(iworldreader, blockposition.down()), EnumDirection.UP) || iblockdata1.getBlock() == this && (Integer) iblockdata1.get(BlockSnow.LAYERS) == 8 : true) : false;
|
||||
+ // Purpur start - rewrite this whole return to make more sense
|
||||
+ if (iblockdata1.equals(Blocks.ICE) || iblockdata1.equals(Blocks.PACKED_ICE) || iblockdata1.equals(Blocks.BARRIER)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (iblockdata1.equals(Blocks.BLUE_ICE) && !iworldreader.getWorldBorder().world.purpurConfig.snowOnBlueIce) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (iblockdata1.equals(Blocks.HONEY_BLOCK) || iblockdata1.equals(Blocks.SOUL_SAND)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ return Block.a(iblockdata1.getCollisionShape(iworldreader, blockposition.down()), EnumDirection.UP) || iblockdata1.equals(this) && iblockdata1.get(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 f577b1054f8bdd2be933f7dae3ffe18dfeb87fe5..8cf40f10dccd9b4f52507e432dcfd6b2015e90f2 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -477,6 +477,11 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean snowOnBlueIce = true;
|
||||
+ private void iceSettings() {
|
||||
+ snowOnBlueIce = getBoolean("blocks.blue_ice.allow-snow-formation", snowOnBlueIce);
|
||||
+ }
|
||||
+
|
||||
public boolean chestOpenWithBlockOnTop = false;
|
||||
private void chestSettings() {
|
||||
chestOpenWithBlockOnTop = getBoolean("blocks.chest.open-with-solid-block-on-top", chestOpenWithBlockOnTop);
|
||||
Reference in New Issue
Block a user