Cactus breaks from solid neighbors config

This commit is contained in:
William Blake Galbreath
2025-01-12 12:10:13 -08:00
committed by granny
parent e88d5fe32e
commit ce87a62878
8 changed files with 37 additions and 56 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/block/CactusBlock.java
+++ b/net/minecraft/world/level/block/CactusBlock.java
@@ -104,7 +_,7 @@
protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) {
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockState blockState = level.getBlockState(pos.relative(direction));
- if (blockState.isSolid() || level.getFluidState(pos.relative(direction)).is(FluidTags.LAVA)) {
+ if ((level.getWorldBorder().world.purpurConfig.cactusBreaksFromSolidNeighbors && blockState.isSolid()) || level.getFluidState(pos.relative(direction)).is(FluidTags.LAVA)) { // Purpur - Cactus breaks from solid neighbors config
return false;
}
}