Skip to content

Commit 75e2130

Browse files
committed
allowed creative players to fly through leaves
1 parent 2202374 commit 75e2130

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
modName=DynamicTrees
22
modId=dynamictrees
3-
modVersion=1.4.2
3+
modVersion=1.4.4
44

55
group=com.ferreusveritas.dynamictrees
66

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,8 @@ public void fallOn(Level level, BlockState blockState, BlockPos pos, Entity enti
653653

654654
@Override
655655
public void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) {
656-
if (isMovementVanilla() || isEntityPassable(entity)) {
656+
if (isMovementVanilla() || isEntityPassable(entity) || //Allow creative flying players through
657+
(entity instanceof Player player && player.isCreative() && player.getAbilities().flying)) {
657658
super.entityInside(state, level, pos, entity);
658659
} else {
659660
if (entity.getDeltaMovement().y < 0.0D && (isLeavesPassable() || entity.fallDistance < 2.0f)) {

0 commit comments

Comments
 (0)