Tip, make sure to make the farmland so it’s not touching the ground, and have an elevated ladder. For example: the ladder is on a block not touching the ground. NOTHING on the ground would be able to get up except players and high jumping mobs. You can jump on the ladder to climb it