Skip to content

Commit

Permalink
Fixed entities not being able to pathfind around frames
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneDubstep committed Mar 1, 2025
1 parent 892b8b3 commit 1147d7b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.CollisionContext;
Expand Down Expand Up @@ -144,6 +145,11 @@ protected void createBlockStateDefinition(Builder<Block, BlockState> builder) {
builder.add(FACING, POWERED, WATERLOGGED);
}

@Override
protected boolean isPathfindable(BlockState state, PathComputationType pathType) {
return false;
}

@Override
public BlockState rotate(BlockState state, Rotation rot) {
return state.setValue(FACING, rot.rotate(state.getValue(FACING)));
Expand Down

0 comments on commit 1147d7b

Please sign in to comment.