// Сущность идёт по блоку
public void onEntityWalk(World world, BlockPos pos, Entity entity)
{
if(!world.isRemote){
if(entity instanceof EntityCreature){
EntityCreature creature = (EntityCreature)entity;
creature.addPotionEffect(new PotionEffect(MobEffects.LEVITATION, 120, 2));
}
}
}