mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
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)
40 lines
2.2 KiB
Diff
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 14e00c7feb1c051d56a3d27cd00dcef072dd771a..4952fb1aaaafb55baa0fddb389f966a120a4786c 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
|
|
@@ -81,6 +81,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 c7741f717e71dba7302710d262500a8dccbcdad2..39c6d09fdade9809a43b749adb8b27d82e35460a 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -909,9 +909,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 boolean lavaInfinite = false;
|