mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 8fe5611 Fix Player#playerListName nullability annotation (#6089) 8827886 Add back linking to Adventure Javadoc (#6088) 6ea4da4 AbstractSkeleton should extend RangedEntity (#6087) a831634 add Optimize Light Engine patch (#5863) 56fd1a2 Update to Minecraft 1.17.1 (#6097) f8d6cbd Deobfuscate stacktraces in sync load info (#6103) Tuinity Changes: 5065deb Make CollisionContext initialisation lazy 388bdf5 Optimise ActivationRange#activateEntities again 2310a94 Update to 1.17.1
60 lines
2.7 KiB
Diff
60 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 21 Jun 2019 14:37:10 -0500
|
|
Subject: [PATCH] Allow soil to moisten from water directly under it
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
index a242a80b16c7d074d52a52728646224b1a0091d4..5d9d77cb382c8075af2713a0ce26c28a35a0aaa8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
|
@@ -50,23 +50,6 @@ public class FarmBlock extends Block {
|
|
return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
|
|
}
|
|
|
|
- @Override
|
|
- public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
|
- BlockState iblockdata1 = world.getBlockState(pos.above());
|
|
-
|
|
- return !iblockdata1.getMaterial().isSolid() || iblockdata1.getBlock() instanceof FenceGateBlock || iblockdata1.getBlock() instanceof MovingPistonBlock;
|
|
- }
|
|
-
|
|
- @Override
|
|
- public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
|
- return !this.defaultBlockState().canSurvive(ctx.getLevel(), ctx.getClickedPos()) ? Blocks.DIRT.defaultBlockState() : super.getStateForPlacement(ctx);
|
|
- }
|
|
-
|
|
- @Override
|
|
- public boolean useShapeForLightOcclusion(BlockState state) {
|
|
- return true;
|
|
- }
|
|
-
|
|
@Override
|
|
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
|
return FarmBlock.SHAPE;
|
|
@@ -159,7 +142,7 @@ public class FarmBlock extends Block {
|
|
}
|
|
}
|
|
|
|
- return false;
|
|
+ return ((ServerLevel) world).purpurConfig.farmlandGetsMoistFromBelow && world.getFluidState(pos.relative(Direction.DOWN)).is(FluidTags.WATER); // Purpur
|
|
// Tuinity end - remove abstract block iteration
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 1849f7970c5356f84a2b50a2a1f1b9742d822c67..8164b35f2c2d80a6b75ac10bd4fe293e47da3eba 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -137,6 +137,11 @@ public class PurpurWorldConfig {
|
|
});
|
|
}
|
|
|
|
+ public boolean farmlandGetsMoistFromBelow = false;
|
|
+ private void farmlandSettings() {
|
|
+ farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
|
+ }
|
|
+
|
|
public boolean signAllowColors = false;
|
|
public boolean signRightClickEdit = false;
|
|
private void signSettings() {
|