Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 1ffee54

Browse files
BillyGalbreathgranny
authored andcommitted
Add config for snow on blue ice
1 parent f4e3250 commit 1ffee54

3 files changed

Lines changed: 12 additions & 39 deletions

File tree

patches/server/0241-Add-config-for-snow-on-blue-ice.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/net/minecraft/world/level/block/SnowLayerBlock.java
2+
+++ b/net/minecraft/world/level/block/SnowLayerBlock.java
3+
@@ -96,6 +_,7 @@
4+
@Override
5+
protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) {
6+
BlockState blockState = level.getBlockState(pos.below());
7+
+ if (blockState.is(Blocks.BLUE_ICE) && !level.getWorldBorder().world.purpurConfig.snowOnBlueIce) return false; // Purpur - Add config for snow on blue ice
8+
return !blockState.is(BlockTags.SNOW_LAYER_CANNOT_SURVIVE_ON)
9+
&& (
10+
blockState.is(BlockTags.SNOW_LAYER_CAN_SURVIVE_ON)

purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,9 +974,11 @@ private void furnaceSettings() {
974974

975975
public boolean mobsSpawnOnPackedIce = true;
976976
public boolean mobsSpawnOnBlueIce = true;
977+
public boolean snowOnBlueIce = true;
977978
private void iceSettings() {
978979
mobsSpawnOnPackedIce = getBoolean("blocks.packed_ice.allow-mob-spawns", mobsSpawnOnPackedIce);
979980
mobsSpawnOnBlueIce = getBoolean("blocks.blue_ice.allow-mob-spawns", mobsSpawnOnBlueIce);
981+
snowOnBlueIce = getBoolean("blocks.blue_ice.allow-snow-formation", snowOnBlueIce);
980982
}
981983

982984
public int lavaInfiniteRequiredSources = 2;

0 commit comments

Comments
 (0)