Skip to content

Commit a15d0b0

Browse files
committed
Fixed passable leaves not slowing down fall
1 parent 5cfa443 commit a15d0b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/ferreusveritas/dynamictrees/block/leaves/DynamicLeavesBlock.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public void entityInside(BlockState state, Level level, BlockPos pos, Entity ent
364364
if (isMovementVanilla() || isEntityPassable(entity)) {
365365
super.entityInside(state, level, pos, entity);
366366
} else {
367-
if (entity.getDeltaMovement().y < 0.0D && entity.fallDistance < 2.0f) {
367+
if (entity.getDeltaMovement().y < 0.0D && (isLeavesPassable() || entity.fallDistance < 2.0f)) {
368368
entity.fallDistance = 0.0f;
369369
entity.setDeltaMovement(entity.getDeltaMovement().x, entity.getDeltaMovement().y * 0.5D, entity.getDeltaMovement().z); // Slowly sink into the block
370370
} else if (!isLeavesPassable() && entity.getDeltaMovement().y > 0 && entity.getDeltaMovement().y < 0.25D) {

src/main/java/com/ferreusveritas/dynamictrees/init/DTConfigs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public class DTConfigs {
131131
SERVER_BUILDER.pop();
132132

133133
SERVER_BUILDER.comment("Interaction Settings").push("interaction");
134-
IS_LEAVES_PASSABLE = SERVER_BUILDER.comment("If enabled all leaves will be passable").
134+
IS_LEAVES_PASSABLE = SERVER_BUILDER.comment("If enabled all leaves will be passable. If the Passable Foliage mod is installed this config is overridden").
135135
define("isLeavesPassable", false);
136136
VANILLA_LEAVES_COLLISION = SERVER_BUILDER.comment("If enabled player movement on leaves will not be enhanced").
137137
define("vanillaLeavesCollision", false);

0 commit comments

Comments
 (0)